mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Double precision of String.split_floats
This commit is contained in:
parent
8aafcf9d2a
commit
e791f4fce2
6 changed files with 16 additions and 15 deletions
|
@ -1860,7 +1860,7 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
|
|||
if (valid) {
|
||||
color_args = line.substr(begin, end - begin);
|
||||
String stripped = color_args.replace(" ", "").replace("(", "").replace(")", "");
|
||||
Vector<float> color = stripped.split_floats(",");
|
||||
PackedFloat64Array color = stripped.split_floats(",");
|
||||
if (color.size() > 2) {
|
||||
float alpha = color.size() > 3 ? color[3] : 1.0f;
|
||||
color_picker->set_pick_color(Color(color[0], color[1], color[2], alpha));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue