Add action to set curIns based on current channel instrument at cursor (#2090)
* push test * remove test file * add GUI_ACTION_PAT_ABSORB_INSTRUMENT action (set current instrument to channel's current instrument column) --------- Co-authored-by: Adam Lederer <adam@adamlederer.com>
This commit is contained in:
parent
3cde827c17
commit
fca3ce02a7
4 changed files with 14 additions and 0 deletions
|
|
@ -676,6 +676,17 @@ void FurnaceGUI::doAction(int what) {
|
|||
latchTarget=0;
|
||||
latchNibble=false;
|
||||
break;
|
||||
case GUI_ACTION_PAT_ABSORB_INSTRUMENT: {
|
||||
DivPattern* pat=e->curPat[cursor.xCoarse].getPattern(e->curOrders->ord[cursor.xCoarse][curOrder],false);
|
||||
if (!pat) break;
|
||||
for (int i=cursor.y; i>=0; i--) {
|
||||
if (pat->data[i][2] >= 0) {
|
||||
curIns=pat->data[i][2];
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case GUI_ACTION_INS_LIST_ADD:
|
||||
if (settings.insTypeMenu) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue