diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-09-15 13:06:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 13:06:25 +0200 |
commit | a3d1bc757d90f56a5673bfd444986a8d5727f6cc (patch) | |
tree | 3467fa1ef8a099401f4705b5afa43b95a8119db0 /editor/editor_inspector.cpp | |
parent | f18a6f2fd01d1c81c7dac670c9e9321c4470eaeb (diff) | |
parent | 288f0b655540bcb5a1389eb128dcb4deb876402c (diff) | |
download | redot-engine-a3d1bc757d90f56a5673bfd444986a8d5727f6cc.tar.gz |
Merge pull request #32068 from aaronfranke/transform-editor
Reformat Transform(2D) matrix display in the inspector
Diffstat (limited to 'editor/editor_inspector.cpp')
-rw-r--r-- | editor/editor_inspector.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 6bbf0f965e..7631e425e8 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -815,6 +815,19 @@ void EditorProperty::unhandled_key_input(const Ref<InputEvent> &p_event) { } } +const Color *EditorProperty::_get_property_colors() { + const Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor")); + const float saturation = base.get_s() * 0.75; + const float value = base.get_v(); + + static Color c[4]; + c[0].set_hsv(0.0 / 3.0 + 0.05, saturation, value); + c[1].set_hsv(1.0 / 3.0 + 0.05, saturation, value); + c[2].set_hsv(2.0 / 3.0 + 0.05, saturation, value); + c[3].set_hsv(1.5 / 3.0 + 0.05, saturation, value); + return c; +} + void EditorProperty::set_label_reference(Control *p_control) { label_reference = p_control; } |