Skip to content

Commit 6eff7e6

Browse files
committed
restructured number screen code
1 parent 24e726b commit 6eff7e6

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Source/NumberScreen.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,6 @@ void NumberScreen::bitInit()
276276

277277
void NumberScreen::timerCallback()
278278
{
279-
static bool lastMode = false;
280-
static juce::Point<int> lastMousePos = { 0, 0 };
281-
static float lastSamp = 0.0f;
282-
283279
if (audioProcessor.getBypassState()) return;
284280

285281
const juce::Point<int> mousePos = getMouseXYRelative();

Source/NumberScreen.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ class NumberScreen : public juce::Component,
4747

4848
bool editingPreGain { false },
4949
editingPostGain{ false },
50-
editingBlend { false };
50+
editingBlend { false },
51+
lastMode { false };
5152

5253
const int bitW{ 49 }, bitY{ 12 }, bitH{ 70 };
53-
5454
int mouseOverBit{ -1 };
5555

5656
typedef struct
@@ -75,7 +75,8 @@ class NumberScreen : public juce::Component,
7575

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

78-
float lastMouseY = 0.0f;
78+
float lastMouseY = 0.0f, lastSamp = 0.0f;
79+
juce::Point<int> lastMousePos = { 0, 0 };
7980

8081
BitDosAudioProcessor& audioProcessor;
8182

0 commit comments

Comments
 (0)