~ Initial SDL2 implementation
Limitation - Dependent projects need to set NAZARA_PLATFORM_SDL2 if nazara has been build with SDL2 since OpenGL.hpp (and maybe some other headers) exposes platform details - SDL2 window doesn't supports async window since the API isn't fitting for now - Contexts parameters can't be changed until we close all the SDL windows (SDL limitation)
This commit is contained in:
30
src/Nazara/Platform/SDL2/InputImpl.hpp
Normal file
30
src/Nazara/Platform/SDL2/InputImpl.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// Copyright (C) 2017 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Platform module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_INPUTIMPL_HPP
|
||||
#define NAZARA_INPUTIMPL_HPP
|
||||
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Math/Vector2.hpp>
|
||||
#include <Nazara/Platform/Keyboard.hpp>
|
||||
#include <Nazara/Platform/Mouse.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class EventImpl
|
||||
{
|
||||
public:
|
||||
static String GetKeyName(Keyboard::Key key);
|
||||
static Vector2i GetMousePosition();
|
||||
static Vector2i GetMousePosition(const Window& relativeTo);
|
||||
static bool IsKeyPressed(Keyboard::Key key);
|
||||
static bool IsMouseButtonPressed(Mouse::Button button);
|
||||
static void SetMousePosition(int x, int y);
|
||||
static void SetMousePosition(int x, int y, const Window& relativeTo);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // NAZARA_INPUTIMPL_HPP
|
||||
Reference in New Issue
Block a user