From a7abf397c670da90ebba4acc10339c5cd314360e Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 10:01:16 +0000 Subject: [PATCH] Decompile fn_12654 (UIShortCutWnd::OnCreate) Batch #18141 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_12654 UIShortCutWnd::OnCreate: logic confirmed by peer review Peer-reviewed-by: Yommy, KWDev, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Shortcuts/ShortcutControls.cpp | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Source/UI/Shortcuts/ShortcutControls.cpp b/Source/UI/Shortcuts/ShortcutControls.cpp index 1e7ec73c0..b4874d84b 100644 --- a/Source/UI/Shortcuts/ShortcutControls.cpp +++ b/Source/UI/Shortcuts/ShortcutControls.cpp @@ -7,6 +7,7 @@ #include "Resource/MSGSTRINGID.h" #include +#include #include #include @@ -15,9 +16,7 @@ void UIShortCutWnd::OnCreate(int, int) { this->AddCloseButton("F12", 0)->Move(this->geometry.width - 10, 0); - for (int index = 0; index < 36; ++index) { - this->m_slots[index] = nullptr; - } + std::memset(this->m_slots, 0, sizeof(this->m_slots)); this->m_bank = new (std::nothrow) UICheckBox(); this->m_bank->SetSize(10, 26); @@ -37,8 +36,9 @@ void UIShortCutWnd::OnCreate(int, int) { this->m_decrease->SetBitmap("유저인터페이스\\Shortcut\\btn_minus_press.bmp", 2, 0); this->m_decrease->SetSize(this->m_decrease->BitmapWidth(), this->m_decrease->BitmapHeight()); this->m_decrease->SetId(217); - this->m_decrease->SetDisabled(0); - this->m_decrease->Invalidate(); + UIBitmapButton* decreaseButton = this->m_decrease; + decreaseButton->SetDisabled(0); + decreaseButton->Invalidate(); this->m_decrease->Move(276, 0); this->m_decrease->Enable(0); this->AddChild(this->m_decrease); @@ -50,13 +50,14 @@ void UIShortCutWnd::OnCreate(int, int) { this->m_increase->SetBitmap("유저인터페이스\\Shortcut\\btn_plus_disable.bmp", 3, 0); this->m_increase->SetSize(this->m_increase->BitmapWidth(), this->m_increase->BitmapHeight()); this->m_increase->SetId(216); - this->m_increase->SetDisabled(0); - this->m_increase->Invalidate(); + UIBitmapButton* increaseButton = this->m_increase; + increaseButton->SetDisabled(0); + increaseButton->Invalidate(); this->m_increase->Move(276, 19); this->m_increase->Enable(1); this->AddChild(this->m_increase); - std::fill(std::begin(this->m_itemSlots), std::end(this->m_itemSlots), nullptr); + std::fill_n(this->m_itemSlots, 9, nullptr); this->m_showItems = new UIBitmapButton(); this->m_showItems->SetBitmap("유저인터페이스\\Shortcut\\btn_open_itemslot_normal.bmp", 0, 0); @@ -64,8 +65,9 @@ void UIShortCutWnd::OnCreate(int, int) { this->m_showItems->SetBitmap("유저인터페이스\\Shortcut\\btn_open_itemslot_press.bmp", 2, 0); this->m_showItems->SetSize(this->m_showItems->BitmapWidth(), this->m_showItems->BitmapHeight()); this->m_showItems->SetId(588); - this->m_showItems->SetDisabled(1); - this->m_showItems->Invalidate(); + UIBitmapButton* showItemsButton = this->m_showItems; + showItemsButton->SetDisabled(1); + showItemsButton->Invalidate(); this->m_showItems->Move(247, 33); this->m_showItems->Enable(0); this->AddChild(this->m_showItems); @@ -76,8 +78,9 @@ void UIShortCutWnd::OnCreate(int, int) { this->m_hideItems->SetBitmap("유저인터페이스\\Shortcut\\btn_close_itemslot_press.bmp", 2, 0); this->m_hideItems->SetSize(this->m_hideItems->BitmapWidth(), this->m_hideItems->BitmapHeight()); this->m_hideItems->SetId(589); - this->m_hideItems->SetDisabled(0); - this->m_hideItems->Invalidate(); + UIBitmapButton* hideItemsButton = this->m_hideItems; + hideItemsButton->SetDisabled(0); + hideItemsButton->Invalidate(); this->m_hideItems->Move(247, 33); this->m_hideItems->Enable(1); this->AddChild(this->m_hideItems);