Editor: Dim UI when a WindowDialog is shown.

Darkens the editor on WindowDialog popup.

This adds the following new Editor settings:

- interface/dim_editor_on_dialog_popup (true) # Enable/Disable editor dimming
- interface/dim_amount (0.6) # Percentage of how much the editor will be darkened (0-1)
- interface/dim_transition_time # The duration (in seconds) of the color blending effect (0-1), 0 is instant.

Please test this thoroughly, I haven't yet seen a case where it fails to work properly but I'm sure I didn't test all
windows of the editor :P
This commit is contained in:
Andreas Haas
2017-03-06 20:11:56 +01:00
parent 15c4d5006e
commit 9080232f17
4 changed files with 74 additions and 0 deletions

View File

@ -598,6 +598,13 @@ private:
void _tool_menu_insert_item(const ToolMenuItem &p_item);
void _rebuild_tool_menu() const;
bool _dimming;
float _dim_time;
Timer *_dim_timer;
void _start_dimming(bool p_dimming);
void _dim_timeout();
protected:
void _notification(int p_what);
static void _bind_methods();
@ -753,6 +760,8 @@ public:
void add_tool_submenu_item(const String &p_name, PopupMenu *p_submenu);
void remove_tool_menu_item(const String &p_name);
void dim_editor(bool p_dimming);
EditorNode();
~EditorNode();
void get_singleton(const char *arg1, bool arg2);