mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
disable stop button if the scene is not running
This commit is contained in:
parent
7983fb95b0
commit
a30a78dfdb
1 changed files with 4 additions and 1 deletions
|
|
@ -1876,6 +1876,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
|
||||||
play_button->set_pressed(true);
|
play_button->set_pressed(true);
|
||||||
play_button->set_icon(gui_base->get_icon("Reload", "EditorIcons"));
|
play_button->set_icon(gui_base->get_icon("Reload", "EditorIcons"));
|
||||||
}
|
}
|
||||||
|
stop_button->set_disabled(false);
|
||||||
|
|
||||||
_playing_edited = p_current;
|
_playing_edited = p_current;
|
||||||
}
|
}
|
||||||
|
|
@ -2571,6 +2572,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
||||||
play_scene_button->set_icon(gui_base->get_icon("PlayScene", "EditorIcons"));
|
play_scene_button->set_icon(gui_base->get_icon("PlayScene", "EditorIcons"));
|
||||||
play_custom_scene_button->set_pressed(false);
|
play_custom_scene_button->set_pressed(false);
|
||||||
play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom", "EditorIcons"));
|
play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom", "EditorIcons"));
|
||||||
|
stop_button->set_disabled(true);
|
||||||
//pause_button->set_pressed(false);
|
//pause_button->set_pressed(false);
|
||||||
if (bool(EDITOR_DEF("run/always_close_output_on_stop", false))) {
|
if (bool(EDITOR_DEF("run/always_close_output_on_stop", false))) {
|
||||||
for (int i = 0; i < bottom_panel_items.size(); i++) {
|
for (int i = 0; i < bottom_panel_items.size(); i++) {
|
||||||
|
|
@ -5596,6 +5598,7 @@ EditorNode::EditorNode() {
|
||||||
stop_button->set_icon(gui_base->get_icon("MainStop", "EditorIcons"));
|
stop_button->set_icon(gui_base->get_icon("MainStop", "EditorIcons"));
|
||||||
stop_button->connect("pressed", this, "_menu_option", make_binds(RUN_STOP));
|
stop_button->connect("pressed", this, "_menu_option", make_binds(RUN_STOP));
|
||||||
stop_button->set_tooltip(TTR("Stop the scene."));
|
stop_button->set_tooltip(TTR("Stop the scene."));
|
||||||
|
stop_button->set_disabled(true);
|
||||||
stop_button->set_shortcut(ED_SHORTCUT("editor/stop", TTR("Stop"), KEY_F8));
|
stop_button->set_shortcut(ED_SHORTCUT("editor/stop", TTR("Stop"), KEY_F8));
|
||||||
|
|
||||||
run_native = memnew(EditorRunNative);
|
run_native = memnew(EditorRunNative);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue