eliminate view cmds hook; just use ui hook

This commit is contained in:
Ryan Fleury committed 2024-09-16 09:45:54 -07:00
1 parent 3c262fccf3
commit 23a5c9eb44
10 files changed
+171 -413

No files matched your search

-8
View File
@@ -166,11 +166,6 @@ typedef struct RD_View RD_View;
#define RD_VIEW_SETUP_FUNCTION_DEF(name) internal RD_VIEW_SETUP_FUNCTION_SIG(RD_VIEW_SETUP_FUNCTION_NAME(name))
typedef RD_VIEW_SETUP_FUNCTION_SIG(RD_ViewSetupFunctionType);
#define RD_VIEW_CMD_FUNCTION_SIG(name) void name(RD_View *view, MD_Node *params, String8 string)
#define RD_VIEW_CMD_FUNCTION_NAME(name) rd_view_cmds_##name
#define RD_VIEW_CMD_FUNCTION_DEF(name) internal RD_VIEW_CMD_FUNCTION_SIG(RD_VIEW_CMD_FUNCTION_NAME(name))
typedef RD_VIEW_CMD_FUNCTION_SIG(RD_ViewCmdFunctionType);
#define RD_VIEW_UI_FUNCTION_SIG(name) void name(RD_View *view, MD_Node *params, String8 string, Rng2F32 rect)
#define RD_VIEW_UI_FUNCTION_NAME(name) rd_view_ui_##name
#define RD_VIEW_UI_FUNCTION_DEF(name) internal RD_VIEW_UI_FUNCTION_SIG(RD_VIEW_UI_FUNCTION_NAME(name))
@@ -216,7 +211,6 @@ struct RD_ViewSpecInfo
String8 display_string;
U32 icon_kind;
RD_ViewSetupFunctionType *setup_hook;
RD_ViewCmdFunctionType *cmd_hook;
RD_ViewUIFunctionType *ui_hook;
};
@@ -542,7 +536,6 @@ struct RD_Entity
RD_EntityID id;
U64 gen;
U64 alloc_time_us;
F32 alive_t;
// rjf: basic equipment
TxtPt text_point;
@@ -1092,7 +1085,6 @@ read_only global RD_ViewSpec rd_nil_view_spec =
{0},
RD_IconKind_Null,
RD_VIEW_SETUP_FUNCTION_NAME(null),
RD_VIEW_CMD_FUNCTION_NAME(null),
RD_VIEW_UI_FUNCTION_NAME(null),
},
};