Polyphase Game Engine
Loading...
Searching...
No Matches
PlayerInputEditor.h
Go to the documentation of this file.
1#pragma once
2
3#if EDITOR
4
6
7#include <stdint.h>
8#include <string>
9#include <vector>
10
11class PlayerInputEditor
12{
13public:
14 void Open();
15 void Draw();
16 bool IsOpen() const;
17
18private:
19
20 bool mIsOpen = false;
21 int mSelectedActionIndex = -1;
22 char mNewCategory[64] = {};
23 char mNewActionName[64] = {};
24
25 // Capture state for binding
26 bool mCapturing = false;
27 int mCaptureBindingSlot = -1;
28 float mCaptureTimer = 0.0f;
29
30 // Rename/Move/DuplicateTo popup state
31 enum class PopupMode { None, Rename, DuplicateTo, MoveTo, DuplicateCategory };
32 PopupMode mPopupMode = PopupMode::None;
33 int mPopupActionIndex = -1;
34 char mPopupCategory[64] = {};
35 char mPopupName[64] = {};
36 std::string mPopupSourceCategory;
37
38 // Clipboard for copy/paste
39 bool mHasClipboard = false;
40 InputAction mClipboardAction;
41
42 void DrawActionList();
43 void DrawActionDetails();
44 void DrawCaptureOverlay();
45 void DrawActionContextMenu(int actionIndex);
46 void DrawCategoryContextMenu(const std::string& category);
47 void DrawPopupModal();
48 void DuplicateAction(int actionIndex, std::string toCategory, std::string newName);
49 void PasteAction(const std::string& toCategory, bool overrideExisting);
50};
51
52PlayerInputEditor* GetPlayerInputEditor();
53
54#endif
Definition PlayerInputSystem.h:71