From 670a2b3ca58f6a7cdb57cf7cd70bd6568f9b6777 Mon Sep 17 00:00:00 2001 From: Ben Kyd Date: Tue, 25 Oct 2022 18:21:28 +0100 Subject: [PATCH] well that was largely irrelavent wasn't it --- src/inferno.cpp | 12 ++++++++++++ src/inferno.hpp | 11 +++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/inferno.cpp b/src/inferno.cpp index 78cbe9d..6de00c0 100644 --- a/src/inferno.cpp +++ b/src/inferno.cpp @@ -46,6 +46,8 @@ void Inferno::uiPreset() int Inferno::run() { + mWin->setKeyCallback(&handleKbd); + mWin->setMouseCallback(&handlePtr); while (true) { if (!mWin->newFrame()) { break; } @@ -110,4 +112,14 @@ int Inferno::run() return 0; } +void handleKbd(int key, int scan, int action, int mod) +{ + +} + +void handlePtr(double x, double y) +{ + +} + } diff --git a/src/inferno.hpp b/src/inferno.hpp index 526a796..5bba487 100644 --- a/src/inferno.hpp +++ b/src/inferno.hpp @@ -10,7 +10,6 @@ class GLFWwindow; class RasterizeRenderer; class Scene; - class Inferno { public: @@ -20,13 +19,21 @@ public: void uiPreset(); int run(); +private: + double mLastMouseX, mLastMouseY; + + friend void handleKbd(int key, int scan, int action, int mod); + friend void handlePtr(double x, double y); + private: RasterizeRenderer* mRasterRenderer; - Scene* mScene; private: Window* mWin; }; +void handleKbd(int key, int scan, int action, int mod); +void handlePtr(double x, double y); + }