distance to closest node displayed, timing problems with midi notes being sent 1 to 3ms too early, or too late

This commit is contained in:
Sebastian
2024-10-28 02:07:47 +01:00
parent 58766cc373
commit 06cb6d8319
11 changed files with 68 additions and 70 deletions
+7 -6
View File
@@ -27,12 +27,13 @@ class AppUI{
void drawSideBar(){
GuiWindowBox((Rectangle){0,0,280,(float)settings->height}, "config");
GuiPanel((Rectangle){-1,-30,280,(float)settings->height + 31}, "");
{
const int s_controls = 55;
if(GuiButton((Rectangle){20, (float)s_controls, 60, 30}, "PLAY")) sm->play ? sm->pause() : sm->start();
if(GuiButton((Rectangle){100, (float)s_controls, 60, 30}, "STOP")) sm->stop();
if(GuiButton((Rectangle){180, (float)s_controls, 60, 30}, "RESET")) sm->reset();
const int s_controls = 20;
//GuiSetStyle(BUTTON, STATE_FOCUSED, 0xFF0000FF);
if(GuiButton((Rectangle){20, (float)s_controls, 80, 30}, "PLAY")) sm->play ? sm->pause() : sm->start();
if(GuiButton((Rectangle){120, (float)s_controls, 60, 30}, "STOP")) sm->stop();
if(GuiButton((Rectangle){200, (float)s_controls, 60, 30}, "RESET")) sm->reset();
const int s_bpm = s_controls + 35;
GuiLabel((Rectangle){20, (float)s_bpm, 120, 20}, "TIMING");
@@ -83,7 +84,7 @@ class AppUI{
if(GuiButton((Rectangle){20, (float)s_nodes + 60, 240, 20}, "ADD RANDOM NODE")){
nm->addNode(200.0f, 200.0f);
}
DrawText(std::format("{}", nm->nodes.size()).c_str(), 20, settings->height - 70, 15, VS_COLOR_WHITE);
DrawFPS(20, settings->height - 30);
}
}