Batch #1537 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review. - fn_04058 CUserHotkeyMgr::TabAt: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
49 lines
1.2 KiB
C++
49 lines
1.2 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 {
|
|
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
|