Polyphase Game Engine
Loading...
Searching...
No Matches
InputMapWindow.h
Go to the documentation of this file.
1#pragma once
2
3#if EDITOR
4
5#include "Input/InputTypes.h"
6
7#include <stdint.h>
8#include <string>
9#include <vector>
10
11class InputMapWindow
12{
13public:
14 void Open();
15 void Draw();
16 bool IsOpen() const;
17 bool IsCapturing() const;
18
19private:
20
21 bool mIsOpen = false;
22
23 // Preset state
24 std::vector<std::string> mPresetNames;
25 int mSelectedPreset = -1;
26 char mNewPresetName[64] = {};
27 bool mShowSavePopup = false;
28
29 // Capture state for remapping
30 bool mCapturing = false;
31 enum CaptureTarget
32 {
33 CaptureButton,
34 CaptureAxisPositive,
35 CaptureAxisNegative
36 };
37 CaptureTarget mCaptureType = CaptureButton;
38 int32_t mCaptureIndex = -1;
39 float mCaptureTimer = 0.0f;
40
41 void DrawPresets();
42 void DrawGamepadButtons();
43 void DrawGamepadAxes();
44 void DrawMouseAxes();
45 void DrawMousePointerSection();
46 void DrawCaptureOverlay();
47 bool PollKeyPress(int32_t& outKeyCode);
48 void RefreshPresetList();
49};
50
51InputMapWindow* GetInputMapWindow();
52
53#endif