Merge pull request #30589 from Chaosus/vs_boolean_fix
Better boolean indication in visual shaders
This commit is contained in:
commit
b3745e3fe9
1 changed files with 3 additions and 0 deletions
|
@ -542,6 +542,9 @@ void VisualShaderEditor::_update_graph() {
|
||||||
button->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
|
button->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
|
||||||
button->connect("draw", this, "_draw_color_over_button", varray(button, default_value));
|
button->connect("draw", this, "_draw_color_over_button", varray(button, default_value));
|
||||||
} break;
|
} break;
|
||||||
|
case Variant::BOOL: {
|
||||||
|
button->set_text(((bool)default_value) ? "true" : "false");
|
||||||
|
} break;
|
||||||
case Variant::INT:
|
case Variant::INT:
|
||||||
case Variant::REAL: {
|
case Variant::REAL: {
|
||||||
button->set_text(String::num(default_value, 4));
|
button->set_text(String::num(default_value, 4));
|
||||||
|
|
Loading…
Reference in a new issue