Recreate basic screen changing in PySide app.
This commit is contained in:
parent
ea9de695fd
commit
eddfac271a
|
@ -1,8 +1,53 @@
|
|||
#: import justcheckers justcheckers
|
||||
|
||||
FloatLayout:
|
||||
ScreenManager:
|
||||
MenuScreen:
|
||||
GameScreen:
|
||||
InfoScreen:
|
||||
|
||||
<MenuScreen@Screen>:
|
||||
name: 'menu'
|
||||
Image:
|
||||
source: 'images/backdrop.jpg'
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
Label:
|
||||
text: "justCheckers {} - Main Menu".format(justcheckers.__version__)
|
||||
Button:
|
||||
text: "New Game"
|
||||
on_press:
|
||||
root.manager.transition.direction = 'left'
|
||||
root.manager.current = 'game'
|
||||
Button:
|
||||
text: "Credits"
|
||||
on_press:
|
||||
root.manager.transition.direction = 'left'
|
||||
root.manager.current = 'info'
|
||||
|
||||
|
||||
<GameScreen@Screen>:
|
||||
name: 'game'
|
||||
Image:
|
||||
source: 'images/backdrop.jpg'
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
Label:
|
||||
text: "Game"
|
||||
Button:
|
||||
text: "Back to Menu"
|
||||
on_press:
|
||||
root.manager.transition.direction = 'right'
|
||||
root.manager.current = 'menu'
|
||||
|
||||
<InfoScreen@Screen>:
|
||||
name: 'info'
|
||||
Image:
|
||||
source: 'images/backdrop.jpg'
|
||||
BoxLayout:
|
||||
Label:
|
||||
text: "justCheckers {}".format(justcheckers.__version__)
|
||||
text: "Info"
|
||||
Button:
|
||||
text: "Back to Menu"
|
||||
on_press:
|
||||
root.manager.transition.direction = 'right'
|
||||
root.manager.current = 'menu'
|
||||
|
|
Loading…
Reference in New Issue