@@ -22,6 +22,10 @@ var INFO_WINDOW = preload("res://scenes/info_window.tscn")
22
22
23
23
signal restart_steam_hint
24
24
25
+ func send_steam_restart_hint ():
26
+ print ("Sending restart hint" )
27
+ emit_signal ("restart_steam_hint" )
28
+
25
29
func initialize_action_button (
26
30
action_button : ActionButton ,
27
31
):
@@ -47,11 +51,15 @@ func update_action_button(
47
51
display_text : String ,
48
52
is_available : bool ,
49
53
is_ongoing : bool ,
54
+ is_completed : bool ,
50
55
) -> void :
51
56
action_button .set_name (identifier )
52
57
action_button .set_text (display_text )
53
58
action_button .set_visible (is_available )
54
59
60
+ if is_completed :
61
+ action_button .modulate = Color .DARK_GRAY
62
+
55
63
# TODO: make not clickable while running
56
64
if is_ongoing :
57
65
if not action_button .button_known_ongoing_state :
@@ -124,13 +132,13 @@ func _input(event: InputEvent) -> void:
124
132
get_tree ().quit ()
125
133
126
134
# NOTE: could focus the first element of the first subtab here if desired
127
- if event .is_action_pressed ("ui_next_main_tab" ):
135
+ if event .is_action_pressed ("ui_next_main_tab" ):
128
136
var did_change_tab = % MainTabs .select_next_available ()
129
137
if did_change_tab :
130
138
% MainTabs .get_tab_bar ().grab_focus ()
131
139
elif $ UpdateButton .visible :
132
140
$ UpdateButton .grab_focus ()
133
-
141
+
134
142
if event .is_action_pressed ("ui_prev_main_tab" ):
135
143
if not $ UpdateButton .has_focus ():
136
144
% MainTabs .select_previous_available ()
@@ -150,7 +158,7 @@ func _ready():
150
158
dd .context_was_updated .connect (_on_context_was_updated )
151
159
dd .update_action_button .connect (update_action_button .call_deferred )
152
160
dd .initialize_action_button .connect (initialize_action_button .call_deferred )
153
- dd .added_to_steam .connect (func (): emit_signal ( "restart_steam_hint" ) )
161
+ dd .added_to_steam .connect (send_steam_restart_hint . call_deferred )
154
162
155
163
var should_test = OS .get_environment ("DECKTRICKS_GUI_TEST_COMMAND_ONLY" )
156
164
var should_exit = OS .get_environment ("DECKTRICKS_GUI_EXIT_IMMEDIATELY" )
@@ -162,14 +170,14 @@ func _ready():
162
170
163
171
% LogContainer .populate_logs ()
164
172
dd .populate_categories (% Categories )
165
-
173
+
166
174
% Categories .select_next_available ()
167
175
% Categories .get_tab_control (1 ).find_child ("ActionButton" )
168
-
176
+
169
177
var main_tab_bar : TabBar = % MainTabs .get_tab_bar ()
170
178
main_tab_bar .set_focus_neighbor (SIDE_RIGHT , $ UpdateButton .get_path ())
171
179
$ UpdateButton .set_focus_neighbor (SIDE_LEFT , main_tab_bar .get_path ())
172
- $ UpdateButton .set_focus_neighbor (SIDE_RIGHT , '' )
180
+ $ UpdateButton .set_focus_neighbor (SIDE_RIGHT , '' )
173
181
174
182
var first_button = get_tree ().get_nodes_in_group ("first_button" ).pop_front ()
175
183
if first_button :
@@ -184,7 +192,3 @@ func _ready():
184
192
185
193
if should_exit :
186
194
get_tree ().quit ()
187
-
188
-
189
-
190
-
0 commit comments