mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-22 00:48:09 +01:00
Added an another piece of missing code. Now properties arrays work.
This commit is contained in:
parent
2e48acd426
commit
54e735c1f2
@ -2289,6 +2289,23 @@ void EditorInspector::update_tree() {
|
||||
}
|
||||
}
|
||||
|
||||
if (!array_prefix.empty()) {
|
||||
// If we have an array element, find the according index in array.
|
||||
String str = p.name.trim_prefix(array_prefix);
|
||||
int to_char_index = 0;
|
||||
while (to_char_index < str.length()) {
|
||||
if (str[to_char_index] < '0' || str[to_char_index] > '9') {
|
||||
break;
|
||||
}
|
||||
to_char_index++;
|
||||
}
|
||||
if (to_char_index > 0) {
|
||||
array_index = str.left(to_char_index).to_int();
|
||||
} else {
|
||||
array_prefix = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (!array_prefix.empty()) {
|
||||
path = path.trim_prefix(array_prefix);
|
||||
int char_index = path.find("/");
|
||||
|
Loading…
Reference in New Issue
Block a user