rodecomp/Source/UI/Window/UIPartyBookingHelpWnd.cpp
ragnarok-clanker cc8a43db9f Maintenance: [forced, user-approved] Family D5: remove UITextViewerContext and TextViewerActions entirely. UITextViewer ctor 0x86F0A0
Batch #10206 by ragnarok-clanker: forced by an admin (4 lower score(s), 20 changed function(s)); checked with 36 compiled unit(s), including every includer of Source/UI/Acceptance/UIJoinPartyAcceptWnd.h, Source/UI/Dialogs/UIBookWnd.h, Source/UI/Dialogs/UIDisconnectedServerMsgWnd.h, Source/UI/Dialogs/UINoticeConfirmWnd.h, Source/UI/Dialogs/UIWaitWnd.h, Source/UI/EntryQueue/UIEntryQueueWnd.h, Source/UI/Party/UIRequestJoinPartyWnd.h, Source/UI/Text/UITextViewer.h, Source/UI/Window/UIAccountLimitedToolWnd.h, Source/UI/Window/UIMessageBox.h, Source/UI/Window/UINavigationHelpWnd.h, Source/UI/Window/UINormalMB.h, Source/UI/Window/UIPartyBookingHelpWnd.h.
2026-11-02 22:23:07 +00:00

58 lines
1.7 KiB
C++

#include "UI/Window/UIPartyBookingHelpWnd.h"
#include "Client/Input/InputCharset.h"
#include "Contents/MessageTable.h"
#include "Script/LuaScript.h"
#include "UI/Buttons/UIButton.h"
#include "UI/Text/UITextViewer.h"
#include "UI/Window/UIWindowMgr.h"
#include <cstdio>
#include <string>
// OFFSET: 0x00924810
// FUNCTION: fn_12645
void UIPartyBookingHelpWnd::Slot15(int width, int height) {
this->AddBaseButton();
this->AddCloseButton("", 0);
this->m_viewer = new UITextViewer(*this->m_context);
this->m_viewer->Configure(10, 25, width - 20, height - 35, 1);
this->AddChild(this->m_viewer);
std::string help;
const char* result = nullptr;
if (g_luaScript->Call("GetPartyBookingHelp", "d>s", -1, &result)) {
help = result;
if (help.size()) {
char* text = new char[help.size() + 4];
sprintf(text, "%s%s", g_serverLanguage->Prefix(true), help.c_str());
this->m_viewer->SendMsg(nullptr, 29, reinterpret_cast<std::intptr_t>(text), 0, 1, 1);
}
}
}
// OFFSET: 0x0092D630
// FUNCTION: fn_12670
void UIPartyBookingHelpWnd::Paint() {
this->DrawTitleBar(true, LookupMessage(1716), 0);
this->DrawPanelBackground(17, 0, "");
}
// OFFSET: 0x00938810
// FUNCTION: fn_12751
int UIPartyBookingHelpWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
if (message != 6) {
return UIFrameWnd::SendMsg(sender, message, argument1, argument2, argument3, argument4);
}
if (argument1 == 201) {
g_windowMgr.CloseWindow(173);
}
return 0;
}
// OFFSET: 0x00911860
// FUNCTION: fn_12519
UIPartyBookingHelpWnd::UIPartyBookingHelpWnd(UIWindowContext& windows)
: UIFrameWnd(windows, 0) {
}