summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Twos.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/Twos.cpp')
-rw-r--r--src/displayapp/screens/Twos.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/displayapp/screens/Twos.cpp b/src/displayapp/screens/Twos.cpp
index b51a9ec..bbee5e1 100644
--- a/src/displayapp/screens/Twos.cpp
+++ b/src/displayapp/screens/Twos.cpp
@@ -21,28 +21,33 @@ Twos::Twos(Pinetime::Applications::DisplayApp *app) : Screen(app) {
lv_style_set_border_width(&style_cell1, LV_STATE_DEFAULT, 3);
lv_style_set_bg_opa(&style_cell1, LV_STATE_DEFAULT, LV_OPA_COVER);
lv_style_set_bg_color(&style_cell1, LV_STATE_DEFAULT, lv_color_hex(0xcdc0b4));
+ lv_style_set_pad_top(&style_cell1, LV_STATE_DEFAULT, 25);
+ lv_style_set_text_color(&style_cell1, LV_STATE_DEFAULT, LV_COLOR_BLACK);
lv_style_set_border_color(&style_cell2, LV_STATE_DEFAULT, lv_color_hex(0xbbada0));
lv_style_set_border_width(&style_cell2, LV_STATE_DEFAULT, 3);
lv_style_set_bg_opa(&style_cell2, LV_STATE_DEFAULT, LV_OPA_COVER);
lv_style_set_bg_color(&style_cell2, LV_STATE_DEFAULT, lv_color_hex(0xefdfc6));
+ lv_style_set_pad_top(&style_cell2, LV_STATE_DEFAULT, 25);
+ lv_style_set_text_color(&style_cell2, LV_STATE_DEFAULT, LV_COLOR_BLACK);
lv_style_set_border_color(&style_cell3, LV_STATE_DEFAULT, lv_color_hex(0xbbada0));
lv_style_set_border_width(&style_cell3, LV_STATE_DEFAULT, 3);
lv_style_set_bg_opa(&style_cell3, LV_STATE_DEFAULT, LV_OPA_COVER);
lv_style_set_bg_color(&style_cell3, LV_STATE_DEFAULT, lv_color_hex(0xef9263));
+ lv_style_set_pad_top(&style_cell3, LV_STATE_DEFAULT, 25);
lv_style_set_border_color(&style_cell4, LV_STATE_DEFAULT, lv_color_hex(0xbbada0));
lv_style_set_border_width(&style_cell4, LV_STATE_DEFAULT, 3);
lv_style_set_bg_opa(&style_cell4, LV_STATE_DEFAULT, LV_OPA_COVER);
lv_style_set_bg_color(&style_cell4, LV_STATE_DEFAULT, lv_color_hex(0xf76142));
- //lv_style_set_text_color(&style_cell4, LV_STATE_DEFAULT, LV_COLOR_WHITE);
+ lv_style_set_pad_top(&style_cell4, LV_STATE_DEFAULT, 25);
lv_style_set_border_color(&style_cell5, LV_STATE_DEFAULT, lv_color_hex(0xbbada0));
lv_style_set_border_width(&style_cell5, LV_STATE_DEFAULT, 3);
lv_style_set_bg_opa(&style_cell5, LV_STATE_DEFAULT, LV_OPA_COVER);
lv_style_set_bg_color(&style_cell5, LV_STATE_DEFAULT, lv_color_hex(0x007dc5));
- //lv_style_set_text_color(&style_cell5, LV_STATE_DEFAULT, LV_COLOR_WHITE);
+ lv_style_set_pad_top(&style_cell5, LV_STATE_DEFAULT, 25);
// format grid display
@@ -101,11 +106,6 @@ bool Twos::Refresh() {
return running;
}
-bool Twos::OnButtonPushed() {
- running = false;
- return true;
-}
-
bool Twos::placeNewTile() {
std::vector< std::pair <int,int> > availableCells;
for(int row = 0; row < 4; row++) {
@@ -158,8 +158,7 @@ bool Twos::tryMove(Tile grid[][4], int newRow, int newCol, int oldRow, int oldCo
}
bool Twos::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
- bool validMove;
- validMove = false;
+ bool validMove = false;
for(int row = 0; row < 4; row++) {
for(int col = 0; col < 4; col++) {
grid[row][col].merged = false; // reinitialize merge state