diff --git a/src/df/core/df_core.mdesk b/src/df/core/df_core.mdesk index d74ccae1..9649d87f 100644 --- a/src/df/core/df_core.mdesk +++ b/src/df/core/df_core.mdesk @@ -508,6 +508,7 @@ DF_CoreViewRuleTable: { {Null null "" - - - - "" - "" "" } {Array array "array" - - x - "Array" x "x:{expr}" "Specifies that a pointer points to N elements, rather than only 1." } + {Slice slice "slice" - - x - "Slice" x "" "Specifies that a pointer within a struct, also containing an integer, points to the number of elements encoded by the integer." } {List list "list" - - - x "List" x "x:{member}" "Specifies that some struct, union, or class forms the top of a linked list, and the member which points at the following element in the list." } {ByteSwap bswap "bswap" x - x - "Byte Swap" x "" "Specifies that all integer primitives should be byte-swapped, such that their endianness is reversed." } {BaseDec base_dec "dec" x - - - "Decimal Base (Base 10)" x "" "Specifies that all integral evaluations should appear in base-10 form." } diff --git a/src/df/core/generated/df_core.meta.c b/src/df/core/generated/df_core.meta.c index fb610edb..4e2b5b5f 100644 --- a/src/df/core/generated/df_core.meta.c +++ b/src/df/core/generated/df_core.meta.c @@ -434,10 +434,11 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[221] = { str8_lit_comp("log_marker"), str8_lit_comp("Logs a marker in the application log, to denote specific points in time within the log."), str8_lit_comp(""), str8_lit_comp("Log Marker"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, }; -DF_CoreViewRuleSpecInfo df_g_core_view_rule_spec_info_table[17] = +DF_CoreViewRuleSpecInfo df_g_core_view_rule_spec_info_table[18] = { {str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, {str8_lit_comp("array"), str8_lit_comp("Array"), str8_lit_comp("x:{expr}"), str8_lit_comp("Specifies that a pointer points to N elements, rather than only 1."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_NAME(array) , 0, }, +{str8_lit_comp("slice"), str8_lit_comp("Slice"), str8_lit_comp(""), str8_lit_comp("Specifies that a pointer within a struct, also containing an integer, points to the number of elements encoded by the integer."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_NAME(slice) , 0, }, {str8_lit_comp("list"), str8_lit_comp("List"), str8_lit_comp("x:{member}"), str8_lit_comp("Specifies that some struct, union, or class forms the top of a linked list, and the member which points at the following element in the list."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(list) , }, {str8_lit_comp("bswap"), str8_lit_comp("Byte Swap"), str8_lit_comp(""), str8_lit_comp("Specifies that all integer primitives should be byte-swapped, such that their endianness is reversed."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_NAME(bswap) , 0, }, {str8_lit_comp("dec"), str8_lit_comp("Decimal Base (Base 10)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-10 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, }, diff --git a/src/df/core/generated/df_core.meta.h b/src/df/core/generated/df_core.meta.h index 8bf2e41b..fa6a23db 100644 --- a/src/df/core/generated/df_core.meta.h +++ b/src/df/core/generated/df_core.meta.h @@ -349,6 +349,7 @@ typedef enum DF_CoreViewRuleKind { DF_CoreViewRuleKind_Null, DF_CoreViewRuleKind_Array, +DF_CoreViewRuleKind_Slice, DF_CoreViewRuleKind_List, DF_CoreViewRuleKind_ByteSwap, DF_CoreViewRuleKind_BaseDec, @@ -426,6 +427,7 @@ U64 inline_unwind_index; }; DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(array); +DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(slice); DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(bswap); DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(list); DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(only); diff --git a/src/df/gfx/df_gfx.c b/src/df/gfx/df_gfx.c index 947584da..864bb02c 100644 --- a/src/df/gfx/df_gfx.c +++ b/src/df/gfx/df_gfx.c @@ -7807,9 +7807,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } ////////////////////////////// - //- rjf: attach autocomp box to root + //- rjf: attach autocomp box to root, or hide if it has not been renewed // - if(!ui_box_is_nil(autocomp_box)) + if(!ui_box_is_nil(autocomp_box) && ws->autocomp_last_frame_idx+1 >= df_frame_index()+1) { UI_Box *autocomp_root_box = ui_box_from_key(ws->autocomp_root_key); if(!ui_box_is_nil(autocomp_root_box)) @@ -7827,6 +7827,17 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) } } } + else if(!ui_box_is_nil(autocomp_box) && ws->autocomp_last_frame_idx+1 < df_frame_index()+1) + { + UI_Box *autocomp_root_box = ui_box_from_key(ws->autocomp_root_key); + if(!ui_box_is_nil(autocomp_root_box)) + { + Vec2F32 size = autocomp_box->fixed_size; + Rng2F32 window_rect = os_client_rect_from_window(ws->os); + autocomp_box->fixed_position = v2f32(window_rect.x1, window_rect.y1); + autocomp_box->rect = r2f32(autocomp_box->fixed_position, add_2f32(autocomp_box->fixed_position, size)); + } + } ////////////////////////////// //- rjf: hover eval cancelling diff --git a/src/df/gfx/df_view_rules.c b/src/df/gfx/df_view_rules.c index e76f2035..dfc86f85 100644 --- a/src/df/gfx/df_view_rules.c +++ b/src/df/gfx/df_view_rules.c @@ -39,6 +39,14 @@ DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(array) return eval; } +//////////////////////////////// +//~ rjf: "slice" + +DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(slice) +{ + return eval; +} + //////////////////////////////// //~ rjf: "list"