Decompile fn_16203 (CUIProbabilityTable::Slot16)

Batch #6520 by System4z: 0 byte-identical, 1 confirmed by peer review.

- fn_16203 CUIProbabilityTable::Slot16: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, willerthal
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-31 01:10:13 +00:00
commit 62e7c8fb0e
2 changed files with 31 additions and 1 deletions

View file

@ -1,12 +1,18 @@
#include "UI/ProbabilityTable/UIProbabilityTable.h"
#include "UI/Lists/UIVScrollBar.h"
#include "UI/Window/UIControl.h"
#include "UI/Window/WindowBorder.h"
#include "UI/Window/UIWindowMgr.h"
#include "UI/Text/UIStaticTextControl.h"
#include "Contents/MessageTable.h"
#include "Render/Renderer.h"
#include "Utility/Cipher/XorBytes.h"
#include "Utility/Text/FormatString.h"
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <string>
namespace {
@ -267,6 +273,24 @@ void CUIListBoxEx<ProbabilityTable::CUIItem, ProbabilityTable::CItemData>::Selec
void CUIProbabilityTable::OnButtonClick() {
}
// OFFSET: 0x00A4E280
// FUNCTION: fn_16203
void CUIProbabilityTable::Slot16() {
UIWindow* anchor = g_windowMgr.LookupWindow(12);
if (anchor) {
this->Move(anchor->geometry.x + anchor->geometry.width, anchor->geometry.y);
} else {
this->Move(g_renderer->viewport.centerX, (g_renderer->viewport.height - this->geometry.height) / 2);
}
const char* title = LookupMessage(0x1017);
this->m_titleBar->SetTitle(title, std::strlen(title));
const char* name = LookupMessage(0x1018);
this->m_nameHeader->SetText(name, std::strlen(name));
const char* probability = LookupMessage(0x1019);
this->m_probabilityHeader->SetText(probability, std::strlen(probability));
}
// OFFSET: 0x00A4E030
// FUNCTION: fn_16198
void CUIProbabilityTable::OnPrepareItem(ProbabilityTable::CUIItem*, const ProbabilityTable::CItemData&) {