No color picking while playing

Change so color picking can't be used during playback as this causes
some issues. Would be nice to support it but at least this doesn't screw
everything up.

Closes #76
This commit is contained in:
Daniel Collin 2013-07-01 12:10:12 +02:00
parent 23f5a4912f
commit 5e2743d9b8
3 changed files with 9 additions and 3 deletions

View File

@ -278,6 +278,7 @@ void Editor_create()
s_editorData.trackData.startRow = 0;
s_editorData.trackData.endRow = 10000;
s_editorData.trackData.highlightRowStep = 8;
s_editorData.trackData.isPlaying = false;
Emgui_setDefaultFont();
}
@ -1182,6 +1183,7 @@ static void onEnterCurrentValue()
static void onPlay()
{
RemoteConnection_sendPauseCommand(!RemoteConnection_isPaused());
getTrackData()->isPlaying = !RemoteConnection_isPaused();
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -73,6 +73,7 @@ typedef struct TrackData
int endRow;
int highlightRowStep;
char* editText;
bool isPlaying;
} TrackData;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -342,10 +342,13 @@ static int renderChannel(struct TrackInfo* info, int startX, Track* trackData, b
{
if (drawColorButton(color, startX + 4, info->startY - colorbar_adjust, size))
{
Dialog_showColorPicker(&trackData->color);
if (!info->trackData->isPlaying)
{
Dialog_showColorPicker(&trackData->color);
if (trackData->color != color)
s_needsUpdate = true;
if (trackData->color != color)
s_needsUpdate = true;
}
}
}
else