mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Rename members of InputEventState
This commit is contained in:
@@ -438,7 +438,7 @@ public:
|
||||
ie.DeviceKind = InputDeviceKind::mouse;
|
||||
ie.Modifiers = SDL_GetModState();
|
||||
ie.Button = e.button.button;
|
||||
ie.State = InputEventState::Down;
|
||||
ie.State = InputEventState::down;
|
||||
_inputManager.QueueInputEvent(std::move(ie));
|
||||
}
|
||||
break;
|
||||
@@ -474,7 +474,7 @@ public:
|
||||
ie.DeviceKind = InputDeviceKind::mouse;
|
||||
ie.Modifiers = SDL_GetModState();
|
||||
ie.Button = e.button.button;
|
||||
ie.State = InputEventState::Release;
|
||||
ie.State = InputEventState::release;
|
||||
_inputManager.QueueInputEvent(std::move(ie));
|
||||
}
|
||||
break;
|
||||
@@ -544,14 +544,14 @@ public:
|
||||
#endif
|
||||
_textComposition.HandleMessage(&e);
|
||||
auto ie = GetInputEventFromSDLEvent(e);
|
||||
ie.State = InputEventState::Down;
|
||||
ie.State = InputEventState::down;
|
||||
_inputManager.QueueInputEvent(std::move(ie));
|
||||
break;
|
||||
}
|
||||
case SDL_KEYUP:
|
||||
{
|
||||
auto ie = GetInputEventFromSDLEvent(e);
|
||||
ie.State = InputEventState::Release;
|
||||
ie.State = InputEventState::release;
|
||||
_inputManager.QueueInputEvent(std::move(ie));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ void InputManager::QueueInputEvent(const SDL_Event& e)
|
||||
ie.DeviceKind = InputDeviceKind::joyAxis;
|
||||
ie.Modifiers = SDL_GetModState();
|
||||
ie.Button = e.caxis.axis;
|
||||
ie.State = InputEventState::Down;
|
||||
ie.State = InputEventState::down;
|
||||
ie.AxisValue = e.caxis.value;
|
||||
QueueInputEvent(std::move(ie));
|
||||
}
|
||||
@@ -65,7 +65,7 @@ void InputManager::QueueInputEvent(const SDL_Event& e)
|
||||
ie.DeviceKind = InputDeviceKind::joyHat;
|
||||
ie.Modifiers = SDL_GetModState();
|
||||
ie.Button = e.jhat.value;
|
||||
ie.State = InputEventState::Down;
|
||||
ie.State = InputEventState::down;
|
||||
ie.AxisValue = 0;
|
||||
QueueInputEvent(std::move(ie));
|
||||
}
|
||||
@@ -78,7 +78,7 @@ void InputManager::QueueInputEvent(const SDL_Event& e)
|
||||
ie.DeviceKind = InputDeviceKind::joyButton;
|
||||
ie.Modifiers = SDL_GetModState();
|
||||
ie.Button = e.cbutton.button;
|
||||
ie.State = InputEventState::Down;
|
||||
ie.State = InputEventState::down;
|
||||
ie.AxisValue = 0;
|
||||
QueueInputEvent(std::move(ie));
|
||||
break;
|
||||
@@ -90,7 +90,7 @@ void InputManager::QueueInputEvent(const SDL_Event& e)
|
||||
ie.DeviceKind = InputDeviceKind::joyButton;
|
||||
ie.Modifiers = SDL_GetModState();
|
||||
ie.Button = e.cbutton.button;
|
||||
ie.State = InputEventState::Release;
|
||||
ie.State = InputEventState::release;
|
||||
ie.AxisValue = 0;
|
||||
QueueInputEvent(std::move(ie));
|
||||
break;
|
||||
@@ -352,7 +352,7 @@ void InputManager::Process(const InputEvent& e)
|
||||
auto w = windowMgr->FindByClass(WindowClass::textinput);
|
||||
if (w != nullptr)
|
||||
{
|
||||
if (e.State == InputEventState::Release)
|
||||
if (e.State == InputEventState::release)
|
||||
{
|
||||
OpenRCT2::Ui::Windows::WindowTextInputKey(w, e.Button);
|
||||
}
|
||||
@@ -363,7 +363,7 @@ void InputManager::Process(const InputEvent& e)
|
||||
w = windowMgr->FindByClass(WindowClass::loadsaveOverwritePrompt);
|
||||
if (w != nullptr)
|
||||
{
|
||||
if (e.State == InputEventState::Release)
|
||||
if (e.State == InputEventState::release)
|
||||
{
|
||||
OpenRCT2::Ui::Windows::WindowLoadSaveOverwritePromptInputKey(w, e.Button);
|
||||
}
|
||||
@@ -374,7 +374,7 @@ void InputManager::Process(const InputEvent& e)
|
||||
w = windowMgr->FindByClass(WindowClass::loadsave);
|
||||
if (w != nullptr)
|
||||
{
|
||||
if (e.State == InputEventState::Release)
|
||||
if (e.State == InputEventState::release)
|
||||
{
|
||||
OpenRCT2::Ui::Windows::WindowLoadSaveInputKey(w, e.Button);
|
||||
}
|
||||
@@ -392,7 +392,7 @@ void InputManager::Process(const InputEvent& e)
|
||||
|
||||
void InputManager::ProcessInGameConsole(const InputEvent& e)
|
||||
{
|
||||
if (e.DeviceKind == InputDeviceKind::keyboard && e.State == InputEventState::Release)
|
||||
if (e.DeviceKind == InputDeviceKind::keyboard && e.State == InputEventState::release)
|
||||
{
|
||||
auto input = ConsoleInput::None;
|
||||
switch (e.Button)
|
||||
@@ -427,7 +427,7 @@ void InputManager::ProcessInGameConsole(const InputEvent& e)
|
||||
|
||||
void InputManager::ProcessChat(const InputEvent& e)
|
||||
{
|
||||
if (e.DeviceKind == InputDeviceKind::keyboard && e.State == InputEventState::Down)
|
||||
if (e.DeviceKind == InputDeviceKind::keyboard && e.State == InputEventState::down)
|
||||
{
|
||||
auto input = ChatInput::None;
|
||||
switch (e.Button)
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace OpenRCT2::Ui
|
||||
|
||||
enum class InputEventState
|
||||
{
|
||||
Down,
|
||||
Release,
|
||||
down,
|
||||
release,
|
||||
};
|
||||
|
||||
struct InputEvent
|
||||
|
||||
@@ -59,7 +59,7 @@ bool RegisteredShortcut::Matches(const InputEvent& e) const
|
||||
bool RegisteredShortcut::IsSuitableInputEvent(const InputEvent& e) const
|
||||
{
|
||||
// Do not intercept button releases
|
||||
if (e.State == InputEventState::Release)
|
||||
if (e.State == InputEventState::release)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user