sdl event stuff

This commit is contained in:
2025-05-05 11:08:07 -05:00
parent 2820387851
commit c2da1944d8
11 changed files with 195 additions and 134 deletions

View File

@@ -19,9 +19,9 @@ namespace Archimedes {
public:
ResizeWindowEvent() : width(0), height(0) {}
ResizeWindowEvent() : Event(nullptr), width(0), height(0) {}
ResizeWindowEvent(int w, int h) : width(w), height(h) {}
ResizeWindowEvent(int w, int h, void* userData = nullptr) : Event(userData), width(w), height(h) {}
~ResizeWindowEvent() {
@@ -37,9 +37,9 @@ namespace Archimedes {
public:
CloseWindowEvent() : window(nullptr) {}
CloseWindowEvent() : Event(nullptr), window(nullptr) {}
CloseWindowEvent(const Window* w) : window(w) {}
CloseWindowEvent(const Window* w, void* userData = nullptr) : Event(userData), window(w) {}
~CloseWindowEvent() {
@@ -54,9 +54,9 @@ namespace Archimedes {
public:
KeyPressedWindowEvent() : key(0), repeat(0) {}
KeyPressedWindowEvent() : Event(nullptr), key(0), repeat(0) {}
KeyPressedWindowEvent(unsigned int k, unsigned int r) : key(k), repeat(r) {}
KeyPressedWindowEvent(unsigned int k, unsigned int r, void* userData = nullptr) : Event(userData), key(k), repeat(r) {}
~KeyPressedWindowEvent() {
@@ -72,9 +72,9 @@ namespace Archimedes {
public:
KeyReleasedWindowEvent() : key(0) {}
KeyReleasedWindowEvent() : Event(nullptr), key(0) {}
KeyReleasedWindowEvent(unsigned int k) : key(k) {}
KeyReleasedWindowEvent(unsigned int k, void* userData = nullptr) : Event(userData), key(k) {}
~KeyReleasedWindowEvent() {
@@ -89,9 +89,9 @@ namespace Archimedes {
public:
MouseButtonPressedWindowEvent() : button(0) {}
MouseButtonPressedWindowEvent() : Event(nullptr), button(0) {}
MouseButtonPressedWindowEvent(unsigned int b) : button(b) {}
MouseButtonPressedWindowEvent(unsigned int b, void* userData = nullptr) : Event(userData), button(b) {}
~MouseButtonPressedWindowEvent() {
@@ -106,9 +106,9 @@ namespace Archimedes {
public:
MouseButtonReleasedWindowEvent() : button(0) {}
MouseButtonReleasedWindowEvent() : Event(nullptr), button(0) {}
MouseButtonReleasedWindowEvent(unsigned int b) : button(b) {}
MouseButtonReleasedWindowEvent(unsigned int b, void* userData = nullptr) : Event(userData), button(b) {}
~MouseButtonReleasedWindowEvent() {
@@ -123,9 +123,9 @@ namespace Archimedes {
public:
ScrollWindowEvent() : dx(0), dy(0) {}
ScrollWindowEvent() : Event(nullptr), dx(0), dy(0) {}
ScrollWindowEvent(double x, double y) : dx(x), dy(y) {}
ScrollWindowEvent(double x, double y, void* userData = nullptr) : Event(userData), dx(x), dy(y) {}
~ScrollWindowEvent() {
@@ -140,9 +140,9 @@ namespace Archimedes {
public:
MouseMovedWindowEvent() : x(0), y(0) {}
MouseMovedWindowEvent() : Event(nullptr), x(0), y(0) {}
MouseMovedWindowEvent(double x, double y) : x(x), y(y) {}
MouseMovedWindowEvent(double x, double y, void* userData = nullptr) : Event(userData), x(x), y(y) {}
~MouseMovedWindowEvent() {
@@ -157,9 +157,9 @@ namespace Archimedes {
public:
FocusedWindowEvent() : window(nullptr) {}
FocusedWindowEvent() : Event(nullptr), window(nullptr) {}
FocusedWindowEvent(const Window* w) : window(w) {}
FocusedWindowEvent(const Window* w, void* userData = nullptr) : Event(userData), window(w) {}
~FocusedWindowEvent() {
@@ -174,9 +174,9 @@ namespace Archimedes {
public:
FocusLostWindowEvent() : window(nullptr) {}
FocusLostWindowEvent() : Event(nullptr), window(nullptr) {}
FocusLostWindowEvent(const Window* w) : window(w) {}
FocusLostWindowEvent(const Window* w, void* userData = nullptr) : Event(userData), window(w) {}
~FocusLostWindowEvent() {
@@ -191,9 +191,9 @@ namespace Archimedes {
public:
MovedWindowEvent() : x(0), y(0) {}
MovedWindowEvent() : Event(nullptr), x(0), y(0) {}
MovedWindowEvent(int x, int y) : x(x), y(y) {}
MovedWindowEvent(int x, int y, void* userData = nullptr) : Event(userData), x(x), y(y) {}
~MovedWindowEvent() {