mirror of
https://github.com/nicbarker/clay.git
synced 2026-04-19 01:31:18 +00:00
small fixes
This commit is contained in:
parent
cac8451491
commit
997145568f
2 changed files with 3 additions and 3 deletions
2
clay.h
2
clay.h
|
|
@ -589,7 +589,7 @@ typedef struct {
|
|||
|
||||
// Controls settings related to element borders.
|
||||
typedef struct Clay_TransitionElementConfig {
|
||||
bool (*handler)(Clay_TransitionCallbackArguments properties);
|
||||
bool (*handler)(Clay_TransitionCallbackArguments arguments);
|
||||
float duration;
|
||||
Clay_TransitionProperty properties;
|
||||
} Clay_TransitionElementConfig;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ Clay_String* FrameAllocateString(Clay_String string) {
|
|||
return allocated;
|
||||
}
|
||||
|
||||
bool EaseOut(Clay_TransitionCallbackArguments arguments) {
|
||||
bool Clay_EaseOut(Clay_TransitionCallbackArguments arguments) {
|
||||
float ratio = arguments.elapsedTime / arguments.duration;
|
||||
if (arguments.elapsedTime < arguments.duration) {
|
||||
float lerpAmount = (1 - powf(1 - ratio, 3.0f));
|
||||
|
|
@ -230,7 +230,7 @@ Clay_RenderCommandArray CreateLayout(void) {
|
|||
.cornerRadius = {12, 12, 12, 12},
|
||||
.border = { darker, CLAY_BORDER_OUTSIDE(3) },
|
||||
.transitions = {
|
||||
.handler = EaseOut,
|
||||
.handler = Clay_EaseOut,
|
||||
.duration = 0.5,
|
||||
.properties = CLAY_TRANSITION_PROPERTY_BACKGROUND_COLOR | CLAY_TRANSITION_PROPERTY_BOUNDING_BOX
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue