mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 07:03:34 +00:00
working on event system
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/05 16:30:19 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/01 16:46:13 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/03 12:40:10 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -25,6 +25,9 @@ namespace mlx
|
||||
{
|
||||
_xRel = 0;
|
||||
_yRel = 0;
|
||||
|
||||
if(!_auto_repeat)
|
||||
std::memset(_keys.data(), 0, SDL_NUM_SCANCODES);
|
||||
|
||||
while(SDL_PollEvent(&_event))
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/05 16:27:35 by maldavid #+# #+# */
|
||||
/* Updated: 2022/12/18 23:09:41 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/03 14:19:11 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -43,6 +43,9 @@ namespace mlx
|
||||
inline bool is_running() const noexcept { return !_end; }
|
||||
inline constexpr void finish() noexcept { _end = true; }
|
||||
|
||||
inline constexpr void enableAutoRepeat() noexcept { _auto_repeat = true; }
|
||||
inline constexpr void disableAutoRepeat() noexcept { _auto_repeat = false; }
|
||||
|
||||
~Input() = default;
|
||||
|
||||
private:
|
||||
@@ -56,5 +59,6 @@ namespace mlx
|
||||
int _yRel = 0;
|
||||
|
||||
bool _end = false;
|
||||
bool _auto_repeat = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user