From 68495f968a6f046b413840a3ddb6a75e080a7ebc Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 24 Nov 2025 15:33:19 +0000 Subject: [PATCH] fix git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@795 b9cfdab3-6d41-4d17-bbe4-086880011989 --- src/widget/menu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/widget/menu.c b/src/widget/menu.c index 3b8f801..0049d06 100644 --- a/src/widget/menu.c +++ b/src/widget/menu.c @@ -82,7 +82,7 @@ static void destroy(MwWidget handle) { } \ \ r.x = p.x - 5; \ - r.y = p.y - th / 2 - 5; \ + r.y = p.y + ((MwGetInteger(handle, MwNheight) - p.y * 2) - (th + 10)) / 2; \ r.width = tw + 10; \ r.height = th + 10; \ \ @@ -100,10 +100,7 @@ static void draw(MwWidget handle) { MwDrawWidgetBack(handle, &r, base, 0, MwTRUE); BEGIN_MENU_LOOP; - if(m->sub[i]->wsub != NULL) { - MwDrawFrame(handle, &r, base, MwFALSE); - MwDrawWidgetBack(handle, &r, base, 0, MwFALSE); - } else if(in_area && handle->pressed) { + if(m->sub[i]->wsub != NULL || (in_area && handle->pressed)) { MwDrawFrame(handle, &r, base, MwFALSE); MwDrawWidgetBack(handle, &r, base, 0, MwFALSE); }