Skip to content

Commit dac9648

Browse files
Follow theme
1 parent 07e990c commit dac9648

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

internal_filesystem/apps/com.micropythonos.connect4/assets/connect4.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def __init__(self):
6060

6161
def onCreate(self):
6262
self.screen = lv.obj()
63-
self.screen.set_style_bg_color(lv.color_hex(0x34495E), 0)
6463
self.screen.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
6564
self.screen.remove_flag(lv.obj.FLAG.SCROLLABLE)
6665

@@ -79,25 +78,16 @@ def onCreate(self):
7978
# Status label (top left)
8079
self.status_label = lv.label(self.screen)
8180
self.status_label.set_text("Your turn!")
82-
self.status_label.set_style_text_font(lv.font_montserrat_12, 0)
83-
self.status_label.set_style_text_color(lv.color_hex(0xFFFFFF), 0)
8481
self.status_label.set_pos(5, 10)
8582

86-
# Difficulty selector (top center)
87-
difficulty_cont = lv.obj(self.screen)
88-
difficulty_cont.set_size(60, 26)
89-
difficulty_cont.align(lv.ALIGN.TOP_MID, 0, 5)
90-
difficulty_cont.set_style_bg_color(lv.color_hex(0x2C3E50), 0)
91-
difficulty_cont.set_style_border_width(1, 0)
92-
difficulty_cont.set_style_border_color(lv.color_hex(0xFFFFFF), 0)
93-
difficulty_cont.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
94-
difficulty_cont.add_flag(lv.obj.FLAG.CLICKABLE)
95-
difficulty_cont.add_event_cb(self.cycle_difficulty, lv.EVENT.CLICKED, None)
96-
97-
self.difficulty_label = lv.label(difficulty_cont)
83+
# Difficulty button (top center)
84+
difficulty_btn = lv.button(self.screen)
85+
difficulty_btn.set_size(70, 26)
86+
difficulty_btn.align(lv.ALIGN.TOP_MID, 0, 5)
87+
difficulty_btn.add_event_cb(self.cycle_difficulty, lv.EVENT.CLICKED, None)
88+
89+
self.difficulty_label = lv.label(difficulty_btn)
9890
self.difficulty_label.set_text("Easy")
99-
self.difficulty_label.set_style_text_font(lv.font_montserrat_12, 0)
100-
self.difficulty_label.set_style_text_color(lv.color_hex(0xFFFFFF), 0)
10191
self.difficulty_label.center()
10292

10393
# New Game button (top right)
@@ -107,7 +97,6 @@ def onCreate(self):
10797
new_game_btn.add_event_cb(lambda e: self.new_game(), lv.EVENT.CLICKED, None)
10898
new_game_label = lv.label(new_game_btn)
10999
new_game_label.set_text("New")
110-
new_game_label.set_style_text_font(lv.font_montserrat_12, 0)
111100
new_game_label.center()
112101

113102
# Create board background

internal_filesystem/boot_unix.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
mpos.info.set_hardware_id("linux-desktop")
1717

1818
# Same as Waveshare ESP32-S3-Touch-LCD-2 and Fri3d Camp 2026 Badge
19-
TFT_HOR_RES=320
20-
TFT_VER_RES=240
19+
#TFT_HOR_RES=320
20+
#TFT_VER_RES=240
2121

2222
# Fri3d Camp 2024 Badge:
23-
#TFT_HOR_RES=296
24-
#TFT_VER_RES=240
23+
TFT_HOR_RES=296
24+
TFT_VER_RES=240
2525

2626
# Bigger screen
2727
#TFT_HOR_RES=640

0 commit comments

Comments
 (0)