mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-05 23:21:22 +00:00
GUI: better instrument value input
This commit is contained in:
parent
651db5784e
commit
b26ef5ac82
1 changed files with 4 additions and 1 deletions
|
@ -2410,9 +2410,12 @@ void FurnaceGUI::keyDown(SDL_Event& ev) {
|
||||||
if (pat->data[cursor.y][cursor.xFine+1]==-1) pat->data[cursor.y][cursor.xFine+1]=0;
|
if (pat->data[cursor.y][cursor.xFine+1]==-1) pat->data[cursor.y][cursor.xFine+1]=0;
|
||||||
pat->data[cursor.y][cursor.xFine+1]=((pat->data[cursor.y][cursor.xFine+1]<<4)|num)&0xff;
|
pat->data[cursor.y][cursor.xFine+1]=((pat->data[cursor.y][cursor.xFine+1]<<4)|num)&0xff;
|
||||||
if (cursor.xFine==1) { // instrument
|
if (cursor.xFine==1) { // instrument
|
||||||
|
if (pat->data[cursor.y][cursor.xFine+1]>=(int)e->song.ins.size()) {
|
||||||
|
pat->data[cursor.y][cursor.xFine+1]&=0x0f;
|
||||||
if (pat->data[cursor.y][cursor.xFine+1]>=(int)e->song.ins.size()) {
|
if (pat->data[cursor.y][cursor.xFine+1]>=(int)e->song.ins.size()) {
|
||||||
pat->data[cursor.y][cursor.xFine+1]=(int)e->song.ins.size()-1;
|
pat->data[cursor.y][cursor.xFine+1]=(int)e->song.ins.size()-1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
makeUndo(GUI_ACTION_PATTERN_EDIT);
|
makeUndo(GUI_ACTION_PATTERN_EDIT);
|
||||||
if (e->song.ins.size()<16) {
|
if (e->song.ins.size()<16) {
|
||||||
curNibble=false;
|
curNibble=false;
|
||||||
|
|
Loading…
Reference in a new issue