Decompile 3 functions in Source/UI/Acceptance/UIChooseSellBuyWnd.cpp, Source/UI/Dialogs/UISayDialogWnd.h, ...
Batch #6587 by superintelligence: 0 byte-identical, 3 confirmed by peer review. - fn_12071 UIItemTagCtrl::MeasureText: logic confirmed by peer review - fn_12197 UISayDialogWnd::Slot15: logic confirmed by peer review - fn_12362 UINotifyJobLevelUpWnd::SendMsg: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, SapitoSucio, pedrao, KWDev 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
ed3d0eae02
commit
76264ff492
4 changed files with 53 additions and 1 deletions
|
|
@ -34,6 +34,7 @@
|
|||
#include "UI/Buttons/UISpriteButton.h"
|
||||
#include "UI/Chat/UIWhisperWnd.h"
|
||||
#include "UI/Edit/UIEditCtrl.h"
|
||||
#include "UI/Edit/UIItemTagCtrl.h"
|
||||
#include "UI/Dialogs/UIBookWnd.h"
|
||||
#include "UI/Dialogs/UIChooseWarpWnd.h"
|
||||
#include "UI/Dialogs/UIChooseWnd.h"
|
||||
|
|
@ -46,6 +47,7 @@
|
|||
#include "UI/Dialogs/UINoticeConfirmWnd.h"
|
||||
#include "UI/Dialogs/UINpcEditDialogWnd.h"
|
||||
#include "UI/Dialogs/UIPasswordWnd.h"
|
||||
#include "UI/Dialogs/UINotifyJobLevelUpWnd.h"
|
||||
#include "UI/Dialogs/UINotifyLevelUpWnd.h"
|
||||
#include "UI/Dialogs/UINotifyQuestWnd.h"
|
||||
#include "UI/Dialogs/UIPetTamingDeceiveWnd.h"
|
||||
|
|
@ -78,6 +80,7 @@
|
|||
#include "UI/Text/ColoredText.h"
|
||||
#include "UI/Text/PixelTextWrapping.h"
|
||||
#include "UI/Text/UIStaticText.h"
|
||||
#include "UI/Text/UITagTextViewer.h"
|
||||
#include "UI/Text/UITextViewer.h"
|
||||
#include "UI/Window/InputFocus.h"
|
||||
#include "UI/Window/UIMonsterDisplayWnd.h"
|
||||
|
|
@ -2439,3 +2442,37 @@ int UILoadingWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std::
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: 0x008CED00
|
||||
// FUNCTION: fn_12071
|
||||
int UIItemTagCtrl::MeasureText(const std::string& text, const unsigned& bytes) {
|
||||
return this->TextWidth(this->m_context->fonts, this->m_context->locale, text.c_str(), bytes, 0, 12, 0, 0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x008E8390
|
||||
// FUNCTION: fn_12197
|
||||
void UISayDialogWnd::Slot15(int width, int height) {
|
||||
auto* viewer = new UITagTextViewer(*this->m_context);
|
||||
this->m_viewer = viewer;
|
||||
viewer->SetSize(width - 20, height - 40);
|
||||
viewer->m_backgroundColor = 0xFFF2F2F2;
|
||||
viewer->Invalidate();
|
||||
viewer->m_textWidth = width - 65;
|
||||
viewer->Move(10, 10);
|
||||
this->AddChild(viewer);
|
||||
this->m_message0 = 600;
|
||||
this->unknown_00CC = 0;
|
||||
this->unknown_00D4 = 0;
|
||||
}
|
||||
|
||||
// OFFSET: 0x008FFBA0
|
||||
// FUNCTION: fn_12362
|
||||
int UINotifyJobLevelUpWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
|
||||
if (message != 6) {
|
||||
return UIWindow::SendMsg(sender, message, a, b, c, d);
|
||||
}
|
||||
if (a == 192) {
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(g_windowMgr.EnsureWindow(37));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
11
Source/UI/Dialogs/UINotifyJobLevelUpWnd.h
Normal file
11
Source/UI/Dialogs/UINotifyJobLevelUpWnd.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef RAGNAROK_SOURCE_UI_DIALOGS_UINOTIFYJOBLEVELUPWND_H
|
||||
#define RAGNAROK_SOURCE_UI_DIALOGS_UINOTIFYJOBLEVELUPWND_H
|
||||
|
||||
#include "UI/Window/UIFrameWnd.h"
|
||||
|
||||
class UINotifyJobLevelUpWnd : public UIFrameWnd {
|
||||
public:
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -11,9 +11,12 @@ class UISayDialogWnd : public UIFrameWnd {
|
|||
public:
|
||||
/* 00B4 */ UIWindow* m_viewer;
|
||||
/* 00B8 */ std::list<UIWindow*> m_buttons;
|
||||
/* 00C0 */ unsigned char unknown_00C0[0x10];
|
||||
/* 00C0 */ unsigned char unknown_00C0[0x0C];
|
||||
/* 00CC */ int unknown_00CC;
|
||||
/* 00D0 */ WindowPlacement* m_placement;
|
||||
/* 00D4 */ int unknown_00D4;
|
||||
|
||||
void Slot15(int width, int height) override;
|
||||
void Resize(int width, int height) override;
|
||||
void Slot11() override;
|
||||
void Slot19() override;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ public:
|
|||
virtual bool CanInsertTag(const std::string& name, int width);
|
||||
|
||||
std::string AppendTag(const std::string& name);
|
||||
int MeasureText(const std::string& text, const unsigned& bytes);
|
||||
bool SyncTagsWithText();
|
||||
void SetTaggedText(const std::string& text, int width);
|
||||
void sub_89CFE0(const ITEM_INFO& item, unsigned int color);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue