rodecomp/Source/UI/UIHotkeyGuideWnd.h
ragnarok-clanker e0a999f99c Confirm fn_13164 (UIHotkeyGuideWnd::Slot15)
Batch #12486 by StrawberrysherbetIX: 0 byte-identical, 1 confirmed by peer review.

- fn_13164 UIHotkeyGuideWnd::Slot15: logic confirmed by peer review (already on main)

Peer-reviewed-by: Yommy, dori
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-05 15:57:44 +00:00

68 lines
1.8 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();
__declspec(noinline) 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();
};
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