menu kinda works
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@108 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
aa92f0c31e
commit
4dc4093119
7 changed files with 120 additions and 25 deletions
27
src/core.c
27
src/core.c
|
|
@ -3,36 +3,49 @@
|
|||
|
||||
#include "stb_ds.h"
|
||||
|
||||
static void lldrawhandler(MwLL handle) {
|
||||
static void lldrawhandler(MwLL handle, void* data) {
|
||||
MwWidget h = (MwWidget)handle->user;
|
||||
|
||||
(void)data;
|
||||
|
||||
MwDispatch(h, draw);
|
||||
}
|
||||
|
||||
static void lluphandler(MwLL handle) {
|
||||
static void lluphandler(MwLL handle, void* data) {
|
||||
MwWidget h = (MwWidget)handle->user;
|
||||
|
||||
(void)data;
|
||||
|
||||
h->pressed = 0;
|
||||
|
||||
MwDispatch(h, click);
|
||||
}
|
||||
|
||||
static void lldownhandler(MwLL handle) {
|
||||
MwWidget h = (MwWidget)handle->user;
|
||||
h->pressed = 1;
|
||||
static void lldownhandler(MwLL handle, void* data) {
|
||||
MwWidget h = (MwWidget)handle->user;
|
||||
MwPoint* p = data;
|
||||
h->pressed = 1;
|
||||
h->pressed_point.x = p->x;
|
||||
h->pressed_point.y = p->y;
|
||||
}
|
||||
|
||||
static void llresizehandler(MwLL handle) {
|
||||
static void llresizehandler(MwLL handle, void* data) {
|
||||
MwWidget h = (MwWidget)handle->user;
|
||||
int i;
|
||||
|
||||
(void)data;
|
||||
|
||||
MwDispatchUserHandler(h, MwNresizeHandler, NULL);
|
||||
for(i = 0; i < arrlen(h->children); i++) {
|
||||
MwDispatch(h->children[i], parent_resize);
|
||||
}
|
||||
}
|
||||
|
||||
static void llclosehandler(MwLL handle) {
|
||||
static void llclosehandler(MwLL handle, void* data) {
|
||||
MwWidget h = (MwWidget)handle->user;
|
||||
|
||||
(void)data;
|
||||
|
||||
h->close = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue