fix warnings

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@363 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-16 10:52:25 +00:00
parent c531bf45a0
commit 913a0e0136
8 changed files with 57 additions and 3 deletions

View File

@@ -14,6 +14,9 @@ void destroy(MwWidget handle, void* user, void* call) {
void activate(MwWidget handle, void* user, void* call) {
char msg[256];
MwWidget msgbox;
(void)user;
sprintf(msg, "You pressed: %s", MwListBoxGet(handle, *(int*)call));
msgbox = MwMessageBox(wmain, msg, "wow", MwMB_ICONINFO | MwMB_BUTTONOK);

View File

@@ -9,16 +9,28 @@ void ok(MwWidget handle, void* user, void* call) {
void spawn(MwWidget handle, void* user, void* call) {
MwWidget mb = MwMessageBox(user, "news has arrived!", "title", MwMB_ICONNEWS | MwMB_BUTTONOK);
(void)handle;
(void)call;
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
}
void spawn2(MwWidget handle, void* user, void* call) {
MwWidget mb = MwMessageBox(user, "something went wrong!", "title", MwMB_ICONERROR | MwMB_BUTTONOK);
(void)handle;
(void)call;
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
}
void spawn3(MwWidget handle, void* user, void* call) {
int i;
(void)handle;
(void)call;
for(i = 0; i <= 6; i++) {
MwWidget mb = MwMessageBox(user, "messagebox test", "title", i | MwMB_BUTTONOK);
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);

View File

@@ -7,6 +7,9 @@ static void resize(MwWidget handle, void* user, void* call) {
int w = MwGetInteger(handle, MwNwidth);
int h = MwGetInteger(handle, MwNheight);
(void)user;
(void)call;
MwVaApply(vp,
MwNwidth, w - 10,
MwNheight, h - 10,

View File

@@ -21,6 +21,11 @@ void tick(MwWidget handle, void* user, void* call) {
int render = 0;
int w = MwGetInteger(opengl, MwNwidth);
int h = MwGetInteger(opengl, MwNheight);
(void)handle;
(void)user;
(void)call;
if(last != t) {
char* wday[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
char* mon[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
@@ -104,6 +109,9 @@ void resize(MwWidget handle, void* user, void* call) {
int w = MwGetInteger(handle, MwNwidth);
int h = MwGetInteger(handle, MwNheight);
(void)user;
(void)call;
MwVaApply(opengl,
MwNwidth, w / 5 * 2,
MwNheight, h,

View File

@@ -23,7 +23,6 @@ static void tick(MwWidget handle, void* user, void* client) {
static void resize(MwWidget handle, void* user, void* client) {
int ww, wh;
(void)handle;
(void)user;
(void)client;
@@ -39,6 +38,9 @@ static void resize(MwWidget handle, void* user, void* client) {
}
static void key_pressed(MwWidget handle, void* user, void* client) {
(void)handle;
(void)user;
key(*(int*)client);
}

View File

@@ -23,6 +23,10 @@ static void tick(MwWidget handle, void* user, void* call) {
int w = MwGetInteger(opengl, MwNwidth);
int h = MwGetInteger(opengl, MwNheight);
(void)handle;
(void)user;
(void)call;
MwOpenGLMakeCurrent(opengl);
glClear(GL_COLOR_BUFFER_BIT);
@@ -49,6 +53,10 @@ static void tick(MwWidget handle, void* user, void* call) {
static void mouse(MwWidget handle, void* user, void* call) {
MwLLMouse* mouse = call;
(void)handle;
(void)user;
if(mouse->button == MwLLMouseLeft) {
t[ct].points[click * 2 + 0] = mouse->point.x;
t[ct].points[click * 2 + 1] = mouse->point.y;
@@ -86,8 +94,13 @@ static void mouse(MwWidget handle, void* user, void* call) {
static void mouse_move(MwWidget handle, void* user, void* call) {
MwPoint* point = call;
(void)handle;
(void)user;
mx = point->x;
my = point->y;
if(click == 2) {
t[ct].points[2 * 2 + 0] = point->x;
t[ct].points[2 * 2 + 1] = point->y;