Clarify GNW_check_menu_bars param

This commit is contained in:
Alexander Batalov 2023-07-21 11:02:54 +03:00
parent 6dcbcb97ad
commit f6cfc1fa3a
2 changed files with 5 additions and 6 deletions

View File

@ -1257,19 +1257,18 @@ Button* buttonGetButton(int btn, Window** windowPtr)
}
// 0x4D7A34
int _GNW_check_menu_bars(int a1)
int _GNW_check_menu_bars(int input)
{
if (!gWindowSystemInitialized) {
return -1;
}
int v1 = a1;
for (int index = gWindowsLength - 1; index >= 1; index--) {
Window* window = gWindows[index];
if (window->menuBar != NULL) {
for (int pulldownIndex = 0; pulldownIndex < window->menuBar->pulldownsLength; pulldownIndex++) {
if (v1 == window->menuBar->pulldowns[pulldownIndex].keyCode) {
v1 = _GNW_process_menu(window->menuBar, pulldownIndex);
if (input == window->menuBar->pulldowns[pulldownIndex].keyCode) {
input = _GNW_process_menu(window->menuBar, pulldownIndex);
break;
}
}
@ -1280,7 +1279,7 @@ int _GNW_check_menu_bars(int a1)
}
}
return v1;
return input;
}
// 0x4D69DC

View File

@ -177,7 +177,7 @@ int windowGetWidth(int win);
int windowGetHeight(int win);
int windowGetRect(int win, Rect* rect);
int _win_check_all_buttons();
int _GNW_check_menu_bars(int a1);
int _GNW_check_menu_bars(int input);
void programWindowSetTitle(const char* title);
bool showMesageBox(const char* str);
int buttonCreate(int win, int x, int y, int width, int height, int mouseEnterEventCode, int mouseExitEventCode, int mouseDownEventCode, int mouseUpEventCode, unsigned char* up, unsigned char* dn, unsigned char* hover, int flags);