eliminate view cmds hook; just use ui hook

This commit is contained in:
Ryan Fleury
2024-09-16 09:45:54 -07:00
parent 3c262fccf3
commit 23a5c9eb44
10 changed files with 171 additions and 413 deletions
+2 -1
View File
@@ -2982,6 +2982,7 @@ ui_anim_(UI_Key key, UI_AnimParams *params)
node->first_touched_build_index = ui_state->build_index;
node->key = key;
MemoryCopyStruct(&node->params, params);
node->current = params->initial;
DLLPushBack_NPZ(&ui_nil_anim_node, slot->first, slot->last, node, slot_next, slot_prev);
}
else
@@ -2998,7 +2999,7 @@ ui_anim_(UI_Key key, UI_AnimParams *params)
{
node->params.epsilon = (node->params.target - node->params.initial) / 10000.f;
}
return node->current;;
return node->current;
}
////////////////////////////////
+1 -1
View File
@@ -903,7 +903,7 @@ read_only global UI_AnimNode ui_nil_anim_node =
};
internal F32 ui_anim_(UI_Key key, UI_AnimParams *params);
#define ui_anim(key, target_val, ...) ui_anim_((key), &(UI_AnimParams){.target = (target_val), __VA_ARGS__, .rate = (ui_state->default_animation_rate)})
#define ui_anim(key, target_val, ...) ui_anim_((key), &(UI_AnimParams){.target = (target_val), .rate = (ui_state->default_animation_rate), __VA_ARGS__})
////////////////////////////////
//~ rjf: Stacks