Custom entity UI, math functions, physics triggers
This commit is contained in:
@@ -406,7 +406,9 @@ generate_ui_procedure_for_entity :: (code_struct: *Code_Struct) {
|
||||
ui : String_Builder;
|
||||
print_to_builder(*ui, "#if EDITOR {");
|
||||
print_to_builder(*ui, "entity_ui_proc :: (e: *%) {\n", name);
|
||||
|
||||
generate_member_ui(code_struct.defined_type, *ui);
|
||||
|
||||
print_to_builder(*ui, "}\n");
|
||||
print_to_builder(*ui, "}");
|
||||
|
||||
@@ -420,7 +422,13 @@ generate_ui_procedure_for_entity_imgui :: (code_struct: *Code_Struct) {
|
||||
ui : String_Builder;
|
||||
print_to_builder(*ui, "#if EDITOR {");
|
||||
print_to_builder(*ui, "entity_ui_proc_imgui :: (e: *%) {\n", name);
|
||||
|
||||
generate_member_ui_imgui(code_struct.defined_type, *ui);
|
||||
|
||||
if wants_custom_ui(code_struct) {
|
||||
print_to_builder(*ui, "custom_ui(e);\n");
|
||||
}
|
||||
|
||||
print_to_builder(*ui, "}\n");
|
||||
print_to_builder(*ui, "}");
|
||||
|
||||
@@ -486,6 +494,15 @@ note_struct :: (code_struct: *Code_Struct) {
|
||||
}
|
||||
}
|
||||
|
||||
wants_custom_ui :: (code_struct: *Code_Struct) -> bool {
|
||||
for note: code_struct.defined_type.notes {
|
||||
if to_lower_copy(note,, allocator = temp) == "customui" {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
message: *Message_Import;
|
||||
|
||||
message_loop :: () {
|
||||
|
||||
Reference in New Issue
Block a user