1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Merge pull request #32068 from aaronfranke/transform-editor

Reformat Transform(2D) matrix display in the inspector
This commit is contained in:
Rémi Verschelde
2021-09-15 13:06:25 +02:00
committed by GitHub
4 changed files with 95 additions and 99 deletions

View File

@@ -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;
}