mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Disable remote debug button when there are no runnable presets
This commit is contained in:
@@ -585,17 +585,20 @@ bool EditorExportPlatformWeb::poll_export() {
|
||||
}
|
||||
}
|
||||
|
||||
int prev = menu_options;
|
||||
menu_options = preset.is_valid();
|
||||
HTTPServerState prev_server_state = server_state;
|
||||
server_state = HTTP_SERVER_STATE_OFF;
|
||||
if (server->is_listening()) {
|
||||
if (preset.is_null()) {
|
||||
if (preset.is_null() || menu_options == 0) {
|
||||
server->stop();
|
||||
} else {
|
||||
server_state = HTTP_SERVER_STATE_ON;
|
||||
menu_options += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return server_state != prev_server_state;
|
||||
return server_state != prev_server_state || menu_options != prev;
|
||||
}
|
||||
|
||||
Ref<ImageTexture> EditorExportPlatformWeb::get_option_icon(int p_index) const {
|
||||
|
||||
@@ -58,6 +58,7 @@ class EditorExportPlatformWeb : public EditorExportPlatform {
|
||||
HTTPServerState server_state = HTTP_SERVER_STATE_OFF;
|
||||
|
||||
Ref<EditorHTTPServer> server;
|
||||
int menu_options = 0;
|
||||
|
||||
String _get_template_name(bool p_extension, bool p_thread_support, bool p_debug) const {
|
||||
String name = "web";
|
||||
|
||||
Reference in New Issue
Block a user