Custom entity fields, @Hide for entity member UI, queue
This commit is contained in:
@@ -81,9 +81,47 @@ should_serialize :: (type: *Type_Info_Struct, member: Type_Info_Struct_Member) -
|
||||
return true;
|
||||
}
|
||||
|
||||
should_make_ui :: (type: *Type_Info_Struct, member: Type_Info_Struct_Member) -> bool {
|
||||
for member.notes {
|
||||
if to_lower_copy_new(it,, allocator = temp) == "hide" return false;
|
||||
}
|
||||
|
||||
if type!= null {
|
||||
if type.name == {
|
||||
case "Vector2"; {
|
||||
if member.name == {
|
||||
case "x"; #through;
|
||||
case "y"; #through;
|
||||
case; return false;
|
||||
}
|
||||
}
|
||||
case "Vector3"; {
|
||||
if member.name == {
|
||||
case "x"; #through;
|
||||
case "y"; #through;
|
||||
case "z"; return true;
|
||||
case; return false;
|
||||
}
|
||||
}
|
||||
case "Vector4"; #through;
|
||||
case "Quaternion"; {
|
||||
if member.name == {
|
||||
case "x"; #through;
|
||||
case "y"; #through;
|
||||
case "z"; #through;
|
||||
case "w"; return true;
|
||||
case; return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
generate_member_ui :: (type: *Type_Info_Struct, builder: *String_Builder, path: string = "") {
|
||||
for type.members {
|
||||
if should_serialize(type, it) {
|
||||
if should_make_ui(type, it) && should_serialize(type, it) {
|
||||
new_path : string;
|
||||
if path.count == 0 {
|
||||
new_path = it.name;
|
||||
|
||||
Reference in New Issue
Block a user