gui updates
This commit is contained in:
parent
05ac11b24c
commit
b8f125b472
42 changed files with 1179 additions and 962 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "Vec.hpp"
|
||||
#include "List.hpp"
|
||||
#include "Map.hpp"
|
||||
#include "Timing.hpp"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
|
|
@ -15,6 +16,7 @@ namespace tp {
|
|||
BUTTON_ACTION,
|
||||
MOUSE_DELTA,
|
||||
MOUSE_POS,
|
||||
SCROLL,
|
||||
} type = Type::NONE;
|
||||
|
||||
enum class ButtonAction {
|
||||
|
|
@ -26,6 +28,7 @@ namespace tp {
|
|||
} buttonAction = ButtonAction::NONE;
|
||||
|
||||
Vec2F mouseEvent = { 0, 0 };
|
||||
Vec2F scrollDelta = { 0, 0 };
|
||||
};
|
||||
|
||||
class InputState {
|
||||
|
|
@ -89,10 +92,13 @@ namespace tp {
|
|||
// input states
|
||||
Vec2F mPointer;
|
||||
Vec2F mPointerPrev;
|
||||
Vec2F mScrollDelta;
|
||||
|
||||
halnf mPointerPressure = 0;
|
||||
|
||||
InputState mInputStates[(int) InputID::LAST_KEY_CODE]{};
|
||||
|
||||
Timer mTimerEvent = Timer(1000);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -17,8 +17,8 @@ namespace tp {
|
|||
explicit DebugGUI(Window* window);
|
||||
~DebugGUI();
|
||||
|
||||
void procBegin() {}
|
||||
void procEnd() {}
|
||||
void procBegin();
|
||||
void procEnd();
|
||||
|
||||
void drawBegin();
|
||||
void drawEnd();
|
||||
|
|
|
|||
|
|
@ -143,8 +143,10 @@ namespace tp {
|
|||
MOUSE4 = 504,
|
||||
MOUSE5 = 505,
|
||||
|
||||
LAST_KEY_CODE = 508,
|
||||
SCROLL,
|
||||
|
||||
WINDOW_RESIZE = 1000,
|
||||
WINDOW_RESIZE,
|
||||
|
||||
LAST_KEY_CODE,
|
||||
};
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ namespace tp {
|
|||
~Window();
|
||||
|
||||
public:
|
||||
static Window* createWindow(Vec2F size = { 500.f, 500.f }, const char* title = "Window");
|
||||
static Window* createWindow(Vec2F size = { 1000.f, 700.f }, const char* title = "Window");
|
||||
static void destroyWindow(Window* window);
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue