parent
cfcad1e689
commit
304a8b8722
|
|
@ -71,15 +71,18 @@ const char* sampleNote[12]={
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SIMPLE_DRAG_SOURCE(_c,_toMoveVar) \
|
#define SIMPLE_DRAG_SOURCE(_c,_toMoveVar) \
|
||||||
if (settings.draggableDataView && ImGui::BeginDragDropSource()) { \
|
if (settings.draggableDataView) { \
|
||||||
|
if (ImGui::BeginDragDropSource()) { \
|
||||||
_toMoveVar=i; \
|
_toMoveVar=i; \
|
||||||
ImGui::SetDragDropPayload(_c,NULL,0,ImGuiCond_Once); \
|
ImGui::SetDragDropPayload(_c,NULL,0,ImGuiCond_Once); \
|
||||||
ImGui::Button(ICON_FA_ARROWS "##AssetDrag"); \
|
ImGui::Button(ICON_FA_ARROWS "##AssetDrag"); \
|
||||||
ImGui::EndDragDropSource(); \
|
ImGui::EndDragDropSource(); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SIMPLE_DRAG_TARGET(_c,_toMoveVar,_curVar,_swapFn,_moveUpFn,_moveDownFn) \
|
#define SIMPLE_DRAG_TARGET(_c,_toMoveVar,_curVar,_swapFn,_moveUpFn,_moveDownFn) \
|
||||||
if (settings.draggableDataView && ImGui::BeginDragDropTarget()) { \
|
if (settings.draggableDataView) { \
|
||||||
|
if (ImGui::BeginDragDropTarget()) { \
|
||||||
const ImGuiPayload* payload=ImGui::AcceptDragDropPayload(_c); \
|
const ImGuiPayload* payload=ImGui::AcceptDragDropPayload(_c); \
|
||||||
if (payload!=NULL) { \
|
if (payload!=NULL) { \
|
||||||
int target=i; \
|
int target=i; \
|
||||||
|
|
@ -113,6 +116,7 @@ const char* sampleNote[12]={
|
||||||
_toMoveVar=-1; \
|
_toMoveVar=-1; \
|
||||||
ImGui::EndDragDropTarget(); \
|
ImGui::EndDragDropTarget(); \
|
||||||
} \
|
} \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
void FurnaceGUI::insListItem(int i, int dir, int asset) {
|
void FurnaceGUI::insListItem(int i, int dir, int asset) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue