Batch #10227 by ragnarok-clanker: forced by an admin (12 lower score(s), 91 changed function(s)); checked with 401 compiled unit(s), including every includer of Source/UI/Buttons/UIBasicButton.h, Source/UI/Buttons/UIBitmapButton.h, Source/UI/Buttons/UIButton.h, Source/UI/Buttons/UICheckBox.h, Source/UI/Buttons/UISpriteButton.h, Source/UI/Buttons/UITextButton.h, Source/UI/Chat/UINewChatWnd.h, Source/UI/Chat/UISubChatMiniWnd.h, Source/UI/Dialogs/UIEditctrlWnd.h, Source/UI/Dialogs/UIMemorialDunWnd.h, Source/UI/Dialogs/UIMiniMapWnd.h, Source/UI/Edit/UIEditCtrl.h, Source/UI/Guild/UIAgitWnd.h, Source/UI/Guild/UIGuildHelperWnd.h, Source/UI/Guild/UIGuildWnd.h, Source/UI/Items/UIItemRepairWnd.h, Source/UI/Items/UIMakeTargetListWnd.h, Source/UI/Items/UIMakeTargetProcessWnd.h, Source/UI/Items/UIMakeTargetResultWnd.h, Source/UI/Items/UIWeaponRefineWnd.h, Source/UI/Lists/UIComboBoxDefWnd.h, Source/UI/Lists/UIListBox.h, Source/UI/Lists/UIListBoxNavi.h, Source/UI/Lists/UIScrollBar.h, Source/UI/Lists/UITabControl.h, Source/UI/Rodex/UIRodexComposeWnd.h, Source/UI/Shortcuts/ShortcutControls.h, Source/UI/Shortcuts/UIShortCutWnd.h, Source/UI/Text/UIStaticText.h, Source/UI/Text/UIStaticText_LF.h, Source/UI/Text/UITextViewer.h, Source/UI/UIScrollWnd.h, Source/UI/Window/UIEmblemWnd.h, Source/UI/Window/UIEscOptionWnd.h, Source/UI/Window/UIFrameWnd.h, Source/UI/Window/UIJobListWnd.h, Source/UI/Window/UIMessageBox.h, Source/UI/Window/UIMileageWnd.h, Source/UI/Window/UIMiniBtnWnd.h, Source/UI/Window/UINavigationHelpWnd.h, Source/UI/Window/UINewSkillListWnd.h, Source/UI/Window/UINoteWnd.h, Source/UI/Window/UIOpenMailBoxWnd.h, Source/UI/Window/UIOpenRoulletteWnd.h, Source/UI/Window/UIPartyBookingHelpWnd.h, Source/UI/Window/UIPetEvolutionWnd.h, Source/UI/Window/UIRPImageWnd.h, Source/UI/Window/UIRPImageWnd2.h, Source/UI/Window/UIRebirthWnd.h, Source/UI/Window/UIResizer.h, Source/UI/Window/UIRoMapWnd.h, Source/UI/Window/UIRodexContentsWnd.h, Source/UI/Window/UISecondCostumeWnd.h, Source/UI/Window/UISeekPartyMBWnd.h, Source/UI/Window/UIShowWarpWnd.h, Source/UI/Window/UITransMenuWnd.h, Source/UI/Window/UIVideoWnd.h, Source/UI/Window/UIViewCameraInfoWnd.h, Source/UI/Window/UIWindow.h, Source/UI/Window/WindowDialogs.h.
95 lines
2.7 KiB
C++
95 lines
2.7 KiB
C++
#include "UI/Window/UINoteWnd.h"
|
|
#include "Contents/MessageTable.h"
|
|
#include "UI/Buttons/UIBasicButton.h"
|
|
#include "UI/Lists/UIScrollBar.h"
|
|
#include "UI/Text/UIStaticText_LF.h"
|
|
#include "UI/Window/UIWindowMgr.h"
|
|
#include "UI/Window/WindowBorder.h"
|
|
|
|
// OFFSET: 0x0094C2D0
|
|
// FUNCTION: fn_12895
|
|
void UINoteWnd::Slot15(int width, int height) {
|
|
UIBasicButton* button = new UIBasicButton();
|
|
button->Configure(60, LookupMessage(0xBE5));
|
|
button->Move(width - 68, height - 26);
|
|
button->SetId(201);
|
|
this->AddChild(button);
|
|
|
|
this->m_scroll = new UINoteWnd_Scroll(width - 35, height - 59);
|
|
this->m_scroll->Move(16, 16);
|
|
this->AddChild(this->m_scroll);
|
|
}
|
|
|
|
// OFFSET: 0x0094D870
|
|
// FUNCTION: fn_12907
|
|
void UINoteWnd::Paint() {
|
|
this->ClearSurface(0xFFFF00FF);
|
|
DrawFilledRoundedBorder(*this, 0, 0, this->geometry.width, this->geometry.height, 0xFFFFFF);
|
|
DrawRoundedBorder(*this, 2, 2, this->geometry.width - 4, this->geometry.height - 4, 0xC8C8C8);
|
|
this->FillRegion(8, 8, this->geometry.width - 16, this->geometry.height - 38, 0xF7F7F7);
|
|
}
|
|
|
|
// OFFSET: 0x0094D8E0
|
|
// FUNCTION: fn_12908
|
|
void UINoteWnd_Scroll::Paint() {
|
|
this->ClearSurface(0xF7F7F7);
|
|
}
|
|
|
|
// OFFSET: 0x0094EE80
|
|
// FUNCTION: fn_12919
|
|
void UINoteWnd_Scroll::Slot25(int x, int y) {
|
|
if (this->parent) {
|
|
this->parent->Slot25(x + 23, y + 27);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x0094EF80
|
|
// FUNCTION: fn_12924
|
|
void UINoteWnd_Scroll::Slot31(int x, int y) {
|
|
if (this->parent) {
|
|
this->parent->Slot31(x + 23, y + 27);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x0094F2C0
|
|
// FUNCTION: fn_12935
|
|
void UINoteWnd_Scroll::Slot35(int delta) {
|
|
if (this->wheelScroll == 1) {
|
|
if (delta < 0) {
|
|
this->SendMsg(this->scrollBar, 7, 12, 0, 0, 0);
|
|
} else {
|
|
this->SendMsg(this->scrollBar, 7, -12, 0, 0, 0);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00946D00
|
|
// FUNCTION: fn_12852
|
|
UINoteWnd::UINoteWnd()
|
|
: UIFrameWnd(0), m_scroll(nullptr) {
|
|
}
|
|
|
|
// OFFSET: 0x00950840
|
|
// FUNCTION: fn_12944
|
|
int UINoteWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
|
|
if (message == 6) {
|
|
if (argument1 == 201) {
|
|
g_windowMgr.CloseWindow(this->geometry.id);
|
|
}
|
|
} else if (message == 0x22) {
|
|
UINoteWnd_Scroll* scroll = this->m_scroll;
|
|
const std::string text = LookupMessage(static_cast<int>(argument1));
|
|
UIStaticText_LF* label = new UIStaticText_LF(0);
|
|
scroll->m_text = label;
|
|
label->SetSize(scroll->geometry.width - 13, 12);
|
|
label->Move(0, 0);
|
|
label->SetText(text);
|
|
scroll->AddScrollChild(label);
|
|
scroll->horizontalBar->Show(0);
|
|
scroll->scrollBar->Show(0);
|
|
scroll->Invalidate();
|
|
this->Invalidate();
|
|
}
|
|
|
|
return UIWindow::SendMsg(sender, message, argument1, argument2, argument3, argument4);
|
|
}
|