Skip to content

Commit 6963a16

Browse files
committed
Fix vestigial inheritance stuff in launcher
1 parent 3e6e6fe commit 6963a16

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

filesystem/system/launcher/games_screen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def __init__(self, game_info, focused, on_tile_focused_cb, on_tiles_moved_cb):
152152

153153
# Create title for this tile
154154
self.title_text_node = Text2DNode(text=game_info.name, font=title_font, position=Vector2(0, 26), opacity=1.0, letter_spacing=1.0)
155-
self.title_text_node.inherit_scale = False
155+
#self.title_text_node.inherit_scale = False
156156
self.add_child(self.title_text_node)
157157

158158
# Setup tween for this tile for when rows are horizontally shifted

filesystem/system/launcher/settings_screen.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ class SettingIcon(GUIBitmapButton2DNode):
2020
def __init__(self, font, bitmap, on_focus, on_unfocus):
2121
super().__init__(self)
2222

23-
self.inherit_scale = False
24-
self.inherit_opacity = False
23+
# self.inherit_scale = False
24+
# self.inherit_opacity = False
2525
self.font = font
2626
self.text = " "
2727
self.bitmap = bitmap
2828
self.transparent_color = engine_draw.white
2929

3030
self.on_focus = on_focus
3131
self.on_unfocus = on_unfocus
32-
32+
3333
def on_before_focused(self):
3434
if page == 1:
3535
return True
3636
else:
3737
return False
38-
38+
3939
def on_just_focused(self):
4040
self.on_focus()
41-
41+
4242
def on_just_unfocused(self):
4343
self.on_unfocus()
4444

@@ -53,13 +53,13 @@ def __init__(self, font, bitmap, min, max, setter_getter):
5353

5454
self.setter_getter = setter_getter
5555
self.percentage = self.setter_getter()
56-
56+
5757
self.scale_factor = 0.65
5858

5959
self.width = 120
6060
self.height = (bitmap.height*self.scale_factor)+2
6161
self.layer = 0
62-
self.inherit_scale=False
62+
# self.inherit_scale=False
6363
self.color=setting_background_color
6464
self.opacity=0.35
6565
self.position.x = 128
@@ -70,24 +70,24 @@ def __init__(self, font, bitmap, min, max, setter_getter):
7070
self.icon.position.x = (-self.width/2) + (bitmap.width*self.scale_factor/2) + 1
7171

7272
self.bar_max_width = self.width - (bitmap.width*self.scale_factor) - 6
73-
self.bar = Rectangle2DNode(width=self.bar_max_width*self.percentage, height=self.height-14, inherit_scale=False, inherit_opacity=False, color=bar_color)
73+
self.bar = Rectangle2DNode(width=self.bar_max_width*self.percentage, height=self.height-14, color=bar_color)
7474
self.position_bar()
7575

7676
self.add_child(self.icon)
7777
self.add_child(self.bar)
78-
78+
7979
def position_bar(self):
8080
self.bar.position.x = -(self.width/2) + (self.icon.bitmap.width*self.scale_factor) + (self.bar.width/2) + 4
8181

8282
def focus(self):
8383
self.icon.focused = True
84-
84+
8585
def unfocus(self):
8686
self.icon.focused = False
8787

8888
def on_focus(self):
8989
self.color = engine_draw.black
90-
90+
9191
def on_unfocus(self):
9292
self.color = setting_background_color
9393

@@ -105,19 +105,19 @@ def update(self):
105105
def tick(self, dt):
106106
if self.icon.focused is not True:
107107
return
108-
108+
109109
if engine_io.LEFT.is_pressed:
110110
self.percentage -= 0.025
111111
self.update()
112112
elif engine_io.RIGHT.is_pressed:
113113
self.percentage += 0.025
114114
self.update()
115-
115+
116116
# Only save after one or the other button is done being held
117117
# (don't want to constantly write the file)
118118
if engine_io.LEFT.is_just_released or engine_io.RIGHT.is_just_released:
119119
self.setter_getter(self.percentage, True) # Actually save the setting
120-
120+
121121

122122
class SettingsScreen():
123123
def __init__(self, font):
@@ -154,7 +154,7 @@ def __init__(self, font):
154154
self.fs = Text2DNode(font=font, text=f"Storage: {used_space}/{total_space} {unit}", letter_spacing=0.75)
155155
self.fs.position.x = 128
156156
self.fs.position.y = 24
157-
157+
158158
def tell_page(self, new_page):
159159
global page
160160
page = new_page
@@ -163,4 +163,4 @@ def tell_page(self, new_page):
163163
self.volume_slider.focus()
164164
else:
165165
self.volume_slider.unfocus()
166-
self.brightness_slider.unfocus()
166+
self.brightness_slider.unfocus()

0 commit comments

Comments
 (0)