global mouse moved to state and removed some GetMousePosition()s.

This commit is contained in:
Sebastian
2024-11-14 01:37:16 +01:00
parent 5d3b72d4ef
commit 2e103dc561
10 changed files with 58 additions and 60 deletions
+5 -2
View File
@@ -6,7 +6,6 @@
namespace VISEQ::APP{
struct AppSettings{
int mode = 0;
int width;
int height;
float grid;
@@ -15,7 +14,7 @@ namespace VISEQ::APP{
float speed = 16.0f;
int gui_selected_midi_out;
};
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(AppSettings, mode, width, height, grid, bpm, fps, speed, gui_selected_midi_out)
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(AppSettings, width, height, grid, bpm, fps, speed, gui_selected_midi_out)
class State{
public:
@@ -24,9 +23,13 @@ namespace VISEQ::APP{
void operator=(const State &) = delete;
AppSettings settings;
Vec2Df raw_mouse;
Vec2Df screen_mouse;
Vec2Df mod_mouse;
int node_mode = 0;
inline static std::shared_ptr<State> instance;
static std::shared_ptr<State> get() {
if(!instance){