Revert changes
This commit is contained in:
parent
1d5c98440f
commit
7a8b595e2a
|
@ -158,7 +158,7 @@ void FurnaceGUI::drawPiano() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
if (pianoInputPadMode==1 && cursor.xFine>0) {
|
if (pianoInputPadMode==1 && cursor.xFine>0 && curWindow==GUI_WINDOW_PATTERN) {
|
||||||
ImVec2 buttonSize=ImGui::GetContentRegionAvail();
|
ImVec2 buttonSize=ImGui::GetContentRegionAvail();
|
||||||
if (ImGui::BeginTable("InputPadP",8,ImGuiTableFlags_SizingFixedSame)) {
|
if (ImGui::BeginTable("InputPadP",8,ImGuiTableFlags_SizingFixedSame)) {
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
|
@ -431,7 +431,7 @@ void FurnaceGUI::drawPiano() {
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
// draw input pad if necessary
|
// draw input pad if necessary
|
||||||
if ((pianoInputPadMode==2 && cursor.xFine>0) || pianoInputPadMode==3) {
|
if (curWindow==GUI_WINDOW_PATTERN && ((pianoInputPadMode==2 && cursor.xFine>0) || pianoInputPadMode==3)) {
|
||||||
if (ImGui::Begin("Input Pad",NULL,ImGuiWindowFlags_NoTitleBar)) {
|
if (ImGui::Begin("Input Pad",NULL,ImGuiWindowFlags_NoTitleBar)) {
|
||||||
ImGui::BeginDisabled(cursor.xFine==0);
|
ImGui::BeginDisabled(cursor.xFine==0);
|
||||||
if (ImGui::BeginTable("InputPad",3,ImGuiTableFlags_Borders)) {
|
if (ImGui::BeginTable("InputPad",3,ImGuiTableFlags_Borders)) {
|
||||||
|
|
|
@ -44,8 +44,6 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
ImGui::SetNextWindowPos(patWindowPos);
|
ImGui::SetNextWindowPos(patWindowPos);
|
||||||
ImGui::SetNextWindowSize(patWindowSize);
|
ImGui::SetNextWindowSize(patWindowSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ImGui::Begin("Sample Editor",&sampleEditOpen,globalWinFlags|(settings.allowEditDocking?0:ImGuiWindowFlags_NoDocking))) {
|
if (ImGui::Begin("Sample Editor",&sampleEditOpen,globalWinFlags|(settings.allowEditDocking?0:ImGuiWindowFlags_NoDocking))) {
|
||||||
if (curSample<0 || curSample>=(int)e->song.sample.size()) {
|
if (curSample<0 || curSample>=(int)e->song.sample.size()) {
|
||||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY()+(ImGui::GetContentRegionAvail().y-ImGui::GetFrameHeightWithSpacing()*2.0f)*0.5f);
|
ImGui::SetCursorPosY(ImGui::GetCursorPosY()+(ImGui::GetContentRegionAvail().y-ImGui::GetFrameHeightWithSpacing()*2.0f)*0.5f);
|
||||||
|
@ -186,13 +184,11 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
popToggleColors();
|
popToggleColors();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
bool doLoop=(sample->isLoopable());
|
bool doLoop=(sample->isLoopable());
|
||||||
static int stepSize = 1;
|
|
||||||
if (ImGui::Checkbox("Loop",&doLoop)) { MARK_MODIFIED
|
if (ImGui::Checkbox("Loop",&doLoop)) { MARK_MODIFIED
|
||||||
if (doLoop) {
|
if (doLoop) {
|
||||||
sample->loop=true;
|
sample->loop=true;
|
||||||
sample->loopStart=0;
|
sample->loopStart=0;
|
||||||
sample->loopEnd=sample->samples;
|
sample->loopEnd=sample->samples;
|
||||||
stepSize = 1;
|
|
||||||
} else {
|
} else {
|
||||||
sample->loop=false;
|
sample->loop=false;
|
||||||
sample->loopStart=-1;
|
sample->loopStart=-1;
|
||||||
|
@ -203,20 +199,6 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
e->renderSamplesP();
|
e->renderSamplesP();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
static bool snesLoopCheckbox = false;
|
|
||||||
ImGui::Checkbox("SNES", &snesLoopCheckbox);
|
|
||||||
{
|
|
||||||
if (snesLoopCheckbox) {
|
|
||||||
snesLoopCheckbox = true;
|
|
||||||
stepSize = 16;
|
|
||||||
} else {
|
|
||||||
snesLoopCheckbox = false;
|
|
||||||
stepSize = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||||
ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!");
|
ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!");
|
||||||
}
|
}
|
||||||
|
@ -385,7 +367,7 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
keepLoopAlive=false;
|
keepLoopAlive=false;
|
||||||
ImGui::Text("Mode");
|
ImGui::Text("Mode");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x / 2);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
if (ImGui::BeginCombo("##SampleLoopMode",loopType.c_str())) {
|
if (ImGui::BeginCombo("##SampleLoopMode",loopType.c_str())) {
|
||||||
for (int i=0; i<DIV_SAMPLE_LOOP_MAX; i++) {
|
for (int i=0; i<DIV_SAMPLE_LOOP_MAX; i++) {
|
||||||
if (sampleLoopModes[i]==NULL) continue;
|
if (sampleLoopModes[i]==NULL) continue;
|
||||||
|
@ -399,23 +381,11 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
}
|
}
|
||||||
ImGui::EndCombo();
|
ImGui::EndCombo();
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Text("Step");
|
|
||||||
ImGui::SameLine();
|
|
||||||
//ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
|
||||||
|
|
||||||
if (ImGui::InputInt("##LoopStepSize",&stepSize,1,16)) {
|
|
||||||
if (stepSize<0) {
|
|
||||||
stepSize = 0;
|
|
||||||
}
|
|
||||||
if (stepSize>1024) {
|
|
||||||
stepSize = 1024;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui::Text("Start");
|
ImGui::Text("Start");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
if (ImGui::InputInt("##LoopStartPosition",&sample->loopStart,stepSize,16)) { MARK_MODIFIED
|
if (ImGui::InputInt("##LoopStartPosition",&sample->loopStart,1,16)) { MARK_MODIFIED
|
||||||
if (sample->loopStart<0) {
|
if (sample->loopStart<0) {
|
||||||
sample->loopStart=0;
|
sample->loopStart=0;
|
||||||
}
|
}
|
||||||
|
@ -437,7 +407,7 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
ImGui::Text("End");
|
ImGui::Text("End");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
if (ImGui::InputInt("##LoopEndPosition",&sample->loopEnd,stepSize,16)) { MARK_MODIFIED
|
if (ImGui::InputInt("##LoopEndPosition",&sample->loopEnd,1,16)) { MARK_MODIFIED
|
||||||
if (sample->loopEnd<sample->loopStart) {
|
if (sample->loopEnd<sample->loopStart) {
|
||||||
sample->loopEnd=sample->loopStart;
|
sample->loopEnd=sample->loopStart;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue