From 4d447f4d366e83eb7cfbae616ef95364c5126bd8 Mon Sep 17 00:00:00 2001 From: JailDoctor Date: Tue, 21 Sep 2021 07:26:24 +0200 Subject: [PATCH] =?UTF-8?q?comence=20a=20implementar=20selecci=C3=B3,=20ca?= =?UTF-8?q?nvie=20de=20comp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.cpp b/main.cpp index 66bded7..7f5b1dd 100755 --- a/main.cpp +++ b/main.cpp @@ -22,6 +22,11 @@ bool muted[4] = { false, false, false, false }; int selected_channel = 0; int selected_row = 0; int selected_part = 0; + +int selected_channel_end = -1; +int selected_row_end = -1; +int selected_part_end = -1; + int scroll = 0; int base_octave = 4; int current_instrument = 0; @@ -136,6 +141,7 @@ int main(int argc, char* argv[]) { if (sdlEvent.type == SDL_MOUSEBUTTONDOWN) { if (sdlEvent.button.button == SDL_BUTTON_LEFT) { if ((sdlEvent.button.x >= 13) && (sdlEvent.button.x <= 149) && (sdlEvent.button.y >= 14) && (sdlEvent.button.y <= 239) ) { + selected_channel_end = -1; selected_row = scroll + int((sdlEvent.button.y-14)/7); selected_channel = (sdlEvent.button.x-13)/35; int part_pos = (sdlEvent.button.x-13)-(selected_channel*35);