libaroma: control button icon, button on click & canvas image ~#libaroma #sdl #windows #windows7
the android&windows library is not made by me, but by this guy and also other guy that you can see in his code:
(please add a point to this url)
github com/MLXProjects/libaroma
code: (please change the include character "=" to what it should be
#include =stdio.h=
#include =aroma.h=
void winmain(){
int onloop=1;
void onloopoff(){
onloop=0;
}
LIBAROMA_WINDOWP win = libaroma_window(0,0,0,0,0);
int ctlx=0;
int ctly=0;
LIBAROMA_CONTROLP ctl = libaroma_ctl_progress(win, 0,
ctlx, ctly, 48, 48,
LIBAROMA_CTL_PROGRESS_INDETERMINATE|LIBAROMA_CTL_PROGRESS_CIRCULAR, 0, 0);
LIBAROMA_MSG msg;
//LIBAROMA_CONTROLP btn=libaroma_ctl_button(win,0,64,64,32,32,"test",LIBAROMA_CTL_BUTTON_FLAT,libaroma_rgb(0,0,0));
LIBAROMA_CANVASP img=libaroma_image_file("test.png",0);
LIBAROMA_CONTROLP btn=libaroma_ctl_button_icon(
win,
0,
100,100, 1, 1,
"",
img,
0,
0,
0
);
libaroma_window_show(win);
libaroma_control_set_onclick(btn,onloopoff);
while(onloop){
libaroma_window_pool(win,&msg);
}
printf("bye\n");
libaroma_window_free(win);
}
int main(int argc, char **argv){
libaroma_start();
winmain();
libaroma_end();
return 0;
}