diff options
Diffstat (limited to 'client/menu')
-rw-r--r-- | client/menu/lobby.gd | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/menu/lobby.gd b/client/menu/lobby.gd index 5136798d..a419c636 100644 --- a/client/menu/lobby.gd +++ b/client/menu/lobby.gd @@ -99,6 +99,7 @@ func initialize(): h.add_child(reset) h.add_child(add) add.pressed.connect(increase_bot_count.bind(algo_id)) + reset.pressed.connect(reset_bot_count.bind(algo_id)) remove.pressed.connect(decrease_bot_count.bind(algo_id)) bot_settings.add_child(h) @@ -124,6 +125,10 @@ func decrease_bot_count(algo_id: String): bot_counts[algo_id] = new_count update_bot_reset_text(algo_id) +func reset_bot_count(algo_id: String): + bot_counts[algo_id] = 0 + update_bot_reset_text(algo_id) + func update_bot_reset_text(algo_id: String): var display_name: String = bot_display_names[algo_id] if bot_display_names.has(algo_id) else algo_id bot_reset_buttons[algo_id].text = "%s (%d)" % [display_name, bot_counts[algo_id]] |