rodecomp/Source/UI/UIHotkeyGuideWnd.h
ragnarok-clanker 819a3a7a85 Confirm fn_13156 (HotkeyGuideLabel::HotkeyGuideLabel)
Batch #13834 by eAthena: 1 byte-identical, 0 confirmed by peer review.

- fn_13156 HotkeyGuideLabel::HotkeyGuideLabel: byte-identical (already on main)

Merged automatically: every function is byte-identical to the original.
2026-11-06 22:30:00 +00:00

81 lines
2.2 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_UIHOTKEYGUIDEWND_H
#define RAGNAROK_SOURCE_UI_UIHOTKEYGUIDEWND_H
#include "UI/Window/UIFrameWnd.h"
#include <map>
#include <string>
#include <vector>
struct HotkeyGuideEntry {
/* 0000 */ int id;
/* 0004 */ int firstKey;
/* 0008 */ int secondKey;
HotkeyGuideEntry(int id, int firstKey, int secondKey) : id(id), firstKey(firstKey), secondKey(secondKey) {
}
};
struct HotkeyGuideKey {
/* 0000 */ bool valid;
/* 0004 */ int x;
/* 0008 */ int y;
/* 000C */ unsigned char align;
/* 000D */ unsigned char width;
/* 000E */ unsigned char padding;
/* 000F */ unsigned char height;
HotkeyGuideKey();
// INLINED
HotkeyGuideKey& operator=(const HotkeyGuideKey& other) {
this->valid = other.valid;
this->x = other.x;
this->y = other.y;
this->align = other.align;
this->width = other.width;
this->padding = other.padding;
this->height = other.height;
return *this;
}
HotkeyGuideKey(int x, int y, unsigned char align, unsigned char width, unsigned char padding, unsigned char height);
};
struct HotkeyGuideLabel {
/* 0000 */ std::string text;
/* 0018 */ HotkeyGuideKey key;
/* 0028 */ HotkeyGuideKey altKey;
// INLINED
HotkeyGuideLabel() {
}
HotkeyGuideLabel(std::string text, HotkeyGuideKey key, HotkeyGuideKey altKey);
HotkeyGuideLabel(const HotkeyGuideLabel&) = default;
~HotkeyGuideLabel();
HotkeyGuideLabel& operator=(const HotkeyGuideLabel& other);
};
class UIHotkeyGuideWnd : public UIFrameWnd {
public:
UIHotkeyGuideWnd();
void Slot15(int width, int height) override;
void Slot19() override;
void Paint() override;
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
void DrawKey(const HotkeyGuideKey* key);
void DrawKeyLabel(std::string text, const HotkeyGuideKey* key);
protected:
/* 00B4 */ std::map<int, HotkeyGuideLabel> m_labels;
/* 00BC */ std::vector<HotkeyGuideEntry> m_entries;
/* 00C8 */ std::vector<UIWindow*> m_tabs;
/* 00D4 */ int m_current;
/* 00D8 */ std::vector<int> m_keys;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(HotkeyGuideKey) == 0x10);
static_assert(sizeof(HotkeyGuideLabel) == 0x38);
#endif
#endif