comence a implementar selecció, canvie de comp
This commit is contained in:
6
main.cpp
6
main.cpp
@@ -22,6 +22,11 @@ bool muted[4] = { false, false, false, false };
|
|||||||
int selected_channel = 0;
|
int selected_channel = 0;
|
||||||
int selected_row = 0;
|
int selected_row = 0;
|
||||||
int selected_part = 0;
|
int selected_part = 0;
|
||||||
|
|
||||||
|
int selected_channel_end = -1;
|
||||||
|
int selected_row_end = -1;
|
||||||
|
int selected_part_end = -1;
|
||||||
|
|
||||||
int scroll = 0;
|
int scroll = 0;
|
||||||
int base_octave = 4;
|
int base_octave = 4;
|
||||||
int current_instrument = 0;
|
int current_instrument = 0;
|
||||||
@@ -136,6 +141,7 @@ int main(int argc, char* argv[]) {
|
|||||||
if (sdlEvent.type == SDL_MOUSEBUTTONDOWN) {
|
if (sdlEvent.type == SDL_MOUSEBUTTONDOWN) {
|
||||||
if (sdlEvent.button.button == SDL_BUTTON_LEFT) {
|
if (sdlEvent.button.button == SDL_BUTTON_LEFT) {
|
||||||
if ((sdlEvent.button.x >= 13) && (sdlEvent.button.x <= 149) && (sdlEvent.button.y >= 14) && (sdlEvent.button.y <= 239) ) {
|
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_row = scroll + int((sdlEvent.button.y-14)/7);
|
||||||
selected_channel = (sdlEvent.button.x-13)/35;
|
selected_channel = (sdlEvent.button.x-13)/35;
|
||||||
int part_pos = (sdlEvent.button.x-13)-(selected_channel*35);
|
int part_pos = (sdlEvent.button.x-13)-(selected_channel*35);
|
||||||
|
|||||||
Reference in New Issue
Block a user