Decompile fn_17220 (UIWindowMgr::ProcessHotkeyAction)

Batch #12981 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_17220 UIWindowMgr::ProcessHotkeyAction: logic confirmed by peer review

Peer-reviewed-by: aDw, cremane, codeplay
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-06 03:53:15 +00:00
commit a62b1db0e7

View file

@ -2455,47 +2455,6 @@ void UIWindowMgr::DrawLoginOverlay() {
// FUNCTION: fn_17220
bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) {
switch (action) {
case 9:
if (HIBYTE(GetAsyncKeyState(VK_CONTROL))) {
break;
}
if (this->modifierKey == 0) {
if (UIWindow* window = this->LookupWindow(140)) {
window->SendMsg(nullptr, 6, 192, 0, 0, 0);
return false;
}
if (UIWindow* window = this->LookupWindow(37)) {
window->SendMsg(nullptr, 6, 216, 0, 0, 0);
return false;
}
}
if (!this->hoverWindow) {
this->RestoreInput();
return false;
}
if (GetAsyncKeyState(VK_SHIFT)) {
if (this->hoverWindow && this->hoverWindow->parent->PreviousFocusable(this->hoverWindow) == nullptr) {
this->FocusLast();
} else {
this->FocusPrevious();
}
} else if (this->hoverWindow && this->hoverWindow->parent->NextFocusable(this->hoverWindow) == nullptr) {
this->FocusFirst();
} else {
this->FocusNext();
}
return false;
case 13:
if (pressed) {
this->sub_A8CA20();
}
break;
case 18:
if (this->modifierKey == 0) {
if (UIWindow* window = this->LookupWindow(140)) {
@ -2639,6 +2598,47 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) {
return false;
}
case 9:
if (HIBYTE(GetAsyncKeyState(VK_CONTROL))) {
break;
}
if (this->modifierKey == 0) {
if (UIWindow* window = this->LookupWindow(140)) {
window->SendMsg(nullptr, 6, 192, 0, 0, 0);
return false;
}
if (UIWindow* window = this->LookupWindow(37)) {
window->SendMsg(nullptr, 6, 216, 0, 0, 0);
return false;
}
}
if (!this->hoverWindow) {
this->RestoreInput();
return false;
}
if (GetAsyncKeyState(VK_SHIFT)) {
if (this->hoverWindow && this->hoverWindow->parent->PreviousFocusable(this->hoverWindow) == nullptr) {
this->FocusLast();
} else {
this->FocusPrevious();
}
} else if (this->hoverWindow && this->hoverWindow->parent->NextFocusable(this->hoverWindow) == nullptr) {
this->FocusFirst();
} else {
this->FocusNext();
}
return false;
case 13:
if (pressed) {
this->sub_A8CA20();
}
break;
case 33:
if (this->window_4F1D4) {
this->window_4F1D4->BroadcastMsg3();
@ -2653,35 +2653,22 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) {
}
break;
case 35:
if (this->window_4F1D4) {
this->window_4F1D4->SendMsg(nullptr, 114, 0, 0, 0, 0);
}
break;
case 38:
this->ConfirmActiveDialog();
return false;
case 36:
if (this->window_4F1D4) {
this->window_4F1D4->SendMsg(nullptr, 179, 0, 0, 0, 0);
return false;
}
break;
case 40:
this->SubmitActiveDialog();
return false;
case 37:
this->CancelActiveDialog();
return false;
case 38:
this->ConfirmActiveDialog();
return false;
case 39:
this->BroadcastMessage21();
return false;
case 40:
this->SubmitActiveDialog();
return false;
case 44:
case 145:
if (pressed) {
@ -2696,6 +2683,19 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) {
return false;
}
break;
case 36:
if (this->window_4F1D4) {
this->window_4F1D4->SendMsg(nullptr, 179, 0, 0, 0, 0);
return false;
}
break;
case 35:
if (this->window_4F1D4) {
this->window_4F1D4->SendMsg(nullptr, 114, 0, 0, 0, 0);
}
break;
}
return false;