Add option to toggle console window on Windows
This is an editor setting and its value can also be toggled using an entry in the Editor toolbar. The console will still appear briefly when starting the project manager or editor, as it's still compiled as console application. Does not impact exported games, which will still run without console in release and with console in debug mode. A project setting or export option could be added to disable it in debug mode if there's demand for it, but that would greatly reduce the usefulness of debug builds if Windows users can no longer report error and crash messages. Fixes #17889. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
parent
d6f8a43b60
commit
ad504b926f
7 changed files with 34 additions and 0 deletions
|
|
@ -2474,6 +2474,13 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
|||
|
||||
OS::get_singleton()->set_window_fullscreen(!OS::get_singleton()->is_window_fullscreen());
|
||||
|
||||
} break;
|
||||
case SETTINGS_TOGGLE_CONSOLE: {
|
||||
|
||||
bool was_visible = OS::get_singleton()->is_console_visible();
|
||||
OS::get_singleton()->set_console_visible(!was_visible);
|
||||
EditorSettings::get_singleton()->set_setting("interface/editor/hide_console_window", !was_visible);
|
||||
|
||||
} break;
|
||||
case SETTINGS_PICK_MAIN_SCENE: {
|
||||
|
||||
|
|
@ -5873,6 +5880,9 @@ EditorNode::EditorNode() {
|
|||
p->add_shortcut(ED_SHORTCUT("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KEY_MASK_CMD | KEY_MASK_CTRL | KEY_F), SETTINGS_TOGGLE_FULLSCREEN);
|
||||
#else
|
||||
p->add_shortcut(ED_SHORTCUT("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KEY_MASK_SHIFT | KEY_F11), SETTINGS_TOGGLE_FULLSCREEN);
|
||||
#endif
|
||||
#ifdef WINDOWS_ENABLED
|
||||
p->add_item(TTR("Toggle System Console"), SETTINGS_TOGGLE_CONSOLE);
|
||||
#endif
|
||||
p->add_separator();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue