Still working on my scrolling text and bug fixing.
This commit is contained in:
@ -8,15 +8,24 @@
|
||||
#pragma once
|
||||
#include "../../libs.h"
|
||||
|
||||
#define TIMELINE_ACTION_COUNT_MAX 128
|
||||
/** Maximum number of actions a timeline can support, smaller than 0xFF */
|
||||
#define TIMELINE_ACTION_COUNT_MAX 32
|
||||
|
||||
/** Type forwarder for timeline_t */
|
||||
/** Type forwarders */
|
||||
typedef struct _timeline_t timeline_t;
|
||||
typedef struct _timelineaction_t timelineaction_t;
|
||||
|
||||
/** Callback for when a timeline event occurs */
|
||||
typedef void timelinecallback_t(timeline_t*);
|
||||
/**
|
||||
* Callback for when a timeline event occurs
|
||||
* @param timeline The timeline that fired this callback.
|
||||
* @param action The action that this callback is attached to.
|
||||
* @param i The index that this action is within the timeline.
|
||||
*/
|
||||
typedef void timelinecallback_t(timeline_t *timeline, timelineaction_t *action,
|
||||
uint8_t i
|
||||
);
|
||||
|
||||
typedef struct test_t {
|
||||
typedef struct _timelineaction_t {
|
||||
/**
|
||||
* The time that this action should occur within the timeline
|
||||
* set to 0 or less to start immediately.
|
||||
@ -33,6 +42,13 @@ typedef struct test_t {
|
||||
*/
|
||||
float duration;
|
||||
|
||||
/**
|
||||
* Enables animation looping. This works by forcing start to be equal to the
|
||||
* current time at the point in time that onEnd is called. This will also stop
|
||||
* onStart being called so ensure that your onStart and onEnd logic works.
|
||||
*/
|
||||
bool loop;
|
||||
|
||||
timelinecallback_t *onStart;
|
||||
timelinecallback_t *onDuration;
|
||||
timelinecallback_t *onEnd;
|
||||
|
Reference in New Issue
Block a user