Skip to content

Commit

Permalink
improved pause menu
Browse files Browse the repository at this point in the history
  • Loading branch information
lunalawl committed Jun 4, 2023
1 parent 4037f56 commit f01cf06
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 20 deletions.
9 changes: 5 additions & 4 deletions _ark/ui/eng/locale.dta
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
(multi_select_multi_mode "SELECT MULTIPLAYER MODE")
(career_featuring "FEATURING")
(career_playing_the "PLAYING THE")
(pause_confirm_newsong_message "You will lose all unsaved progress if you select a new song. Are you sure you want to select a new song?")
(pause_confirm_quit_message "You will lose all unsaved progress if you quit. Are you sure you want to quit this song?")
(pause_cancel "CANCEL")
(pause_confirm_restart_message "You will lose all unsaved progress if you restart. Are you sure you want to restart this song?")
Expand Down Expand Up @@ -278,12 +279,12 @@
(ub_blurb2 "Play nice, you two.")
(percent_complete_format "%d%% complete")
(lose_diff "DIFFICULTY:")
(lose_diff2 "DIFFICULTY")
(lose_diff2 "PRACTICE")
(lose_resume "RESUME")
(lose_title "SONG FAILED")
(lose_quit "EXIT")
(lose_restart "RETRY")
(lose_practice "PRACTICE")
(lose_quit "QUIT")
(lose_restart "RESTART")
(lose_practice "OPTIONS")
(lose_selsong "NEW SONG")
(eg_percent_format "%d%%")
(eg_percent_frac_format "%0.0f%%")
Expand Down
2 changes: 1 addition & 1 deletion _ark/ui/overshell.dta
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
(enter ;when the screen is entered
{$this overshell_theme} ;run the theme code on the current overshell screen
{pause_title.lbl set_local_pos 0 0 105} ;move the label to the proper location
{pause_buttons.view set_local_pos 0 125 50} ;move the buttons to the proper location
{pause_buttons.view set_local_pos 0 0 37} ;move the buttons to the proper location
{pause_title.lbl set_localized_text {localize os_deluxesettings}} ;set the header label text
{resume.btn set_localized_text {localize os_modifiers}} ;set the button text
{restart.btn set_localized_text {localize os_speedsettings}} ;set the button text
Expand Down
80 changes: 65 additions & 15 deletions _ark/ui/pause.dta
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(file overshell_pause.milo)
(focus lose_resume_career.btn)
OVERSHELL_THEME_HANDLER
(reset_focus TRUE)
;(reset_focus TRUE)
(enter
{$this overshell_theme}
(lose_title.lbl set_localized_text {sprintf {localize pausetitle}})
Expand Down Expand Up @@ -51,14 +51,18 @@
{switch $component
(lose_resume_career.btn {$this resume})
(lose_restart_career.btn
{pause_confirm_restart_screen set pause_screen $this}
{ui goto_screen pause_confirm_restart_screen})
(lose_diff_career.btn {ui push_screen overshell_diff_list_screen})
(lose_practice_career.btn {$this goto_practice_mode})
(lose_selsong_career.btn {meta_loading_goto sel_song_screen})
{pause_confirm_restart_screen set pause_screen $this}
{ui goto_screen pause_confirm_restart_screen})
(lose_practice_career.btn
{set $modifier_exit {ui current_screen}}
{ui push_screen overshell_screen})
(lose_diff_career.btn {$this goto_practice_mode})
(lose_selsong_career.btn
{pause_confirm_newsong_screen set pause_screen $this}
{ui goto_screen pause_confirm_newsong_screen})
(lose_quit_career.btn
{pause_confirm_quit_screen set pause_screen $this}
{ui goto_screen pause_confirm_quit_screen})}))
{pause_confirm_quit_screen set pause_screen $this}
{ui goto_screen pause_confirm_quit_screen})}))
{new GHScreen pause_screen
(panels GAME_PANELS pause_panel)
(focus pause_panel)
Expand Down Expand Up @@ -143,7 +147,7 @@
{new GHPanel pause_controller_panel
(file pause_controller.milo)
OVERSHELL_THEME_HANDLER
(focus resume.btn)
;(focus resume.btn)
(enter
{$this overshell_theme}
{pause_controller_msg.lbl set_text {if_else {game multiplayer}
Expand Down Expand Up @@ -248,10 +252,10 @@
pause_confirm_restart_panel
(file pause_restart.milo)
OVERSHELL_THEME_HANDLER
(focus restart.btn)
(focus cancel.btn)
(enter
{$this overshell_theme}
{$this set_focus restart.btn})}
{$this set_focus cancel.btn})}
{new
GHScreen
pause_confirm_restart_screen
Expand All @@ -274,16 +278,22 @@
{ui
goto_screen
[pause_screen]})
kDataUnhandled})}
kDataUnhandled})
(BUTTON_DOWN_MSG ;code ran when a button is pressed
{if {== $button kPad_Tri} ;run when pressing back
{ui pop_screen} ;make the current overshell screen dissappear
}
kDataUnhandled ;means literally nothing. we need to tell the game to not worry if we press a button not defined in BUTTON_DOWN_MSG
)}
{new
GHPanel
pause_confirm_quit_panel
(file pause_quit.milo)
OVERSHELL_THEME_HANDLER
(focus quit.btn)
(focus cancel.btn)
(enter
{$this overshell_theme}
{$this set_focus quit.btn})}
{$this set_focus cancel.btn})}
{new
GHScreen
pause_confirm_quit_screen
Expand All @@ -302,4 +312,44 @@
{ui
goto_screen
[pause_screen]})
kDataUnhandled})}
kDataUnhandled})
(BUTTON_DOWN_MSG ;code ran when a button is pressed
{if {== $button kPad_Tri} ;run when pressing back
{ui pop_screen} ;make the current overshell screen dissappear
}
kDataUnhandled ;means literally nothing. we need to tell the game to not worry if we press a button not defined in BUTTON_DOWN_MSG
)}
{new
GHPanel
pause_confirm_newsong_panel
(file pause_quit.milo)
OVERSHELL_THEME_HANDLER
(focus cancel.btn)
(enter
{$this overshell_theme}
{$this set_focus cancel.btn})}
{new
GHScreen
pause_confirm_newsong_screen
(panels GAME_PANELS pause_confirm_newsong_panel)
(focus pause_confirm_newsong_panel)
(in_game TRUE)
(allow_back FALSE)
(animate_transition FALSE)
(pause_screen pause_screen)
(SELECT_START_MSG
{switch
$component
(quit.btn
{meta_loading_nosave_goto sel_song_screen})
(cancel.btn
{ui
goto_screen
[pause_screen]})
kDataUnhandled})
(BUTTON_DOWN_MSG ;code ran when a button is pressed
{if {== $button kPad_Tri} ;run when pressing back
{ui pop_screen} ;make the current overshell screen dissappear
}
kDataUnhandled ;means literally nothing. we need to tell the game to not worry if we press a button not defined in BUTTON_DOWN_MSG
)}

0 comments on commit f01cf06

Please sign in to comment.