mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-06 17:39:45 +00:00
better example
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@52 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -11,20 +11,14 @@ void handler(MwWidget handle, void* user_data, void* call_data){
|
||||
}
|
||||
|
||||
int main(){
|
||||
int y, x;
|
||||
MwWidget window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 400, 260,
|
||||
MwWidget window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 400, 400,
|
||||
MwNtitle, "hello world",
|
||||
NULL);
|
||||
MwWidget button = MwVaCreateWidget(MwButtonClass, "button", window, 50, 50, 300, 300,
|
||||
MwNtext, "lorem ipsum",
|
||||
NULL);
|
||||
|
||||
for(y = 0; y < 5; y++){
|
||||
for(x = 0; x < 2; x++){
|
||||
MwWidget button = MwVaCreateWidget(MwButtonClass, "button", window, 5 + 195 * x, 5 + 50 * y, 195, 50,
|
||||
MwNtext, "lorem ipsum",
|
||||
NULL);
|
||||
|
||||
MwAddUserHandler(button, MwNactivateHandler, handler, NULL);
|
||||
}
|
||||
}
|
||||
MwAddUserHandler(button, MwNactivateHandler, handler, NULL);
|
||||
|
||||
MwLoop(window);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user