From 9e9bdff93f23cee8a57afa8fec74e63f54de3355 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 17:21:28 +0000 Subject: [PATCH] Decompile fn_15406 (GameSettingsUI::CUIOptionItem::Slot15) Batch #8369 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_15406 GameSettingsUI::CUIOptionItem::Slot15: logic confirmed by peer review Peer-reviewed-by: Yommy, System4z, SapitoSucio, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/GameSettings/GameSettingsUI.cpp | 83 +++++++++++++++++++++++ Source/UI/GameSettings/GameSettingsUI.h | 1 + 2 files changed, 84 insertions(+) diff --git a/Source/UI/GameSettings/GameSettingsUI.cpp b/Source/UI/GameSettings/GameSettingsUI.cpp index 2dfc2fc3..283458d7 100644 --- a/Source/UI/GameSettings/GameSettingsUI.cpp +++ b/Source/UI/GameSettings/GameSettingsUI.cpp @@ -21,6 +21,7 @@ #include "Resource/ResourcePreload.h" #include "Script/LuaScript.h" #include "UI/Buttons/UIRadioButton.h" +#include "UI/Dialogs/UITipboxWnd.h" #include "UI/Lists/UIVScrollBar.h" #include "UI/Text/UIStaticTextControl.h" #include "UI/Window/UINewSelectCharWnd.h" @@ -3108,3 +3109,85 @@ void CUIGameSettingsUI::Slot16() { page->LoadOptions(this->m_tab->FindButton(page)->geometry.id); } } + +// OFFSET: 0x00A33250 +// FUNCTION: fn_15406 +void GameSettingsUI::CUIOptionItem::Slot15(int width, int height) { + this->m_check = new CUICheckBox(*this->m_context); + this->m_check->SetSize(34, 15); + this->m_check->Move(8, 5); + this->m_check->SetOnCheck([this](bool checked) { this->OnCheck(checked); }); + this->m_check->disabled = 0; + this->m_check->Invalidate(); + const std::uint8_t checkInactiveSource[] = {0x6B, 0x00, 0x4D, 0x77, 0x73, 0x43, 0x62, 0x18, 0x6D, 0x4B, 0x4D, 0x41, 0x0E, 0x37, 0xFB, 0x92, 0xCA, 0xC2, 0xE8, 0xDE, 0xD6, 0xF9, 0xD3, 0xBC, 0xC5, 0xC8, 0xFE, 0xD8, 0xFA, 0xD1, 0xD3, 0xBA, 0xCC, 0xC8, 0xE1, 0xE8, 0xEC, 0xE2, 0xC1, 0xB3, 0x85, 0xCD, 0xE0, 0xFD, 0xB3}; + thread_local EncryptedName checkInactive(checkInactiveSource); + const std::uint8_t checkPressedSource[] = {0xCF, 0xE0, 0x85, 0x55, 0x5D, 0x8B, 0x5C, 0xCE, 0xC9, 0xAB, 0x85, 0x63, 0x20, 0xFF, 0xC5, 0x44, 0x6E, 0x22, 0x20, 0xFC, 0xF8, 0x31, 0xED, 0x6A, 0x61, 0x28, 0x36, 0xFA, 0xD4, 0x19, 0xED, 0x6C, 0x68, 0x28, 0x29, 0xCA, 0xC2, 0x2A, 0xFF, 0x65, 0x21, 0x2D, 0x28, 0xDF, 0x9D}; + thread_local EncryptedName checkPressed(checkPressedSource); + const std::uint8_t checkHoverSource[] = {0xB3, 0x40, 0x7B, 0x2B, 0x15, 0x2D, 0x6E, 0x32, 0xB5, 0x0B, 0x7B, 0x1D, 0x68, 0x59, 0xF7, 0xB8, 0x12, 0x82, 0xDE, 0x82, 0xB0, 0x97, 0xDF, 0x96, 0x1D, 0x88, 0xC8, 0x84, 0x9C, 0xBF, 0xDF, 0x90, 0x14, 0x88, 0xD7, 0xB4, 0x8A, 0x8C, 0xC5, 0xD1, 0x11, 0x82, 0xCB, 0xD1}; + thread_local EncryptedName checkHover(checkHoverSource); + const std::uint8_t checkNormalSource[] = {0x15, 0x96, 0xEB, 0xB3, 0x27, 0x69, 0x52, 0x68, 0x13, 0xDD, 0xEB, 0x85, 0x5A, 0x1D, 0xCB, 0xE2, 0xB4, 0x54, 0x4E, 0x1A, 0x82, 0xD3, 0xE3, 0xCC, 0xBB, 0x5E, 0x58, 0x1C, 0xAE, 0xFB, 0xE3, 0xCA, 0xB2, 0x5E, 0x47, 0x2C, 0xB8, 0xC8, 0xF1, 0xC3, 0xFB, 0x5B, 0x46, 0x39, 0xE7}; + thread_local EncryptedName checkNormal(checkNormalSource); + this->m_check->SetImages(std::string(checkNormal.Text()), std::string(checkHover.Text()), std::string(checkPressed.Text()), std::string(checkInactive.Text())); + this->m_check->checked = false; + this->m_check->Invalidate(); + this->AddChild(this->m_check); + + CUIImageButton* runButton = new CUIImageButton(*this->m_context); + this->unknown_00EC = runButton; + runButton->SetSize(34, 15); + runButton->Move(7, 5); + runButton->SetOnClick([this]() { this->RunFunction(); }); + runButton->disabled = 0; + runButton->Invalidate(); + const std::uint8_t applyDisabledSource[] = {0x17, 0x3A, 0xDF, 0x61, 0x91, 0x8B, 0x42, 0xC6, 0x11, 0x71, 0xDF, 0x57, 0xEC, 0xFF, 0xDB, 0x4C, 0xB6, 0xF8, 0x7A, 0xC8, 0x34, 0x31, 0xF3, 0x62, 0xB9, 0xF2, 0x6C, 0xCE, 0x18, 0x19, 0xE5, 0x7F, 0xB9, 0xCA, 0x70, 0xEB, 0x25, 0x2C, 0xE8, 0x65, 0xB6, 0xE5, 0x6F, 0xF7, 0x28, 0x1A, 0xE3, 0x62, 0xA4, 0xF4, 0x7D, 0xF7, 0x34, 0x6B, 0xE5, 0x66, 0xA7, 0x95}; + thread_local EncryptedName applyDisabled(applyDisabledSource); + const std::uint8_t applyOverSource[] = {0x4F, 0xF6, 0xA1, 0x11, 0x75, 0xD7, 0xC6, 0x0A, 0x49, 0xBD, 0xA1, 0x27, 0x08, 0xA3, 0x5F, 0x80, 0xEE, 0x34, 0x04, 0xB8, 0xD0, 0x6D, 0x77, 0xAE, 0xE1, 0x3E, 0x12, 0xBE, 0xFC, 0x45, 0x61, 0xB3, 0xE1, 0x06, 0x0E, 0x9B, 0xC1, 0x70, 0x6C, 0xA9, 0xEE, 0x29, 0x11, 0x87, 0xCC, 0x46, 0x6C, 0xB1, 0xEA, 0x2B, 0x4F, 0x89, 0xD8, 0x69, 0x03}; + thread_local EncryptedName applyOver(applyOverSource); + const std::uint8_t applyPressedSource[] = {0x5F, 0x72, 0x43, 0xE5, 0xB7, 0x8B, 0xDE, 0xEA, 0x59, 0x39, 0x43, 0xD3, 0xCA, 0xFF, 0x47, 0x60, 0xFE, 0xB0, 0xE6, 0x4C, 0x12, 0x31, 0x6F, 0x4E, 0xF1, 0xBA, 0xF0, 0x4A, 0x3E, 0x19, 0x79, 0x53, 0xF1, 0x82, 0xEC, 0x6F, 0x03, 0x2C, 0x74, 0x49, 0xFE, 0xAD, 0xF3, 0x73, 0x0E, 0x1A, 0x6B, 0x55, 0xFA, 0xAE, 0xF0, 0x31, 0x15, 0x28, 0x6B, 0x27}; + thread_local EncryptedName applyPressed(applyPressedSource); + const std::uint8_t applyNormalSource[] = {0xD7, 0xFE, 0x21, 0xBB, 0xF9, 0x0D, 0x46, 0x4A, 0xD1, 0xB5, 0x21, 0x8D, 0x84, 0x79, 0xDF, 0xC0, 0x76, 0x3C, 0x84, 0x12, 0x5C, 0xB7, 0xF7, 0xEE, 0x79, 0x36, 0x92, 0x14, 0x70, 0x9F, 0xE1, 0xF3, 0x79, 0x0E, 0x8E, 0x31, 0x4D, 0xAA, 0xEC, 0xE9, 0x76, 0x21, 0x91, 0x2D, 0x40, 0x9C, 0xEC, 0xF2, 0x63, 0x7F, 0x83, 0x2C, 0x49, 0xC3}; + thread_local EncryptedName applyNormal(applyNormalSource); + runButton->SetImages(std::string(applyNormal.Text()), std::string(applyPressed.Text()), std::string(applyOver.Text()), std::string(applyDisabled.Text())); + this->AddChild(this->unknown_00EC); + + this->m_label = new CUITextButton(*this->m_context); + this->m_label->SetSize(85, 13); + this->m_label->Move(47, 6); + this->m_label->SetOnClick([this]() { + if (this->m_label->geometry.id > 0) { + if (UITipboxWnd* tipbox = static_cast(g_windowMgr.EnsureWindow(0x13B))) { + tipbox->ShowTip(this->m_label->geometry.id); + } + } + }); + this->m_label->disabled = 0; + this->m_label->Invalidate(); + this->m_label->SetText(std::string()); + this->m_label->SetFitText(true); + this->m_label->SetAlign(0, 0); + const std::uint8_t labelFontSource[] = {0x7A, 0x34, 0xE7, 0xA0, 0x94, 0x1B}; + thread_local EncryptedName labelFont(labelFontSource); + this->m_label->SetFont(std::string(labelFont.Text())); + this->m_label->SetFontHeight(12); + this->m_label->SetBold(1); + this->m_label->SetTextColors(0, 0, 0, 0); + this->m_label->SetShadow(false, 0xFFFFFF); + this->m_label->SetOutline(false, 0xFFFFFF); + this->AddChild(this->m_label); + + this->m_description = new CUIStaticText(*this->m_context); + this->m_description->SetSize(252, 13); + this->m_description->Move(138, 6); + this->m_description->SetText("", 0); + this->m_description->SetFitText(1); + this->m_description->SetAlign(0, 0); + const std::uint8_t descriptionFontSource[] = {0x16, 0x80, 0xA3, 0x20, 0x92, 0x17}; + thread_local EncryptedName descriptionFont(descriptionFontSource); + this->m_description->SetFont(std::string(descriptionFont.Text())); + this->m_description->SetFontHeight(12); + this->m_description->SetBold(0); + this->m_description->SetColor(0); + this->m_description->SetShadow(0, 0xFFFFFF); + this->m_description->SetOutline(0, 0xFFFFFF); + this->AddChild(this->m_description); +} diff --git a/Source/UI/GameSettings/GameSettingsUI.h b/Source/UI/GameSettings/GameSettingsUI.h index f26c6586..8d909d45 100644 --- a/Source/UI/GameSettings/GameSettingsUI.h +++ b/Source/UI/GameSettings/GameSettingsUI.h @@ -314,6 +314,7 @@ public: class CUIOptionItem : public CUIListItem { public: + void Slot15(int width, int height) override; void Slot16() override; void Paint() override; void RunFunction();