Files
OpenRCT2-Web/src/openrct2/Input.cpp
T

57 lines
1.2 KiB
C++
Raw Normal View History

2014-08-24 18:45:47 +01:00
/*****************************************************************************
2024-12-31 20:30:04 +01:00
* Copyright (c) 2014-2025 OpenRCT2 developers
2015-10-20 20:16:30 +02:00
*
2018-06-15 14:07:34 +02:00
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
2015-10-20 20:16:30 +02:00
*
2018-06-15 14:07:34 +02:00
* OpenRCT2 is licensed under the GNU General Public License version 3.
2014-08-24 18:45:47 +01:00
*****************************************************************************/
2017-12-12 14:52:57 +01:00
#include "Input.h"
2014-08-24 18:45:47 +01:00
2018-06-22 23:25:16 +02:00
#include "Context.h"
2023-05-18 18:07:57 +03:00
#include "Game.h"
2018-06-22 23:25:16 +02:00
namespace OpenRCT2
2017-06-11 16:31:54 +01:00
{
InputState _inputState;
2025-03-26 13:00:54 +01:00
InputFlags gInputFlags;
2017-06-11 16:31:54 +01:00
WidgetRef gHoverWidget;
WidgetRef gPressedWidget;
2017-06-11 16:31:54 +01:00
uint32_t _tooltipNotShownTimeout;
/**
*
* rct2: 0x006E3B43
*/
void TitleHandleKeyboardInput()
2018-06-22 23:25:16 +02:00
{
ContextInputHandleKeyboard(true);
2018-06-22 23:25:16 +02:00
}
/**
*
* rct2: 0x006E3B43
*/
void GameHandleKeyboardInput()
2018-06-22 23:25:16 +02:00
{
ContextInputHandleKeyboard(false);
2017-06-06 23:24:18 +02:00
}
2017-02-27 20:20:41 +01:00
void InputSetState(InputState state)
{
_inputState = state;
}
2017-02-27 20:20:41 +01:00
InputState InputGetState()
{
return _inputState;
}
void ResetTooltipNotShown()
{
_tooltipNotShownTimeout = gCurrentRealTimeTicks + 50;
}
} // namespace OpenRCT2