Merge pull request #30589 from Chaosus/vs_boolean_fix

Better boolean indication in visual shaders
This commit is contained in:
Yuri Roubinsky 2019-07-15 08:47:31 +03:00 committed by GitHub
commit b3745e3fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -542,6 +542,9 @@ void VisualShaderEditor::_update_graph() {
button->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
button->connect("draw", this, "_draw_color_over_button", varray(button, default_value));
} break;
case Variant::BOOL: {
button->set_text(((bool)default_value) ? "true" : "false");
} break;
case Variant::INT:
case Variant::REAL: {
button->set_text(String::num(default_value, 4));