Add a theme preview switcher to the 2D viewport

This commit adds a new View submenu that allows switching
between the project theme (default), the editor theme, and
the default theme. The last selected option is stored per
project and is restored when reloading the project.
This commit is contained in:
Yuri Sizov
2023-09-06 16:11:05 +02:00
parent 512182f147
commit fc01e2e7f6
4 changed files with 85 additions and 5 deletions

View File

@@ -851,6 +851,8 @@ public:
void stop_child_process(OS::ProcessID p_pid);
Ref<Theme> get_editor_theme() const { return theme; }
void update_preview_themes(int p_mode);
Ref<Script> get_object_custom_type_base(const Object *p_object) const;
StringName get_object_custom_type_name(const Object *p_object) const;
Ref<Texture2D> get_object_icon(const Object *p_object, const String &p_fallback = "Object");