Skip to content
Snippets Groups Projects
Verified Commit a0d2ac5d authored by dos's avatar dos
Browse files

Bring back exit to main view

parent a0685583
No related branches found
No related tags found
No related merge requests found
...@@ -222,6 +222,11 @@ class SongView(BaseView): ...@@ -222,6 +222,11 @@ class SongView(BaseView):
media.think(delta_ms) media.think(delta_ms)
if self.input.buttons.os.middle.pressed and not self.vm.is_active(self.app):
self.vm.push(self)
self.vm.pop(ViewTransitionSwipeRight(), depth=2)
return
if not self.vm.is_active(self): if not self.vm.is_active(self):
return return
...@@ -265,11 +270,6 @@ class SongView(BaseView): ...@@ -265,11 +270,6 @@ class SongView(BaseView):
if self.input.buttons.app.right.pressed: if self.input.buttons.app.right.pressed:
self.debug = not self.debug self.debug = not self.debug
#if self.input.buttons.os.middle.pressed:
# self.vm.push(self)
# self.vm.pop(ViewTransitionSwipeRight(), depth=2)
# return
self.good = max(0, self.good - delta_ms / self.data.period) self.good = max(0, self.good - delta_ms / self.data.period)
self.bad = max(0, self.bad - delta_ms / 500) self.bad = max(0, self.bad - delta_ms / 500)
self.miss = max(0, self.miss - delta_ms / self.data.period) self.miss = max(0, self.miss - delta_ms / self.data.period)
...@@ -343,9 +343,8 @@ class SongView(BaseView): ...@@ -343,9 +343,8 @@ class SongView(BaseView):
def on_enter(self, vm: Optional[ViewManager]) -> None: def on_enter(self, vm: Optional[ViewManager]) -> None:
super().on_enter(vm) super().on_enter(vm)
self.first_think = True self.first_think = True
#if self.vm.direction == ViewTransitionDirection.FORWARD: # self-pushed if self.vm.direction == ViewTransitionDirection.FORWARD: # self-pushed
# print("SELF_PUSHED") return
# return
if self.app: if self.app:
media.load(self.app.path + '/sounds/start.mp3') media.load(self.app.path + '/sounds/start.mp3')
self.app.blm.volume = 10000 self.app.blm.volume = 10000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment