1,18 → 1,18 |
#ifndef KOLIBRI_BUTTON_H |
#define KOLIBRI_BUTTON_H |
|
struct kolibri_button { |
typedef struct { |
unsigned int x65536sizex; |
unsigned int y65536sizey; |
unsigned int color; |
unsigned int identifier; |
unsigned int XY; |
}; |
}kolibri_button; |
|
struct kolibri_button *kolibri_new_button(unsigned int tlx, unsigned int tly, unsigned int sizex, unsigned int sizey, |
kolibri_button *kolibri_new_button(unsigned int tlx, unsigned int tly, unsigned int sizex, unsigned int sizey, |
unsigned int identifier, unsigned int color) |
{ |
struct kolibri_button* new_button = (struct kolibri_button *)malloc(sizeof(struct kolibri_button)); |
kolibri_button* new_button = (kolibri_button *)malloc(sizeof(kolibri_button)); |
new_button -> x65536sizex = (tlx << 16) + sizex; |
new_button -> y65536sizey = (tly << 16) + sizey; |
new_button -> color = color; |
21,7 → 21,7 |
return new_button; |
} |
|
void draw_button(struct kolibri_button *some_button) |
void draw_button(kolibri_button *some_button) |
{ |
define_button(some_button -> x65536sizex, some_button -> y65536sizey, some_button -> identifier, some_button -> color); |
} |