From a5687e79cf65dcdd147ef33db8c9920f32eeca29 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 14:08:52 +0000 Subject: [PATCH] Decompile fn_12174 (UIGraffiStrboxWnd::OnCreate) Batch #15880 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_12174 UIGraffiStrboxWnd::OnCreate: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, Yommy, alisonrag Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Dialogs/UIGraffiStrboxWnd.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Source/UI/Dialogs/UIGraffiStrboxWnd.cpp b/Source/UI/Dialogs/UIGraffiStrboxWnd.cpp index aa3fce105..f0ec46986 100644 --- a/Source/UI/Dialogs/UIGraffiStrboxWnd.cpp +++ b/Source/UI/Dialogs/UIGraffiStrboxWnd.cpp @@ -21,22 +21,12 @@ void UIGraffiStrboxWnd::OnCreate(int, int) { const char* names[2][3] = {{"btn_ok", "btn_ok_a", "btn_ok_b"}, {"btn_cancel", "btn_cancel_a", "btn_cancel_b"}}; int ids[2] = {184, 185}; int positions[2][2] = {{189, 96}, {234, 96}}; - std::string name; for (int index = 0; index < 2; ++index) { auto* button = new UIBitmapButton(); - name.assign(prefix); - name += names[index][0]; - name += ".bmp"; - button->SetBitmap(name.c_str(), 0, 0); - name.assign(prefix); - name += names[index][1]; - name += ".bmp"; - button->SetBitmap(name.c_str(), 1, 0); - name.assign(prefix); - name += names[index][2]; - name += ".bmp"; - button->SetBitmap(name.c_str(), 2, 0); + for (int state = 0; state < 3; ++state) { + button->SetBitmap((prefix + names[index][state] + ".bmp").c_str(), state, 0); + } button->SetSize(button->BitmapWidth(), button->BitmapHeight()); button->Move(positions[index][0], positions[index][1]); button->SetId(ids[index]);