Refactor main menu button group in kv file.
This commit is contained in:
parent
053430b77c
commit
0505a10045
|
@ -25,16 +25,23 @@ ScreenManager:
|
||||||
size: self.size
|
size: self.size
|
||||||
Label:
|
Label:
|
||||||
size_hint_y: 0.1
|
size_hint_y: 0.1
|
||||||
BoxLayout:
|
MainMenuButtonGroup:
|
||||||
orientation: "vertical"
|
|
||||||
size_hint_x: 0.9
|
size_hint_x: 0.9
|
||||||
pos_hint: {'center_x': 0.5}
|
pos_hint: {'center_x': 0.5}
|
||||||
|
Label:
|
||||||
|
text: "Version {}".format(justcheckers.__version__)
|
||||||
|
size_hint_y: 0.1
|
||||||
|
pos_hint: {'center_x': 0.9}
|
||||||
|
|
||||||
|
|
||||||
|
<MainMenuButtonGroup@BoxLayout>:
|
||||||
|
orientation: "vertical"
|
||||||
Button:
|
Button:
|
||||||
text: "New Game"
|
text: "New Game"
|
||||||
size_hint_y: 0.1
|
size_hint_y: 0.1
|
||||||
on_press:
|
on_press:
|
||||||
root.manager.transition.direction = 'left'
|
root.parent.parent.manager.transition.direction = 'left'
|
||||||
root.manager.current = 'game'
|
root.parent.parent.manager.current = 'game'
|
||||||
Button:
|
Button:
|
||||||
text: "Open Game"
|
text: "Open Game"
|
||||||
disabled: True
|
disabled: True
|
||||||
|
@ -47,8 +54,8 @@ ScreenManager:
|
||||||
text: "About Game"
|
text: "About Game"
|
||||||
size_hint_y: 0.1
|
size_hint_y: 0.1
|
||||||
on_press:
|
on_press:
|
||||||
root.manager.transition.direction = 'left'
|
root.parent.parent.manager.transition.direction = 'left'
|
||||||
root.manager.current = 'info'
|
root.parent.parent.manager.current = 'info'
|
||||||
Button:
|
Button:
|
||||||
text: "Settings"
|
text: "Settings"
|
||||||
size_hint_y: 0.1
|
size_hint_y: 0.1
|
||||||
|
@ -59,11 +66,6 @@ ScreenManager:
|
||||||
size_hint_y: 0.1
|
size_hint_y: 0.1
|
||||||
on_press:
|
on_press:
|
||||||
app.stop()
|
app.stop()
|
||||||
Label:
|
|
||||||
text: "Version {}".format(justcheckers.__version__)
|
|
||||||
size_hint_y: 0.1
|
|
||||||
pos_hint: {'center_x': 0.9}
|
|
||||||
|
|
||||||
|
|
||||||
<GameScreen@Screen>:
|
<GameScreen@Screen>:
|
||||||
name: 'game'
|
name: 'game'
|
||||||
|
|
Loading…
Reference in New Issue