From fa18a528ca88dd0f11dd82947ccedca3f610d6be Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 12:35:53 +0000 Subject: [PATCH] Decompile fn_12930 (UITransMenuWnd::OnMouseMove) Batch #15988 by Yommy: 1 byte-identical, 0 confirmed by peer review. - fn_12930 UITransMenuWnd::OnMouseMove: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/UI/Window/UITransMenuWnd.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/UI/Window/UITransMenuWnd.cpp b/Source/UI/Window/UITransMenuWnd.cpp index 2b74a1168..0418c865c 100644 --- a/Source/UI/Window/UITransMenuWnd.cpp +++ b/Source/UI/Window/UITransMenuWnd.cpp @@ -43,13 +43,12 @@ void UITransMenuWnd::OnLBtnDown(int x, int y) { void UITransMenuWnd::OnMouseMove(int x, int y) { const int margin = this->m_margin; const int previous = this->m_selected; - int selected = -1; - if (margin <= y) { - const unsigned count = this->m_items.size(); - if ((this->m_lineHeight + margin / 2) * count + margin >= static_cast(y)) { - const int cellHeight = (this->geometry.height - 2 * margin) / count; - selected = (y - margin) / cellHeight; - } + int selected; + if (margin <= y && (this->m_lineHeight + margin / 2) * this->m_items.size() + margin >= static_cast(y)) { + const int cellHeight = (this->geometry.height - 2 * margin) / this->m_items.size(); + selected = (y - margin) / cellHeight; + } else { + selected = -1; } this->m_selected = selected;