forked from pyrite-dev/milsko
fix
This commit is contained in:
parent
bf5ab45f2e
commit
fe9b08ef55
1 changed files with 5 additions and 5 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "../harvard.c"
|
#include "../harvard.c"
|
||||||
|
|
||||||
MwWidget wmain;
|
MwWidget w_main;
|
||||||
|
|
||||||
void MWAPI destroy(MwWidget handle, void* user, void* call) {
|
void MWAPI destroy(MwWidget handle, void* user, void* call) {
|
||||||
(void)handle;
|
(void)handle;
|
||||||
|
|
@ -18,7 +18,7 @@ void MWAPI activate(MwWidget handle, void* user, void* call) {
|
||||||
|
|
||||||
MwStringPrintIntoBuffer(msg, 256, "You pressed: %s", MwListBoxGet(handle, *(int*)call));
|
MwStringPrintIntoBuffer(msg, 256, "You pressed: %s", MwListBoxGet(handle, *(int*)call));
|
||||||
|
|
||||||
msgbox = MwMessageBox(wmain, msg, "wow", MwMB_ICONINFO | MwMB_BUTTONOK);
|
msgbox = MwMessageBox(w_main, msg, "wow", MwMB_ICONINFO | MwMB_BUTTONOK);
|
||||||
MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, destroy, msgbox);
|
MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, destroy, msgbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -31,10 +31,10 @@ int main() {
|
||||||
|
|
||||||
MwLibraryInit();
|
MwLibraryInit();
|
||||||
|
|
||||||
wmain = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480,
|
w_main = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480,
|
||||||
MwNtitle, "listbox",
|
MwNtitle, "listbox",
|
||||||
NULL);
|
NULL);
|
||||||
lb = MwCreateWidget(MwListBoxClass, "listbox", wmain, 5, 5, 630, 470);
|
lb = MwCreateWidget(MwListBoxClass, "listbox", w_main, 5, 5, 630, 470);
|
||||||
|
|
||||||
px = MwLoadIcon(lb, MwIconInfo);
|
px = MwLoadIcon(lb, MwIconInfo);
|
||||||
|
|
||||||
|
|
@ -57,5 +57,5 @@ int main() {
|
||||||
NULL);
|
NULL);
|
||||||
MwListBoxSetWidth(lb, 0, -128);
|
MwListBoxSetWidth(lb, 0, -128);
|
||||||
|
|
||||||
MwLoop(wmain);
|
MwLoop(w_main);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue