Decompile fn_07733 (UIMiniPartyInfoWnd::Slot28)
Batch #6530 by gordaoprogramas: 0 byte-identical, 1 confirmed by peer review. - fn_07733 UIMiniPartyInfoWnd::Slot28: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, willerthal, superintelligence 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
17807559a3
commit
c88751e2e5
2 changed files with 39 additions and 0 deletions
|
|
@ -1,4 +1,7 @@
|
|||
#include "UI/Party/UIMiniPartyWnd.h"
|
||||
#include "Client/Mode/ModeMgr.h"
|
||||
#include "Client/Mode/ModeTooltip.h"
|
||||
#include "Contents/MapInfoMgr.h"
|
||||
#include "Client/Session.h"
|
||||
#include "Contents/MessageTable.h"
|
||||
#include "Contents/Messenger/ClientMessenger.h"
|
||||
|
|
@ -12,6 +15,9 @@
|
|||
#include <windows.h>
|
||||
#include <timeapi.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
// OFFSET: 0x007426F0
|
||||
// FUNCTION: fn_07737
|
||||
UIMiniPartyWnd::UIMiniPartyWnd(UIWindowContext& windowContext, UIFrameContext& frameContext)
|
||||
|
|
@ -78,6 +84,38 @@ void UIMiniPartyInfoWnd::Slot31(int x, int y) {
|
|||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00740D40
|
||||
// FUNCTION: fn_07733
|
||||
void UIMiniPartyInfoWnd::Slot28(int, int) {
|
||||
ModeTooltip* mode = reinterpret_cast<ModeTooltip*>(g_modeMgr.GetGameMode());
|
||||
if (!mode) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->m_owner->GetMember().valid == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
char text[256];
|
||||
std::memset(text, 0, sizeof(text));
|
||||
std::string fitted;
|
||||
const std::string mapName = g_mapInfoMgr->GetDisplayName(std::string(this->m_owner->GetMember().map.c_str()));
|
||||
if (this->m_owner->m_sizeMode == 1) {
|
||||
std::sprintf(text, "%s", this->m_owner->GetMember().name.c_str());
|
||||
fitted = this->FitDisplayText(static_cast<int>(static_cast<float>(this->geometry.width) * 0.532f), text, 0, 12, 1);
|
||||
} else {
|
||||
std::sprintf(text, "Lv.%d %s(%s)", this->m_owner->GetMember().level, this->m_owner->GetMember().name.c_str(), mapName.c_str());
|
||||
fitted = this->FitDisplayText(static_cast<int>(static_cast<float>(this->geometry.width) * 0.6f), text, 0, 12, 1);
|
||||
}
|
||||
|
||||
if (fitted.find(text) == std::string::npos) {
|
||||
int x = this->geometry.x + 15;
|
||||
int y = this->geometry.y - 12;
|
||||
this->ToScreen(x, y);
|
||||
mode->Show(text, x, y, 0xFFFFFFFF, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00741280
|
||||
// FUNCTION: fn_07734
|
||||
void UIMiniPartyInfoWnd::Slot33(int, int) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class UIMiniPartyInfoWnd : public UIFrameWnd {
|
|||
public:
|
||||
UIMiniPartyInfoWnd(UIWindowContext& windowContext, UIFrameContext& frameContext);
|
||||
void Slot15(int width, int height) override;
|
||||
void Slot28(int x, int y) override;
|
||||
void Slot31(int x, int y) override;
|
||||
void Slot33(int x, int y) override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue