@@ -274,7 +274,7 @@ func create_upgrade_button(key):
274274
275275 var indicator_style = StyleBoxFlat .new ()
276276 indicator_style .bg_color = Color (0.545 , 0.545 , 0.545 ) # bright gray for unachieved levels
277-
277+
278278 if i < current_level :
279279 # Filled level
280280 indicator_style .bg_color = Color (0.3 , 0.7 , 1.0 ) # Bright blue for achieved levels
@@ -429,12 +429,11 @@ func update_button_state(key):
429429 var indicator = level_indicators [i ]
430430 var indicator_style = indicator .get_theme_stylebox ("panel" )
431431
432+ # Empty level
433+ indicator_style .bg_color = Color (0.307 , 0.307 , 0.307 , 0.5 )
432434 if i < current_level :
433435 # Filled level
434436 indicator_style .bg_color = Color (0.3 , 0.7 , 1.0 )
435- else :
436- # Empty level
437- indicator_style .bg_color = Color (0.2 , 0.2 , 0.25 , 0.5 )
438437
439438 # Update cost/level info
440439 if is_max_level :
@@ -535,13 +534,7 @@ func refresh_all_upgrades():
535534
536535# Add variable to track visibility changes
537536var was_visible = false
538-
539- # Also use _unhandled_key_input to catch the ESC key directly if the shortcut doesn't work
540- func _unhandled_key_input (event ):
541- if event is InputEventKey and event .keycode == KEY_ESCAPE and event .pressed and not event .echo :
542- if GameState .isDocked and visible :
543- close_upgrade_menu ()
544- get_viewport ().set_input_as_handled ()
537+ var man_override = false
545538
546539# Function to close the upgrade menu
547540func close_upgrade_menu ():
@@ -551,8 +544,10 @@ func close_upgrade_menu():
551544
552545func _process (_delta ):
553546 if GameState .isDocked :
554- visible = true
547+ if ! man_override :
548+ visible = true
555549 if Input .is_action_pressed ("esc" ):
550+ man_override = true
556551 close_upgrade_menu ()
557552 return
558553
@@ -566,3 +561,4 @@ func _process(_delta):
566561 else :
567562 visible = false
568563 was_visible = false
564+ man_override = false
0 commit comments