Skip to content

Commit

Permalink
Disable toggle pause on mouse click
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed Dec 6, 2023
1 parent 3869207 commit d971539
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,15 +1018,22 @@ static void preview_screen(void)
};
fft_render(preview_boundary, m);

#if 0
// TODO: there must be a visual clue that we paused the music.
// Cause when you accidentally click on the preview it feels weird.
// TODO: Current UI paradigm can handle with the buttons overlap.
// The preview "button" overlaps with volume slider, fullscreen and other
// overlay UI elements
if (button(preview_boundary) & BS_CLICKED) {
if (IsMusicStreamPlaying(track->music)) {
PauseMusicStream(track->music);
} else {
ResumeMusicStream(track->music);
}
}
#else
(void) button_with_location; // NOTE: the disabled code is the only user of this functions right now
#endif

static float hud_timer = HUD_TIMER_SECS;
if (hud_timer > 0.0) {
Expand All @@ -1052,13 +1059,22 @@ static void preview_screen(void)
.height = h - timeline_height
};

#if 0
// TODO: there must be a visual clue that we paused the music.
// Cause when you accidentally click on the preview it feels weird.
// TODO: Current UI paradigm can handle with the buttons overlap.
// The preview "button" overlaps with volume slider, fullscreen and other
// overlay UI elements
if (button(preview_boundary) & BS_CLICKED) {
if (IsMusicStreamPlaying(track->music)) {
PauseMusicStream(track->music);
} else {
ResumeMusicStream(track->music);
}
}
#else
(void) button_with_location; // NOTE: the disabled code is the only user of this functions right now
#endif

BeginScissorMode(preview_boundary.x, preview_boundary.y, preview_boundary.width, preview_boundary.height);
fft_render(preview_boundary, m);
Expand Down

0 comments on commit d971539

Please sign in to comment.