From eeccc9c66ff18174486105f56e97de3eb63c5310 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 06:35:16 +0000 Subject: [PATCH] Decompile fn_09536 (UICashShopWnd_Cart::Slot15) Batch #7304 by aDw: 0 byte-identical, 1 confirmed by peer review. - fn_09536 UICashShopWnd_Cart::Slot15: logic confirmed by peer review Peer-reviewed-by: eAthena, gordaoprogramas Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/CashShop/UICashShopWnd.cpp | 23 +++++++++++++++++++++++ Source/UI/CashShop/UICashShopWnd.h | 1 + Source/UI/Lists/UIScrollBarVariants.h | 5 +++++ 3 files changed, 29 insertions(+) diff --git a/Source/UI/CashShop/UICashShopWnd.cpp b/Source/UI/CashShop/UICashShopWnd.cpp index b44b919e..790f5b56 100644 --- a/Source/UI/CashShop/UICashShopWnd.cpp +++ b/Source/UI/CashShop/UICashShopWnd.cpp @@ -364,6 +364,29 @@ void UICashShopWnd::Slot15(int, int) { } } +// OFFSET: 0x007CF760 +// FUNCTION: fn_09536 +void UICashShopWnd_Cart::Slot15(int, int) { + this->m_scrollBar = new UIScrollBar_Custom(*this->m_context); + this->m_scrollBar->Configure(this->geometry.width - 7, 0, this->geometry.height, 1, 7, 7); + this->m_scrollBar->SetArrowBitmaps("유저인터페이스\\cashshop\\shop_scroll_up.bmp", "유저인터페이스\\cashshop\\shop_scroll_down.bmp"); + this->m_scrollBar->SetThumbBitmaps( + "유저인터페이스\\cashshop\\shop_bar_up.bmp", "유저인터페이스\\cashshop\\shop_bar_mid.bmp", "유저인터페이스\\cashshop\\shop_bar_down.bmp" + ); + this->AddChild(this->m_scrollBar); + + int y = 5; + for (int index = 0; index < this->m_visibleCount; ++index) { + UICashShopWnd_CartItem* item = new UICashShopWnd_CartItem(*this->m_context, *this->m_controls); + item->SetSize(0xAC, 0x36); + item->Move(3, y); + item->Show(0); + this->AddChild(item); + this->m_slots.push_back(item); + y += 0x39; + } +} + // OFFSET: 0x007CFB20 // FUNCTION: fn_09537 void UICashShopWnd_CartItem::Slot15(int, int) { diff --git a/Source/UI/CashShop/UICashShopWnd.h b/Source/UI/CashShop/UICashShopWnd.h index bc6e49b5..525b7e9c 100644 --- a/Source/UI/CashShop/UICashShopWnd.h +++ b/Source/UI/CashShop/UICashShopWnd.h @@ -70,6 +70,7 @@ public: } void Slot10(int x, int y, std::intptr_t value) override; + void Slot15(int width, int height) override; void Paint() override; void Slot35(int delta) override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; diff --git a/Source/UI/Lists/UIScrollBarVariants.h b/Source/UI/Lists/UIScrollBarVariants.h index 44095800..d24c0fc7 100644 --- a/Source/UI/Lists/UIScrollBarVariants.h +++ b/Source/UI/Lists/UIScrollBarVariants.h @@ -32,6 +32,11 @@ public: class UIScrollBar_Custom : public UIScrollBar { public: + explicit UIScrollBar_Custom(UIWindowContext& windows) + : UIScrollBar(windows), m_trackTop(nullptr), m_trackMiddle(nullptr), m_trackBottom(nullptr), m_arrowUp(nullptr), m_arrowDown(nullptr), + m_thumbTop(nullptr), m_thumbMiddle(nullptr), m_thumbBottom(nullptr) { + } + /* 00B4 */ CBitmapRes* m_trackTop; /* 00B8 */ CBitmapRes* m_trackMiddle; /* 00BC */ CBitmapRes* m_trackBottom;