GUI: don't warn while loop start/end focused
very ugly workaround to #2587
This commit is contained in:
parent
5e0cd830f1
commit
d243bafc6f
|
@ -8867,6 +8867,8 @@ FurnaceGUI::FurnaceGUI():
|
|||
sampleDragMode(false),
|
||||
sampleDrag16(false),
|
||||
sampleZoomAuto(true),
|
||||
sampleCheckLoopStart(true),
|
||||
sampleCheckLoopEnd(true),
|
||||
sampleSelTarget(0),
|
||||
sampleDragTarget(NULL),
|
||||
sampleDragStart(0,0),
|
||||
|
|
|
@ -2583,6 +2583,7 @@ class FurnaceGUI {
|
|||
int sampleSelStart, sampleSelEnd;
|
||||
bool sampleInfo, sampleCompatRate;
|
||||
bool sampleDragActive, sampleDragMode, sampleDrag16, sampleZoomAuto;
|
||||
bool sampleCheckLoopStart, sampleCheckLoopEnd;
|
||||
// 0: start
|
||||
// 1: end
|
||||
unsigned char sampleSelTarget;
|
||||
|
|
|
@ -733,7 +733,7 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
}
|
||||
popWarningColor();
|
||||
|
||||
pushWarningColor(!warnLoopPos.empty() || !warnLoopStart.empty());
|
||||
pushWarningColor(!warnLoopPos.empty() || (!warnLoopStart.empty() && sampleCheckLoopStart));
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text(_("Start"));
|
||||
ImGui::SameLine();
|
||||
|
@ -752,8 +752,11 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
}
|
||||
if (ImGui::IsItemActive()) {
|
||||
keepLoopAlive=true;
|
||||
sampleCheckLoopStart=false;
|
||||
} else {
|
||||
sampleCheckLoopStart=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered() && (!warnLoopPos.empty() || !warnLoopStart.empty() || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
||||
if (ImGui::IsItemHovered() && (!warnLoopPos.empty() || (!warnLoopStart.empty() && sampleCheckLoopStart) || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
||||
if (ImGui::BeginTooltip()) {
|
||||
if (sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||
ImGui::Text(_("changing the loop in a BRR sample may result in glitches!"));
|
||||
|
@ -769,7 +772,7 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
}
|
||||
popWarningColor();
|
||||
|
||||
pushWarningColor(!warnLoopPos.empty() || !warnLoopEnd.empty());
|
||||
pushWarningColor(!warnLoopPos.empty() || (!warnLoopEnd.empty() && sampleCheckLoopEnd));
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text(_("End"));
|
||||
ImGui::SameLine();
|
||||
|
@ -788,8 +791,11 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
}
|
||||
if (ImGui::IsItemActive()) {
|
||||
keepLoopAlive=true;
|
||||
sampleCheckLoopEnd=false;
|
||||
} else {
|
||||
sampleCheckLoopEnd=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered() && (!warnLoopPos.empty() || !warnLoopEnd.empty() || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
||||
if (ImGui::IsItemHovered() && (!warnLoopPos.empty() || (!warnLoopEnd.empty() && sampleCheckLoopEnd) || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
||||
if (ImGui::BeginTooltip()) {
|
||||
if (sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||
ImGui::Text(_("changing the loop in a BRR sample may result in glitches!"));
|
||||
|
|
Loading…
Reference in a new issue