File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 34
34
#include " editor/editor_string_names.h"
35
35
#include " editor/settings/editor_settings.h"
36
36
#include " scene/main/http_request.h"
37
+ #include " scene/resources/texture_2d.h"
37
38
38
39
bool EngineUpdateLabel::_can_check_updates () const {
39
40
return int (EDITOR_GET (" network/connection/network_mode" )) == EditorSettings::NETWORK_ONLINE &&
@@ -186,19 +187,22 @@ void EngineUpdateLabel::_set_status(UpdateStatus p_status) {
186
187
}
187
188
set_accessibility_live (DisplayServer::AccessibilityLiveMode::LIVE_OFF);
188
189
set_tooltip_text (" " );
190
+ set_icon (Ref<Texture2D>());
189
191
break ;
190
192
}
191
193
192
194
case UpdateStatus::ERROR: {
193
195
set_disabled (false );
194
196
set_accessibility_live (DisplayServer::AccessibilityLiveMode::LIVE_POLITE);
195
197
set_tooltip_text (TTR (" An error has occurred. Click to try again." ));
198
+ set_icon (Ref<Texture2D>());
196
199
} break ;
197
200
198
201
case UpdateStatus::UPDATE_AVAILABLE: {
199
202
set_disabled (false );
200
203
set_accessibility_live (DisplayServer::AccessibilityLiveMode::LIVE_POLITE);
201
204
set_tooltip_text (TTR (" Click to open download page." ));
205
+ set_icon (get_editor_theme_icon (SNAME (" ExternalLink" )));
202
206
} break ;
203
207
204
208
default : {
@@ -264,6 +268,7 @@ void EngineUpdateLabel::_notification(int p_what) {
264
268
} break ;
265
269
266
270
case NOTIFICATION_READY: {
271
+ set_icon_alignment (ICON_ALIGNMENT_RIGHT);
267
272
if (_can_check_updates ()) {
268
273
_check_update ();
269
274
} else {
Original file line number Diff line number Diff line change 30
30
31
31
#pragma once
32
32
33
- #include " scene/gui/link_button .h"
33
+ #include " scene/gui/button .h"
34
34
35
35
class HTTPRequest ;
36
36
37
- class EngineUpdateLabel : public LinkButton {
38
- GDCLASS (EngineUpdateLabel, LinkButton );
37
+ class EngineUpdateLabel : public Button {
38
+ GDCLASS (EngineUpdateLabel, Button );
39
39
40
40
public:
41
41
enum class UpdateMode {
You can’t perform that action at this time.
0 commit comments