instrument drag&drop: adding option to disable
This commit is contained in:
parent
8aeb50bc32
commit
0b4cf34e4d
|
@ -71,7 +71,7 @@ const char* sampleNote[12]={
|
|||
}
|
||||
|
||||
#define SIMPLE_DRAG_SOURCE(_c,_toMoveVar) \
|
||||
if (ImGui::BeginDragDropSource()) { \
|
||||
if (settings.draggableDataView && ImGui::BeginDragDropSource()) { \
|
||||
_toMoveVar=i; \
|
||||
ImGui::SetDragDropPayload(_c,NULL,0,ImGuiCond_Once); \
|
||||
ImGui::Button(ICON_FA_ARROWS "##AssetDrag"); \
|
||||
|
@ -79,7 +79,7 @@ const char* sampleNote[12]={
|
|||
}
|
||||
|
||||
#define SIMPLE_DRAG_TARGET(_c,_toMoveVar,_curVar,_swapFn,_moveUpFn,_moveDownFn) \
|
||||
if (ImGui::BeginDragDropTarget()) { \
|
||||
if (settings.draggableDataView && ImGui::BeginDragDropTarget()) { \
|
||||
const ImGuiPayload* payload=ImGui::AcceptDragDropPayload(_c); \
|
||||
if (payload!=NULL) { \
|
||||
int target=i; \
|
||||
|
|
|
@ -1914,6 +1914,7 @@ class FurnaceGUI {
|
|||
int doubleClickColumn;
|
||||
int blankIns;
|
||||
int dragMovesSelection;
|
||||
int draggableDataView;
|
||||
int cursorFollowsOrder;
|
||||
int unsignedDetune;
|
||||
int noThreadedInput;
|
||||
|
@ -2176,6 +2177,7 @@ class FurnaceGUI {
|
|||
doubleClickColumn(1),
|
||||
blankIns(0),
|
||||
dragMovesSelection(1),
|
||||
draggableDataView(1),
|
||||
cursorFollowsOrder(1),
|
||||
unsignedDetune(0),
|
||||
noThreadedInput(0),
|
||||
|
|
|
@ -2688,6 +2688,12 @@ void FurnaceGUI::drawSettings() {
|
|||
settingsChanged=true;
|
||||
}
|
||||
|
||||
bool draggableDataViewB=settings.draggableDataView;
|
||||
if (ImGui::Checkbox(_("Draggable instruments/samples/waves"),&draggableDataViewB)) {
|
||||
settings.draggableDataView=draggableDataViewB;
|
||||
settingsChanged=true;
|
||||
}
|
||||
|
||||
ImGui::Text(_("Note preview behavior:"));
|
||||
ImGui::Indent();
|
||||
if (ImGui::RadioButton(_("Never##npb0"),settings.notePreviewBehavior==0)) {
|
||||
|
@ -4960,6 +4966,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
|
||||
settings.doubleClickColumn=conf.getInt("doubleClickColumn",1);
|
||||
settings.dragMovesSelection=conf.getInt("dragMovesSelection",2);
|
||||
settings.draggableDataView=conf.getInt("draggableDataView",1);
|
||||
|
||||
settings.cursorFollowsOrder=conf.getInt("cursorFollowsOrder",1);
|
||||
|
||||
|
@ -5555,6 +5562,7 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
|
||||
conf.set("doubleClickColumn",settings.doubleClickColumn);
|
||||
conf.set("dragMovesSelection",settings.dragMovesSelection);
|
||||
conf.set("draggableDataView",settings.draggableDataView);
|
||||
|
||||
conf.set("cursorFollowsOrder",settings.cursorFollowsOrder);
|
||||
|
||||
|
|
Loading…
Reference in a new issue