From 276352c19ec1d9c0d7c78d5f53d7e11e26c0cd99 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 03:12:26 +0000 Subject: [PATCH] Decompile fn_11360 (UIImgMenu::Paint) Batch #7017 by superintelligence: 0 byte-identical, 1 confirmed by peer review. - fn_11360 UIImgMenu::Paint: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, kyoshi Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Buttons/UITextButton.cpp | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Source/UI/Buttons/UITextButton.cpp b/Source/UI/Buttons/UITextButton.cpp index 68641990..715c72ad 100644 --- a/Source/UI/Buttons/UITextButton.cpp +++ b/Source/UI/Buttons/UITextButton.cpp @@ -2692,3 +2692,42 @@ void UIShowAndEditTimeCtrl::Paint() { void __fastcall sub_8906C0(UINaviLinkButton* button, void*, int x, int y) { button->UINaviLinkButton::Slot25(x, y); } + +// OFFSET: 0x0088AEC0 +// FUNCTION: fn_11360 +void UIImgMenu::Paint() { + this->FillRegion(0, 0, this->geometry.width, this->geometry.height, 0x99A8AC); + this->DrawBitmap( + 1, 1, &static_cast(ResourceMgr::Instance().Load(Resolve(this->bitmapName.c_str())))->image, false + ); + + if (this->hovered < 0) { + return; + } + + char suffix[12]; + std::sprintf(suffix, "_%d.bmp", this->hovered); + const std::string path = this->baseName + suffix; + const auto* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(path.c_str()))); + + int offset = 3; + if (this->unknown_0090[this->hovered] == 0) { + offset = 0; + } + + if (this->unknown_0094[this->hovered] == 0) { + int x; + int y; + if (this->horizontal == 0) { + x = 1; + y = this->itemHeight * this->hovered + 1 + offset; + } else { + x = this->itemWidth * this->hovered + 1 + offset; + y = 1; + } + + if (bitmap) { + this->DrawBitmap(x, y, &bitmap->image, false); + } + } +} \ No newline at end of file