Skip to content

Commit

Permalink
restructured number screen code
Browse files Browse the repository at this point in the history
  • Loading branch information
astriiddev committed Jul 21, 2024
1 parent 24e726b commit 6eff7e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 0 additions & 4 deletions Source/NumberScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,6 @@ void NumberScreen::bitInit()

void NumberScreen::timerCallback()
{
static bool lastMode = false;
static juce::Point<int> lastMousePos = { 0, 0 };
static float lastSamp = 0.0f;

if (audioProcessor.getBypassState()) return;

const juce::Point<int> mousePos = getMouseXYRelative();
Expand Down
7 changes: 4 additions & 3 deletions Source/NumberScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class NumberScreen : public juce::Component,

bool editingPreGain { false },
editingPostGain{ false },
editingBlend { false };
editingBlend { false },
lastMode { false };

const int bitW{ 49 }, bitY{ 12 }, bitH{ 70 };

int mouseOverBit{ -1 };

typedef struct
Expand All @@ -75,7 +75,8 @@ class NumberScreen : public juce::Component,

const juce::Rectangle<int> screenNums { 10, bitY, 388, bitH };

float lastMouseY = 0.0f;
float lastMouseY = 0.0f, lastSamp = 0.0f;
juce::Point<int> lastMousePos = { 0, 0 };

BitDosAudioProcessor& audioProcessor;

Expand Down

0 comments on commit 6eff7e6

Please sign in to comment.