Make the editor dimming smarter
This commit is contained in:
parent
23a381d882
commit
36c4fd8935
4 changed files with 23 additions and 5 deletions
|
|
@ -5171,14 +5171,20 @@ void EditorNode::_open_imported() {
|
|||
}
|
||||
|
||||
void EditorNode::dim_editor(bool p_dimming, bool p_force_dim) {
|
||||
// Dimming can be forced regardless of the editor setting, which is useful when quitting the editor
|
||||
// Dimming can be forced regardless of the editor setting, which is useful when quitting the editor.
|
||||
if ((p_force_dim || EditorSettings::get_singleton()->get("interface/editor/dim_editor_on_dialog_popup")) && p_dimming) {
|
||||
dimmed = true;
|
||||
gui_base->set_modulate(Color(0.5, 0.5, 0.5));
|
||||
} else {
|
||||
dimmed = false;
|
||||
gui_base->set_modulate(Color(1, 1, 1));
|
||||
}
|
||||
}
|
||||
|
||||
bool EditorNode::is_editor_dimmed() const {
|
||||
return dimmed;
|
||||
}
|
||||
|
||||
void EditorNode::open_export_template_manager() {
|
||||
|
||||
export_template_manager->popup_manager();
|
||||
|
|
@ -5487,6 +5493,7 @@ EditorNode::EditorNode() {
|
|||
|
||||
singleton = this;
|
||||
exiting = false;
|
||||
dimmed = false;
|
||||
last_checked_version = 0;
|
||||
changing_scene = false;
|
||||
_initializing_addons = false;
|
||||
|
|
|
|||
|
|
@ -260,6 +260,7 @@ private:
|
|||
int tab_closing;
|
||||
|
||||
bool exiting;
|
||||
bool dimmed;
|
||||
|
||||
int old_split_ofs;
|
||||
VSplitContainer *top_split;
|
||||
|
|
@ -850,6 +851,7 @@ public:
|
|||
void restart_editor();
|
||||
|
||||
void dim_editor(bool p_dimming, bool p_force_dim = false);
|
||||
bool is_editor_dimmed() const;
|
||||
|
||||
void edit_current() { _edit_current(); };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue