Merge branch 'master' into fixedblock2
This commit is contained in:
commit
24cffc562a
18 changed files with 81 additions and 46 deletions
|
|
@ -139,7 +139,7 @@ void FurnaceGUI::drawCSPlayer() {
|
|||
if (ImGui::BeginTabBar("CSOptions")) {
|
||||
int chans=e->getTotalChannelCount();
|
||||
if (ImGui::BeginTabItem(_("Status"))) {
|
||||
if (ImGui::BeginTable("CSStat",12,ImGuiTableFlags_SizingFixedSame|ImGuiTableFlags_ScrollX|ImGuiTableFlags_Borders)) {
|
||||
if (ImGui::BeginTable("CSStat",13,ImGuiTableFlags_SizingStretchSame|ImGuiTableFlags_ScrollX|ImGuiTableFlags_Borders)) {
|
||||
ImGui::TableSetupScrollFreeze(1,1);
|
||||
ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
|
||||
ImGui::TableNextColumn();
|
||||
|
|
|
|||
|
|
@ -71,47 +71,51 @@ const char* sampleNote[12]={
|
|||
}
|
||||
|
||||
#define SIMPLE_DRAG_SOURCE(_c,_toMoveVar) \
|
||||
if (settings.draggableDataView && ImGui::BeginDragDropSource()) { \
|
||||
_toMoveVar=i; \
|
||||
ImGui::SetDragDropPayload(_c,NULL,0,ImGuiCond_Once); \
|
||||
ImGui::Button(ICON_FA_ARROWS "##AssetDrag"); \
|
||||
ImGui::EndDragDropSource(); \
|
||||
if (settings.draggableDataView) { \
|
||||
if (ImGui::BeginDragDropSource()) { \
|
||||
_toMoveVar=i; \
|
||||
ImGui::SetDragDropPayload(_c,NULL,0,ImGuiCond_Once); \
|
||||
ImGui::Button(ICON_FA_ARROWS "##AssetDrag"); \
|
||||
ImGui::EndDragDropSource(); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SIMPLE_DRAG_TARGET(_c,_toMoveVar,_curVar,_swapFn,_moveUpFn,_moveDownFn) \
|
||||
if (settings.draggableDataView && ImGui::BeginDragDropTarget()) { \
|
||||
const ImGuiPayload* payload=ImGui::AcceptDragDropPayload(_c); \
|
||||
if (payload!=NULL) { \
|
||||
int target=i; \
|
||||
bool markModified=false; \
|
||||
if (_toMoveVar!=target) { \
|
||||
if (ImGui::IsKeyDown(ImGuiKey_ModCtrl)) { \
|
||||
markModified=_swapFn(_toMoveVar,target); \
|
||||
} else { \
|
||||
while (_toMoveVar>target) { \
|
||||
if (_moveUpFn(_toMoveVar)) { \
|
||||
_toMoveVar--; \
|
||||
markModified=true; \
|
||||
} else { \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
while (_toMoveVar<target) { \
|
||||
if (_moveDownFn(_toMoveVar)) { \
|
||||
_toMoveVar++; \
|
||||
markModified=true; \
|
||||
} else { \
|
||||
break; \
|
||||
if (settings.draggableDataView) { \
|
||||
if (ImGui::BeginDragDropTarget()) { \
|
||||
const ImGuiPayload* payload=ImGui::AcceptDragDropPayload(_c); \
|
||||
if (payload!=NULL) { \
|
||||
int target=i; \
|
||||
bool markModified=false; \
|
||||
if (_toMoveVar!=target) { \
|
||||
if (ImGui::IsKeyDown(ImGuiKey_ModCtrl)) { \
|
||||
markModified=_swapFn(_toMoveVar,target); \
|
||||
} else { \
|
||||
while (_toMoveVar>target) { \
|
||||
if (_moveUpFn(_toMoveVar)) { \
|
||||
_toMoveVar--; \
|
||||
markModified=true; \
|
||||
} else { \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
while (_toMoveVar<target) { \
|
||||
if (_moveDownFn(_toMoveVar)) { \
|
||||
_toMoveVar++; \
|
||||
markModified=true; \
|
||||
} else { \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
_curVar=target; \
|
||||
} \
|
||||
_curVar=target; \
|
||||
if (markModified) { \
|
||||
MARK_MODIFIED; \
|
||||
} \
|
||||
_toMoveVar=-1; \
|
||||
ImGui::EndDragDropTarget(); \
|
||||
} \
|
||||
if (markModified) { \
|
||||
MARK_MODIFIED; \
|
||||
} \
|
||||
_toMoveVar=-1; \
|
||||
ImGui::EndDragDropTarget(); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -676,6 +676,10 @@ void FurnaceGUI::doPasteFurnace(PasteMode mode, int arg, bool readClipboard, Str
|
|||
}
|
||||
}
|
||||
|
||||
if (mode==GUI_PASTE_MODE_OVERFLOW && !e->isPlaying()) {
|
||||
setOrder(curOrder);
|
||||
}
|
||||
|
||||
if (readClipboard) {
|
||||
if (settings.cursorPastePos) {
|
||||
makeCursorUndo();
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ void FurnaceGUI::doReplace() {
|
|||
|
||||
switch (queryReplaceEffectPos) {
|
||||
case 0: // clear
|
||||
for (int j=0; j<e->song.subsong[i.subsong]->pat[i.x].effectCols; j++) {
|
||||
for (int j=0; j<e->song.subsong[i.subsong]->pat[i.x].effectCols && j<8; j++) {
|
||||
effectOrder[j]=j;
|
||||
}
|
||||
break;
|
||||
|
|
@ -380,7 +380,7 @@ void FurnaceGUI::doReplace() {
|
|||
for (int j=0; j<8 && placementIndex<8 && i.effectPos[j]>=0; j++) {
|
||||
effectOrder[placementIndex++]=i.effectPos[j];
|
||||
}
|
||||
for (int j=0; j<e->song.subsong[i.subsong]->pat[i.x].effectCols; j++) {
|
||||
for (int j=0; j<e->song.subsong[i.subsong]->pat[i.x].effectCols && placementIndex<8 && j<8; j++) {
|
||||
if (p->data[i.y][4+j*2]!=-1 || p->data[i.y][5+j*2]!=-1) {
|
||||
effectOrder[placementIndex++]=j;
|
||||
}
|
||||
|
|
@ -392,7 +392,7 @@ void FurnaceGUI::doReplace() {
|
|||
for (int j=0; j<8 && placementIndex<8 && i.effectPos[j]>=0; j++) {
|
||||
effectOrder[placementIndex++]=i.effectPos[j];
|
||||
}
|
||||
for (int j=0; j<e->song.subsong[i.subsong]->pat[i.x].effectCols; j++) {
|
||||
for (int j=0; j<e->song.subsong[i.subsong]->pat[i.x].effectCols && placementIndex<8 && j<8; j++) {
|
||||
if (p->data[i.y][4+j*2]!=-1 || p->data[i.y][5+j*2]!=-1) {
|
||||
effectOrder[placementIndex++]=j;
|
||||
}
|
||||
|
|
@ -406,7 +406,7 @@ void FurnaceGUI::doReplace() {
|
|||
}
|
||||
case 3: { // insert in free spaces
|
||||
int placementIndex=0;
|
||||
for (int j=0; j<e->song.subsong[i.subsong]->pat[i.x].effectCols; j++) {
|
||||
for (int j=0; j<e->song.subsong[i.subsong]->pat[i.x].effectCols && j<8; j++) {
|
||||
if (p->data[i.y][4+j*2]==-1 && p->data[i.y][5+j*2]==-1) {
|
||||
effectOrder[placementIndex++]=j;
|
||||
}
|
||||
|
|
@ -415,7 +415,7 @@ void FurnaceGUI::doReplace() {
|
|||
}
|
||||
}
|
||||
|
||||
for (int j=0; j<queryReplaceEffectCount; j++) {
|
||||
for (int j=0; j<queryReplaceEffectCount && j<8; j++) {
|
||||
signed char pos=effectOrder[j];
|
||||
if (pos==-1) continue;
|
||||
if (queryReplaceEffectDo[j]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue