summaryrefslogtreecommitdiff
path: root/editor/doc
diff options
context:
space:
mode:
authorBernhard Liebl <Bernhard.Liebl@gmx.org>2017-12-15 16:43:27 +0100
committerBernhard Liebl <Bernhard.Liebl@gmx.org>2018-07-31 17:56:48 +0200
commitba974b8d1e245818d819791bd628e70ec3b92de3 (patch)
tree59a47903e6a0233d041a6938ea2a6cb5f9fe6a63 /editor/doc
parent4e4702e3868af342b0e2964c7753fa4a3aa83af8 (diff)
Allow some non-integer built-in constants in gdscript
Diffstat (limited to 'editor/doc')
-rw-r--r--editor/doc/doc_data.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp
index 2803762973..91a29f5717 100644
--- a/editor/doc/doc_data.cpp
+++ b/editor/doc/doc_data.cpp
@@ -535,13 +535,14 @@ void DocData::generate(bool p_basic_types) {
}
List<StringName> constants;
- Variant::get_numeric_constants_for_type(Variant::Type(i), &constants);
+ Variant::get_constants_for_type(Variant::Type(i), &constants);
for (List<StringName>::Element *E = constants.front(); E; E = E->next()) {
ConstantDoc constant;
constant.name = E->get();
- constant.value = itos(Variant::get_numeric_constant_value(Variant::Type(i), E->get()));
+ Variant value = Variant::get_constant_value(Variant::Type(i), E->get());
+ constant.value = value.get_type() == Variant::INT ? itos(value) : value.get_construct_string();
c.constants.push_back(constant);
}
}