rodecomp/Source/UI/Lists/UIListBox.h
ragnarok-clanker 3beaf6fab8 Decompile 7 functions in Source/UI/Buttons/UIBmpRadioBtn.h, Source/UI/Buttons/UIItemMoveInfo.h, ...
Batch #7851 by Yommy: 0 byte-identical, 7 confirmed by peer review.

- fn_11021 TableBox::TableBox: logic confirmed by peer review
- fn_11084 UITableBox::UITableBox: logic confirmed by peer review
- fn_11026 UIBasicItemCtrl::UIBasicItemCtrl: logic confirmed by peer review
- fn_11027 UIBasicSkillCtrl::UIBasicSkillCtrl: logic confirmed by peer review
- fn_11028 UIBmpRadioBtn::UIBmpRadioBtn: logic confirmed by peer review
- fn_11029 UICaptchaImage::UICaptchaImage: logic confirmed by peer review
- fn_11033 UIComboBox::UIComboBox: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, eAthena, secret
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
Adds to the build: Source/UI/Buttons/UIBmpRadioBtn.cpp, Source/UI/Buttons/UIItemMoveInfo.cpp, Source/UI/Buttons/UISlotBmpButton.cpp, Source/UI/Edit/UIEditCtrl_Currency.cpp, Source/UI/Lists/TableBox.cpp, Source/UI/Lists/UIComboBoxV2Wnd.cpp, Source/UI/Lists/UIListBoxNavi.cpp, Source/UI/Lists/UIPackageBoxNameList.cpp, Source/UI/Lists/UITreeView.cpp, Source/UI/UIBasicCtrl.cpp, Source/UI/UIStaticItem.cpp
2026-10-31 12:08:59 +00:00

86 lines
2.4 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_LISTS_UILISTBOX_H
#define RAGNAROK_SOURCE_UI_LISTS_UILISTBOX_H
#include "UI/Window/UIWindow.h"
#include <string>
#include <vector>
struct FrameFocus;
class ResourceMgr;
class UIScrollBar;
class WindowManagerWindows;
struct UIListBoxContext {
FrameFocus& capture;
ResourceMgr& resources;
FontCache& fonts;
const TextLocale& locale;
const unsigned short& codePage;
WindowManagerWindows& windows;
};
class UIListBox : public UIWindow {
public:
__declspec(noinline) UIListBox(UIWindowContext& windows, UIListBoxContext& list);
~UIListBox() override;
void Resize(int width, int height) override;
void Slot15(int width, int height) override;
void Paint() override;
void Slot25(int x, int y) override;
void Slot26(int x, int y) override;
void Slot28(int x, int y) override;
void Slot32(int x, int y) override;
void Slot35(int value) override;
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
virtual void Configure(int x, int y, int width, int height, unsigned char transparent);
virtual void AddLine(const char* text);
virtual void Clear();
virtual void Refresh();
int LineAt(int x, int y) const;
int LineCount() const;
bool CopyText(char* buffer, int length);
int TextLength();
/* 007C */ int backgroundRed;
/* 0080 */ int backgroundGreen;
/* 0084 */ int backgroundBlue;
/* 0088 */ std::vector<std::string> lines;
/* 0094 */ int selected;
/* 0098 */ int topLine;
/* 009C */ int horizontalOffset;
/* 00A0 */ int contentWidth;
/* 00A4 */ int verticalOverflow;
/* 00A8 */ int bottomMargin;
/* 00AC */ UIScrollBar* verticalBar;
/* 00B0 */ UIScrollBar* horizontalBar;
/* 00B4 */ int transparent;
/* 00B8 */ int lineHeight;
/* 00BC */ int unknown_00BC;
/* 00C0 */ std::uint32_t selectionColor;
/* 00C4 */ unsigned char selectable;
/* 00C8 */ std::uint32_t textColor;
/* 00CC */ unsigned char centerVertically;
/* 00D0 */ int textInset;
protected:
UIListBoxContext* m_listContext;
};
class UIListBox2 : public UIListBox {
public:
UIListBox2(UIWindowContext& windows, UIListBoxContext& list);
void Paint() override;
/* 00D4 */ int fontFamily;
/* 00D8 */ int fontHeight;
/* 00DC */ unsigned char bold;
/* 00DD */ unsigned char italic;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(UIListBox) == 220);
#endif
#endif