Batch #8333 by SapitoSucio: 0 byte-identical, 2 confirmed by peer review. - fn_12617 UIHotKeyWnd::GetHotkey: logic confirmed by peer review - fn_12663 UIHotKeyWnd::Paint: logic confirmed by peer review Peer-reviewed-by: eAthena, Yommy Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
#ifndef RAGNAROK_SOURCE_CONTENTS_HOTKEYS_USERHOTKEYMGR_H
|
|
#define RAGNAROK_SOURCE_CONTENTS_HOTKEYS_USERHOTKEYMGR_H
|
|
|
|
#include "Contents/Hotkeys/UserHotkeyScript.h"
|
|
|
|
#include <cstdint>
|
|
#include <list>
|
|
#include <string>
|
|
|
|
class CUserHotkeyMgr {
|
|
friend class UIHotKeyWnd;
|
|
public:
|
|
CUserHotkeyMgr();
|
|
virtual ~CUserHotkeyMgr();
|
|
static bool Initialize();
|
|
static void Shutdown();
|
|
void Reset();
|
|
int TabAt(int position) const;
|
|
void LoadV2(LuaScript& script, Json::Value& data);
|
|
void Capture(LuaScript& script);
|
|
bool HasUserAssignments(LuaScript& script) const;
|
|
bool HasChanges(LuaScript& script) const;
|
|
void Export(LuaScript& script, Json::Value& data);
|
|
|
|
protected:
|
|
friend class CAccountLinkedUserDataMgr;
|
|
struct Hotkey {
|
|
/* 0000 */ int tab;
|
|
/* 0004 */ int index;
|
|
/* 0008 */ int key1;
|
|
/* 000C */ int key2;
|
|
/* 0010 */ std::string description;
|
|
};
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(Hotkey) == 40);
|
|
#endif
|
|
/* 0004 */ bool m_enabled;
|
|
/* 0005 */ bool m_loaded;
|
|
/* 0008 */ std::uint32_t m_changes;
|
|
/* 000C */ bool m_version2;
|
|
/* 0010 */ std::list<Hotkey> m_original;
|
|
};
|
|
|
|
extern CUserHotkeyMgr* g_userHotkeyMgr;
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CUserHotkeyMgr) == 24);
|
|
#endif
|
|
|
|
#endif
|