diff --git a/src/gui/doAction.cpp b/src/gui/doAction.cpp index 56f1e32f..f7d09ff1 100644 --- a/src/gui/doAction.cpp +++ b/src/gui/doAction.cpp @@ -589,11 +589,23 @@ void FurnaceGUI::doAction(int what) { case GUI_ACTION_PAT_EXPAND_SONG: doExpandSong(collapseAmount); break; - case GUI_ACTION_PAT_LATCH: // TODO + case GUI_ACTION_PAT_LATCH: { + DivPattern* pat=e->curPat[cursor.xCoarse].getPattern(e->curOrders->ord[cursor.xCoarse][curOrder],true); + latchIns=pat->data[cursor.y][2]; + latchVol=pat->data[cursor.y][3]; + latchEffect=pat->data[cursor.y][4]; + latchEffectVal=pat->data[cursor.y][5]; + latchTarget=0; + latchNibble=false; break; - case GUI_ACTION_PAT_SCROLL_MODE: // TODO - break; - case GUI_ACTION_PAT_CLEAR_LATCH: // TODO + } + case GUI_ACTION_PAT_CLEAR_LATCH: + latchIns=-2; + latchVol=-1; + latchEffect=-1; + latchEffectVal=-1; + latchTarget=0; + latchNibble=false; break; case GUI_ACTION_INS_LIST_ADD: diff --git a/src/gui/editing.cpp b/src/gui/editing.cpp index b9e03511..1e55d86e 100644 --- a/src/gui/editing.cpp +++ b/src/gui/editing.cpp @@ -68,7 +68,7 @@ void FurnaceGUI::prepareUndo(ActionType action) { } break; case GUI_UNDO_PATTERN_COLLAPSE_SONG: - case GUI_UNDO_PATTERN_EXPAND_SONG: // TODO + case GUI_UNDO_PATTERN_EXPAND_SONG: // this is handled by doCollapseSong/doExpandSong break; case GUI_UNDO_REPLACE: // this is handled by doReplace() break; @@ -134,7 +134,7 @@ void FurnaceGUI::makeUndo(ActionType action) { } break; case GUI_UNDO_PATTERN_COLLAPSE_SONG: - case GUI_UNDO_PATTERN_EXPAND_SONG: // TODO + case GUI_UNDO_PATTERN_EXPAND_SONG: // this is handled by doCollapseSong/doExpandSong break; case GUI_UNDO_REPLACE: // this is handled by doReplace() break; diff --git a/src/gui/fileDialog.cpp b/src/gui/fileDialog.cpp index a0a45e1e..b9ec5f69 100644 --- a/src/gui/fileDialog.cpp +++ b/src/gui/fileDialog.cpp @@ -28,7 +28,6 @@ struct NFDState { } }; -// TODO: filter void _nfdThread(const NFDState state, std::atomic* ok, std::vector* result, bool* errorOutput) { nfdchar_t* out=NULL; nfdresult_t ret=NFD_CANCEL; diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 564bebad..47200f7b 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -1478,6 +1478,7 @@ void FurnaceGUI::drawSettings() { UI_KEYBIND_CONFIG(GUI_ACTION_PAT_COLLAPSE_SONG); UI_KEYBIND_CONFIG(GUI_ACTION_PAT_EXPAND_SONG); UI_KEYBIND_CONFIG(GUI_ACTION_PAT_LATCH); + UI_KEYBIND_CONFIG(GUI_ACTION_PAT_CLEAR_LATCH); KEYBIND_CONFIG_END; ImGui::TreePop();