more work towards a clean code
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
#include <JSONUtils.hpp>
|
||||
#include <unordered_map>
|
||||
#include <ImGuiImpl/PushButton.hpp>
|
||||
#include <ImGuiImpl/Combobox.hpp>
|
||||
|
||||
class InputSettings final {
|
||||
bool grabbing = false;
|
||||
@@ -10,6 +12,28 @@ class InputSettings final {
|
||||
void PollGamepad() noexcept;
|
||||
|
||||
std::unordered_map<u32, std::string> gamepadIndexes{};
|
||||
std::array<gui::PushButton, 18> kbButtons = {
|
||||
gui::PushButton{"", "A"},
|
||||
gui::PushButton{"", "B"},
|
||||
gui::PushButton{"", "Z"},
|
||||
gui::PushButton{"", "Start"},
|
||||
gui::PushButton{"", "L"},
|
||||
gui::PushButton{"", "R"},
|
||||
gui::PushButton{"", "Dpad Up"},
|
||||
gui::PushButton{"", "Dpad Down"},
|
||||
gui::PushButton{"", "Dpad Left"},
|
||||
gui::PushButton{"", "Dpad Right"},
|
||||
gui::PushButton{"", "C Up"},
|
||||
gui::PushButton{"", "C Down"},
|
||||
gui::PushButton{"", "C Left"},
|
||||
gui::PushButton{"", "C Right"},
|
||||
gui::PushButton{"", "Analog Up"},
|
||||
gui::PushButton{"", "Analog Down"},
|
||||
gui::PushButton{"", "Analog Left"},
|
||||
gui::PushButton{"", "Analog Right"},
|
||||
};
|
||||
|
||||
gui::Combobox devices{"Device:", {}};
|
||||
|
||||
//std::unique_ptr<QHBoxLayout> AB = std::make_unique<QHBoxLayout>();
|
||||
//std::unique_ptr<QHBoxLayout> ZStart = std::make_unique<QHBoxLayout>();
|
||||
@@ -29,8 +53,9 @@ class InputSettings final {
|
||||
//std::unique_ptr<QComboBox> devices = std::make_unique<QComboBox>();
|
||||
//Q_OBJECT
|
||||
public:
|
||||
bool render();
|
||||
bool selectedDeviceIsNotKeyboard = false;
|
||||
explicit InputSettings(nlohmann::json &);
|
||||
nlohmann::json &settings;
|
||||
//std::array<Qt::Key, 18> GetMappedKeys() const;
|
||||
std::array<SDL_Keycode, 18> GetMappedKeys();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user