multi-zen mode
This commit is contained in:
1 parent
e9e4524321
commit
844eab754f
3 files changed
+9
-10
No files matched your search
@@ -104,7 +104,7 @@ In addition to shortcuts mentioned above and those shown in the main menu:
|
||||
|
||||
* **[Shift]**: Open the main menu.
|
||||
* **[Tab]**: Switch between analysis and play modes.
|
||||
* **[~]** or **[ ` ]** or **[m]**: Toggles only showing the board.
|
||||
* **[~]** or **[ ` ]** or **[m]**: Cycles through more minimalistic UI modes.
|
||||
* **[p]**: Pass
|
||||
* **[spacebar]**: Pause/Resume timer
|
||||
* **[arrow up]** or **[z]**: Undo move. Hold shift for 10 moves at a time, or ctrl to skip to the start.
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ from katrain.gui.controlspanel import ControlsPanel
|
||||
class KaTrainGui(Screen, KaTrainBase):
|
||||
"""Top level class responsible for tying everything together"""
|
||||
|
||||
zen = BooleanProperty(False)
|
||||
zen = NumericProperty(0)
|
||||
controls = ObjectProperty(None)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
@@ -403,7 +403,7 @@ class KaTrainGui(Screen, KaTrainBase):
|
||||
elif keycode[1] == "spacebar":
|
||||
self.controls.timer.paused = not self.controls.timer.paused
|
||||
elif keycode[1] in ["`", "~", "m"]:
|
||||
self.zen = not self.zen
|
||||
self.zen = (self.zen + 1) % 3
|
||||
elif keycode[1] in ["up", "z"]:
|
||||
self("undo", 1 + ("shift" in modifiers) * 9 + ("ctrl" in modifiers) * 999)
|
||||
elif keycode[1] in ["down", "x"]:
|
||||
|
||||
+6
-7
@@ -1045,7 +1045,6 @@
|
||||
analysis_controls: analysis_controls
|
||||
nav_drawer: nav_drawer
|
||||
nav_drawer_contents: nav_drawer_contents
|
||||
zen: False
|
||||
NavigationLayout:
|
||||
ScreenManager:
|
||||
Screen:
|
||||
@@ -1057,19 +1056,19 @@
|
||||
AnalysisControls:
|
||||
id: analysis_controls
|
||||
size_hint_y: None
|
||||
height: min(100,self.width / 13.5) if not root.zen else 1
|
||||
opacity: 0 if root.zen else 1
|
||||
height: 1 if root.zen > 0 else min(100,self.width / 13.5)
|
||||
opacity: 0 if root.zen > 0 else 1
|
||||
BadukPanWidget:
|
||||
id: board_gui
|
||||
BadukPanControls:
|
||||
id: board_controls
|
||||
size_hint_y: None
|
||||
height: min(100,self.width / 13.5) if not root.zen else 1
|
||||
opacity: 0 if root.zen else 1
|
||||
height: 1 if root.zen > 0 else min(100,self.width / 13.5)
|
||||
opacity: 0 if root.zen > 0 else 1
|
||||
MDBoxLayout:
|
||||
size_hint_x: None
|
||||
width: 0 if root.zen else self.height * 0.4
|
||||
opacity: 0 if root.zen else 1
|
||||
width: 1 if root.zen == 2 else self.height * 0.4
|
||||
opacity: 0 if root.zen == 2 else 1
|
||||
orientation: 'vertical'
|
||||
PlayAnalyzeSelect:
|
||||
id: play_mode
|
||||
|
||||
Reference in new issue
Block a user