17 #include "../ckb/ckb-anim.h"
26 CKB_GUID(
"{097D69F0-70B2-48B8-AFE2-25A1CDB0D92C}");
33 CKB_PARAM_DOUBLE(
"pressestofull",
"Presses to full",
"keypresses", 10.f, 1.f, 100.f);
68 for(
int i=0; i < context->
keycount; i++){
69 anims[i].
x = context->
keys[i].
x;
70 anims[i].
y = context->
keys[i].
y;
104 unsigned int count = context->
keycount;
105 for(
unsigned int i=0; i < count; i++){
106 if(anims[i].usages && !anims[i].pressed){
108 while(anims[i].timing < 0){
109 anims[i].
timing += 1.f/30.f;
110 if(anims[i].usages > 0)
123 for(
int i =0; i < count; i++){
128 ckb_grad_color(&a, &r, &g, &b, &animcolor, ((
float)(rand() % 1024))/10.f);
130 ckb_grad_color(&a, &r, &g, &b, &animcolor, (
float)fmin(anims[i].usages,full)*100.f/full);
void ckb_keypress(ckb_runctx *context, ckb_key *key, int x, int y, int state)
void ckb_parameter(ckb_runctx *context, const char *name, const char *value)
#define CKB_PARAM_DOUBLE(name, prefix, postfix, default, min, max)
#define CKB_VERSION(version)
#define CKB_TIMEMODE(mode)
#define CKB_PARAM_LONG(name, prefix, postfix, default, min, max)
#define CKB_PARSE_AGRADIENT(param_name, gradient_ptr)
#define CKB_TIME_ABSOLUTE
#define CKB_LICENSE(license)
#define CKB_COPYRIGHT(year, author)
#define CKB_DESCRIPTION(description)
int ckb_frame(ckb_runctx *context)
#define CKB_PRESET_START(name)
void ckb_time(ckb_runctx *context, double delta)
#define CKB_PARAM_AGRADIENT(name, prefix, postfix, default)
#define CKB_LIVEPARAMS(enable)
void anim_remove(int index)
#define CKB_PARSE_LONG(param_name, value_ptr)
#define CKB_PARSE_BOOL(param_name, value_ptr)
void ckb_init(ckb_runctx *context)
#define CKB_REPEAT(enable)
#define CKB_KEYCLEAR(context)
void ckb_start(ckb_runctx *context, int state)
#define CKB_PRESET_PARAM(name, value)
#define CKB_PARSE_DOUBLE(param_name, value_ptr)
#define CKB_PARAM_BOOL(name, text, default)
void ckb_alpha_blend(ckb_key *key, float a, float r, float g, float b)
void ckb_grad_color(float *a, float *r, float *g, float *b, const ckb_gradient *grad, float pos)