Decompile fn_14396 (CUITextButton::~CUITextButton)
Batch #8407 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_14396 CUITextButton::~CUITextButton: logic confirmed by peer review Peer-reviewed-by: gordaoprogramas, Romain, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
536423d509
commit
fb0904d97a
4 changed files with 81 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ class CUIPage;
|
|||
|
||||
class CUISubTab : public CUIListItem {
|
||||
public:
|
||||
explicit CUISubTab(UIWindowContext& context);
|
||||
void Slot15(int width, int height) override;
|
||||
void Slot16() override;
|
||||
|
||||
|
|
@ -60,6 +61,7 @@ public:
|
|||
|
||||
class CUITab : public CUIListItem {
|
||||
public:
|
||||
explicit CUITab(UIWindowContext& context);
|
||||
void Slot15(int width, int height) override;
|
||||
void Slot16() override;
|
||||
void SetSelected(bool selected) override;
|
||||
|
|
@ -77,6 +79,7 @@ public:
|
|||
|
||||
class CUIItemInfo : public CUIListItem {
|
||||
public:
|
||||
explicit CUIItemInfo(UIWindowContext& context);
|
||||
void Slot16() override;
|
||||
void Slot32(int x, int y) override;
|
||||
|
||||
|
|
@ -92,6 +95,7 @@ public:
|
|||
|
||||
class CUIMonsterInfo : public CUIListItem {
|
||||
public:
|
||||
explicit CUIMonsterInfo(UIWindowContext& context);
|
||||
void Slot16() override;
|
||||
void Paint() override;
|
||||
void SetMonster(const std::string& title);
|
||||
|
|
@ -105,6 +109,7 @@ public:
|
|||
|
||||
class CUIQuestInfo : public CUIListItem {
|
||||
public:
|
||||
explicit CUIQuestInfo(UIWindowContext& context);
|
||||
void Slot16() override;
|
||||
void SetStatusLines(bool first, bool second, bool third);
|
||||
void SetViewerLines(const std::vector<std::string>& lines);
|
||||
|
|
@ -119,6 +124,7 @@ public:
|
|||
|
||||
class CUITabInfo : public CUIListItem {
|
||||
public:
|
||||
explicit CUITabInfo(UIWindowContext& context);
|
||||
void Slot15(int width, int height) override;
|
||||
void Slot16() override;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class CUITextViewer : public CUIControl {
|
|||
public:
|
||||
explicit CUITextViewer(UIWindowContext& context);
|
||||
void Slot15(int width, int height) override;
|
||||
void Resize(int width, int height) override;
|
||||
void Slot19() override;
|
||||
void Paint() override;
|
||||
void Slot35(int value) override;
|
||||
|
|
@ -38,6 +39,7 @@ public:
|
|||
void SetText(const std::string& text);
|
||||
void Clear();
|
||||
void AddLine(const std::string& text);
|
||||
void Relayout();
|
||||
|
||||
/* 0080 */ int textX;
|
||||
/* 0084 */ int textY;
|
||||
|
|
|
|||
|
|
@ -1882,6 +1882,32 @@ void CUITextViewer::Clear() {
|
|||
this->Invalidate();
|
||||
}
|
||||
|
||||
// OFFSET: 0x009EA2C0
|
||||
void CUITextViewer::Relayout() {
|
||||
std::vector<std::string> lines;
|
||||
lines = std::move(this->lines);
|
||||
this->Clear();
|
||||
for (const std::string& line : lines) {
|
||||
this->AddLine(line);
|
||||
}
|
||||
this->scrollBar->SetPosition(this->scrollBar->position);
|
||||
}
|
||||
|
||||
// OFFSET: 0x009EA400
|
||||
void CUITextViewer::Resize(int width, int height) {
|
||||
const int position = this->scrollBar->position;
|
||||
UIWindow::Resize(width, height);
|
||||
this->scrollBar->Resize(this->scrollBar->geometry.width, height);
|
||||
this->padding->Resize(width, height);
|
||||
std::vector<std::string> lines;
|
||||
lines = std::move(this->lines);
|
||||
this->Clear();
|
||||
for (const std::string& line : lines) {
|
||||
this->AddLine(line);
|
||||
}
|
||||
this->scrollBar->SetPosition(position);
|
||||
}
|
||||
|
||||
// OFFSET: 0x009E9400
|
||||
// FUNCTION: fn_14503
|
||||
void CUIResizer::Paint() {
|
||||
|
|
@ -2157,6 +2183,49 @@ CUIButton::~CUIButton() {
|
|||
reinterpret_cast<Handler*>(this->unknown_00A0)->~Handler();
|
||||
}
|
||||
|
||||
// OFFSET: 0x009BFED0
|
||||
CUIImageButton::~CUIImageButton() = default;
|
||||
|
||||
// OFFSET: 0x009E1840
|
||||
// FUNCTION: fn_14396
|
||||
CUITextButton::~CUITextButton() = default;
|
||||
|
||||
// OFFSET: 0x009E1730
|
||||
CUIBasicButton::~CUIBasicButton() = default;
|
||||
|
||||
namespace AdventureGuide {
|
||||
|
||||
// OFFSET: 0x009D9150
|
||||
CUIItemInfo::CUIItemInfo(UIWindowContext& context)
|
||||
: CUIListItem(context), unknown_00E8(), unknown_00F0(nullptr), unknown_00F4(nullptr), unknown_00F8(nullptr), itemId(-1), type(21), location(-1),
|
||||
unknown_0108() {
|
||||
}
|
||||
|
||||
// OFFSET: 0x009D92D0
|
||||
CUIMonsterInfo::CUIMonsterInfo(UIWindowContext& context)
|
||||
: CUIListItem(context), unknown_00E8(nullptr), unknown_00EC(nullptr), unknown_00F0(nullptr), sprite(nullptr), action(nullptr) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x009D9420
|
||||
CUIQuestInfo::CUIQuestInfo(UIWindowContext& context)
|
||||
: CUIListItem(context), unknown_00E8(nullptr), unknown_00EC(nullptr), unknown_00F0(nullptr), unknown_00F4(nullptr), unknown_00F8(), questId(0) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x009D94D0
|
||||
CUISubTab::CUISubTab(UIWindowContext& context) : CUIListItem(context), unknown_00E8(nullptr), unknown_00EC(nullptr), id(0), unknown_00F4(0) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x009D9550
|
||||
CUITab::CUITab(UIWindowContext& context)
|
||||
: CUIListItem(context), unknown_00E8(nullptr), subTabs(nullptr), unknown_00F0(), type(7), page(nullptr), unknown_0110(0) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x009D9600
|
||||
CUITabInfo::CUITabInfo(UIWindowContext& context) : CUIListItem(context), unknown_00E8(nullptr), unknown_00EC(nullptr) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// OFFSET: 0x009F2EC0
|
||||
// FUNCTION: fn_14733
|
||||
void CUIVScrollBar::Slot55(int value) {
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ public:
|
|||
class CUITextButton : public CUIButton {
|
||||
public:
|
||||
explicit CUITextButton(UIWindowContext& context);
|
||||
~CUITextButton() override;
|
||||
void Slot28(int x, int y) override;
|
||||
void Paint() override;
|
||||
virtual void Slot54(int value);
|
||||
|
|
@ -189,6 +190,7 @@ public:
|
|||
class CUIBasicButton : public CUITextButton {
|
||||
public:
|
||||
explicit CUIBasicButton(UIWindowContext& context);
|
||||
~CUIBasicButton() override;
|
||||
void Resize(int width, int height) override;
|
||||
void Paint() override;
|
||||
void Slot53(int resolveSkin) override;
|
||||
|
|
@ -234,6 +236,7 @@ public:
|
|||
class CUIImageButton : public CUIButton {
|
||||
public:
|
||||
explicit CUIImageButton(UIWindowContext& context);
|
||||
~CUIImageButton() override;
|
||||
void Paint() override;
|
||||
void Slot53(int resolveSkin) override;
|
||||
|
||||
|
|
@ -248,6 +251,7 @@ public:
|
|||
|
||||
class CUIStaticImage : public CUIControl {
|
||||
public:
|
||||
// OFFSET: 0x009BE0C0
|
||||
explicit CUIStaticImage(UIWindowContext& context) : CUIControl(context), image(), tooltip(), transparent(0), scale(100), imageName() {
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue