Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update maps.cfg disable start button when demo mode is selected with no demo selected #1570

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions config/ui/game/maps.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,10 @@ gameui_sort_maps = [
]

uirelease [
// Select first map/demo when switching between demo and normal modes
caseif (&& [! $gameui_maps_mode] $arg1) [
gameui_maps_map = -1
] (&& $gameui_maps_mode [! $arg1]) [
gameui_maps_map = 0
]
// Select first map/no demo when switching between demo and normal modes
gameui_maps_map = -1


gameui_maps_mode = $arg1
gameui_maps_mode_pos = (+f $uilastsx (*f $uilastw 0.5))
gameui_sort_maps
Expand Down Expand Up @@ -851,7 +848,8 @@ gameui_maps_pointlimit_options = [
]
p_colour = #(hsvtohex 8 0.3 1)
p_highlight = 1
p_disabled = (< $gameui_maps_mode 0)
// check if we user has selected a mode, if they select demo mode and there are no maps then disable the button
p_disabled = (|| [< $gameui_maps_mode 0] [&& [= $gameui_maps_mode 0] [= $gameui_maps_map -1]])
p_id = #(gameui_get_id button)
]
]
Expand Down