Refactored mathematics module
Added AABBs Added code examples Added experimental support for texture arrays (1D/2D) Added initialisers (new way of initialising modules) Added global headers (Plus a global header generator script) Added pattern support for directory Added support for spinlocks critical section on Windows Added NzRenderWindow::SetFramerateLimit Core project now includes Mathematics files Fixed color implementation using double Fixed declaration needing renderer include Fixed MLT not clearing nextFree(File/Line) after Free Fixed move operators not being noexcept Fixed thread-safety (Now working correctly - If I'm lucky) Moved Resource to core New interface for modules New interface for the renderer Put some global functions to anonymous namespace Removed empty modules Renamed ThreadCondition to ConditionVariable Replaced redirect to cerr log option by duplicate to cout Setting mouse position relative to a window will make this window ignore the event Shaders sending methods no longer takes the uniform variable name (it's using ID instead) Using new OpenGL 4.3 header
This commit is contained in:
@@ -14,15 +14,22 @@
|
||||
|
||||
struct NzEvent
|
||||
{
|
||||
// Utilisé par:
|
||||
// -nzEventType_KeyPressed
|
||||
// -nzEventType_KeyReleased
|
||||
struct KeyEvent
|
||||
{
|
||||
NzKeyboard::Key code;
|
||||
bool alt;
|
||||
bool control;
|
||||
bool repeated;
|
||||
bool shift;
|
||||
bool system;
|
||||
};
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_MouseButtonDoubleClicked
|
||||
// -nzEventType_MouseButtonPressed
|
||||
struct MouseButtonEvent
|
||||
{
|
||||
NzMouse::Button button;
|
||||
@@ -30,63 +37,79 @@ struct NzEvent
|
||||
unsigned int y;
|
||||
};
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_MouseMoved
|
||||
struct MouseMoveEvent
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int deltaX;
|
||||
int deltaY;
|
||||
unsigned int x;
|
||||
unsigned int y;
|
||||
};
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_MouseWheelMoved
|
||||
struct MouseWheelEvent
|
||||
{
|
||||
float delta;
|
||||
};
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_Moved
|
||||
struct PositionEvent
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_Resized
|
||||
struct SizeEvent
|
||||
{
|
||||
unsigned int height;
|
||||
unsigned int width;
|
||||
};
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_TextEntered
|
||||
struct TextEvent
|
||||
{
|
||||
bool repeated;
|
||||
char32_t character;
|
||||
};
|
||||
|
||||
enum Type
|
||||
{
|
||||
GainedFocus,
|
||||
LostFocus,
|
||||
KeyPressed,
|
||||
KeyReleased,
|
||||
MouseButtonDoubleClicked,
|
||||
MouseButtonPressed,
|
||||
MouseButtonReleased,
|
||||
MouseEntered,
|
||||
MouseLeft,
|
||||
MouseMoved,
|
||||
MouseWheelMoved,
|
||||
Moved,
|
||||
Quit,
|
||||
Resized,
|
||||
TextEntered
|
||||
};
|
||||
|
||||
Type type;
|
||||
nzEventType type;
|
||||
|
||||
union
|
||||
{
|
||||
// Utilisé par:
|
||||
// -nzEventType_KeyPressed
|
||||
// -nzEventType_KeyReleased
|
||||
KeyEvent key;
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_MouseButtonDoubleClicked
|
||||
// -nzEventType_MouseButtonPressed
|
||||
MouseButtonEvent mouseButton;
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_MouseMoved
|
||||
MouseMoveEvent mouseMove;
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_MouseWheelMoved
|
||||
MouseWheelEvent mouseWheel;
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_Moved
|
||||
PositionEvent position;
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_Resized
|
||||
SizeEvent size;
|
||||
|
||||
// Utilisé par:
|
||||
// -nzEventType_TextEntered
|
||||
TextEvent text;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user