mirror of
https://github.com/csd4ni3l/fractal-viewer.git
synced 2026-01-01 12:13:43 +01:00
Remove unnecesseray double UIAnchorLayout with controller support and setting of controller events on window
This commit is contained in:
@@ -7,8 +7,7 @@ class Main(arcade.gui.UIView):
|
||||
def __init__(self, pypresence_client=None):
|
||||
super().__init__()
|
||||
|
||||
self.root = self.add_widget(UIFocusGroup())
|
||||
self.anchor = self.root.add(arcade.gui.UIAnchorLayout())
|
||||
self.anchor = self.add_widget(UIFocusGroup(size_hint=(1, 1)))
|
||||
self.box = self.anchor.add(arcade.gui.UIBoxLayout(space_between=10), anchor_x='center', anchor_y='center')
|
||||
|
||||
self.pypresence_client = pypresence_client
|
||||
@@ -59,7 +58,7 @@ class Main(arcade.gui.UIView):
|
||||
self.settings_button = self.box.add(arcade.gui.UITextureButton(text="Settings", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=150, style=big_button_style))
|
||||
self.settings_button.on_click = lambda event: self.settings()
|
||||
|
||||
self.root.detect_focusable_widgets()
|
||||
self.anchor.detect_focusable_widgets()
|
||||
|
||||
def play(self):
|
||||
from menus.fractal_chooser import FractalChooser
|
||||
|
||||
Reference in New Issue
Block a user