void CUI_NewSong::update() { int key=0,act=0;; // act = Keys.size(); // key = Keys.checkkey(); UI->update(); if (Keys.size()) { key = Keys.getkey(); switch(key) { case DIK_LEFT: case DIK_RIGHT: if (UI->cur_element) UI->cur_element = 0; else UI->cur_element = 1; need_refresh++; fixmouse++; break; case DIK_Y: make_new_song(); act++; break; case DIK_N: case DIK_ESCAPE: act++; break; } } if (act) { close_popup_window(); fixmouse++; need_refresh++; } }
void TP_Load_Inc_Str(void) { UIP_LoadMsg->strselect++; if (UIP_LoadMsg->strselect>3) UIP_LoadMsg->strselect = 0; need_popup_refresh++; if (load_finished) { close_popup_window(); UIP_Loadscreen->clear = 1; fixmouse++; need_refresh++; } }
void CUI_SaveMsg::update() { int key=0; if (Keys.size()) { key = Keys.getkey(); } if (save_finished) { close_popup_window(); UIP_Savescreen->clear = 1; fixmouse++; need_refresh++; } }
void CUI_SongDuration::update() { int key=0,act=0;; // act = Keys.size(); // key = Keys.checkkey(); UI->update(); if (Keys.size()) { key = Keys.getkey(); switch(key) { case DIK_ESCAPE: act++; break; } } if (act) { close_popup_window(); fixmouse++; need_refresh++; } }
void CUI_PEVol::update() { int key=0; int i,j,iadd; event*e; ValueSlider *vs; UI->update(); if (Keys.size()) { key = Keys.getkey(); if (key == DIK_ESCAPE || (key == DIK_RETURN) || key==DIK_MOUSE_2_ON) { if (key == DIK_RETURN) { vs = (ValueSlider *)UI->get_element(0); cur_volume_percent = vs->value; for(i=select_track_start;i<=select_track_end;i++) { if (select_row_end - select_row_start > 0) { for(j=select_row_start;j<=select_row_end;j++) { e = song->patterns[cur_edit_pattern]->tracks[i]->get_event(j); if (e && (e->note<0x80 || e->vol<0x80)) { iadd = -1; if (e->inst<MAX_INSTS) iadd = song->instruments[e->inst]->default_volume; if (e->vol<0x80) iadd = e->vol; if (iadd!=-1) { iadd = iadd * cur_volume_percent / 100; if (iadd > 0x7F) iadd = 0x7F; if (iadd < 0) iadd = 0; song->patterns[cur_edit_pattern]->tracks[i]->update_event(j,-1,-1,iadd,-1,-1,-1); } } } } } } close_popup_window(); fixmouse++; need_refresh++; } } }
void CUI_SliderInput::update() { int key=0,act=0;; // act = Keys.size(); // key = Keys.checkkey(); UI->update(); if (Keys.size()) { key = Keys.getkey(); switch(key) { case DIK_ESCAPE: this->canceled = 1; act++; break; case DIK_RETURN: this->canceled = 0; act++; break; } } if (act) { close_popup_window(); fixmouse++; need_refresh++; } }
void BTNCLK_close_songduration(void) { Keys.flush(); close_popup_window(); fixmouse++; need_refresh++; }
void close_newsong_window(void) { Keys.flush(); close_popup_window(); fixmouse++; need_refresh++; }