Decompile 2 functions in Source/UI/Window/UIRPImageWnd2.cpp, Source/UI/Window/UIRPImageWnd2.h, ...
Batch #6184 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_12951 UIRPImageWnd2::SetImage: logic confirmed by peer review - fn_12966 UIStaticText_LF::SetText: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, alisonrag, System4z 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
e27a083db9
commit
b79407bc49
4 changed files with 32 additions and 0 deletions
|
|
@ -43,3 +43,23 @@ void UIStaticText_LF::Slot35(int delta) {
|
|||
this->parent->Slot35(delta);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00951BF0
|
||||
// FUNCTION: fn_12966
|
||||
void UIStaticText_LF::SetText(std::string text) {
|
||||
*reinterpret_cast<std::string*>(reinterpret_cast<char*>(this) + 0x7C) = text;
|
||||
std::list<std::string> lines;
|
||||
this->WrapFormattedText(
|
||||
text, &lines, this->geometry.width,
|
||||
*reinterpret_cast<const int*>(reinterpret_cast<const char*>(this) + 0x9C),
|
||||
*reinterpret_cast<const int*>(reinterpret_cast<const char*>(this) + 0xA0),
|
||||
*reinterpret_cast<const unsigned char*>(reinterpret_cast<const char*>(this) + 0xA8)
|
||||
);
|
||||
const int count = static_cast<int>(lines.size());
|
||||
this->Resize(
|
||||
this->geometry.width,
|
||||
(count - 1) * *reinterpret_cast<const int*>(reinterpret_cast<const char*>(this) + 0x94) +
|
||||
*reinterpret_cast<const int*>(reinterpret_cast<const char*>(this) + 0xA0) * count
|
||||
);
|
||||
this->Invalidate();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,15 @@
|
|||
|
||||
#include "UI/Window/UIWindow.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class UIStaticText_LF : public UIWindow {
|
||||
public:
|
||||
void Paint() override;
|
||||
void Slot25(int x, int y) override;
|
||||
void Slot31(int x, int y) override;
|
||||
void Slot35(int delta) override;
|
||||
void SetText(std::string text);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,3 +12,11 @@ void UIRPImageWnd2::Paint() {
|
|||
this->DrawNamed(this->m_context->primitives, 0, 0, this->m_imageName, 0xFFFFFFFF, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00951470
|
||||
// FUNCTION: fn_12951
|
||||
void UIRPImageWnd2::SetImage(std::string imageName, int imageCount) {
|
||||
this->m_imageName = imageName;
|
||||
this->m_imageCount = imageCount;
|
||||
this->m_drawImage = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
class UIRPImageWnd2 : public UIFrameWnd {
|
||||
public:
|
||||
void Paint() override;
|
||||
void SetImage(std::string imageName, int imageCount);
|
||||
|
||||
protected:
|
||||
/* 00B4 */ std::string m_imageName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue