GUI: only use edit color when pat view is focused
This commit is contained in:
parent
44f1134875
commit
71cef797c6
|
@ -2569,6 +2569,7 @@ bool FurnaceGUI::loop() {
|
||||||
ImGui_ImplSDL2_NewFrame(sdlWin);
|
ImGui_ImplSDL2_NewFrame(sdlWin);
|
||||||
ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
|
|
||||||
|
curWindowLast=curWindow;
|
||||||
curWindow=GUI_WINDOW_NOTHING;
|
curWindow=GUI_WINDOW_NOTHING;
|
||||||
editOptsVisible=false;
|
editOptsVisible=false;
|
||||||
|
|
||||||
|
@ -3913,6 +3914,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
nonLatchNibble(false),
|
nonLatchNibble(false),
|
||||||
curWindow(GUI_WINDOW_NOTHING),
|
curWindow(GUI_WINDOW_NOTHING),
|
||||||
nextWindow(GUI_WINDOW_NOTHING),
|
nextWindow(GUI_WINDOW_NOTHING),
|
||||||
|
curWindowLast(GUI_WINDOW_NOTHING),
|
||||||
nextDesc(NULL),
|
nextDesc(NULL),
|
||||||
latchNote(-1),
|
latchNote(-1),
|
||||||
latchIns(-2),
|
latchIns(-2),
|
||||||
|
|
|
@ -966,7 +966,7 @@ class FurnaceGUI {
|
||||||
SelectionPoint selStart, selEnd, cursor;
|
SelectionPoint selStart, selEnd, cursor;
|
||||||
bool selecting, curNibble, orderNibble, followOrders, followPattern, changeAllOrders;
|
bool selecting, curNibble, orderNibble, followOrders, followPattern, changeAllOrders;
|
||||||
bool collapseWindow, demandScrollX, fancyPattern, wantPatName, firstFrame, tempoView, waveHex, lockLayout, editOptsVisible, latchNibble, nonLatchNibble;
|
bool collapseWindow, demandScrollX, fancyPattern, wantPatName, firstFrame, tempoView, waveHex, lockLayout, editOptsVisible, latchNibble, nonLatchNibble;
|
||||||
FurnaceGUIWindows curWindow, nextWindow;
|
FurnaceGUIWindows curWindow, nextWindow, curWindowLast;
|
||||||
float peak[2];
|
float peak[2];
|
||||||
float patChanX[DIV_MAX_CHANS+1];
|
float patChanX[DIV_MAX_CHANS+1];
|
||||||
float patChanSlideY[DIV_MAX_CHANS+1];
|
float patChanSlideY[DIV_MAX_CHANS+1];
|
||||||
|
|
|
@ -64,7 +64,7 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
|
||||||
}
|
}
|
||||||
// check overflow highlight
|
// check overflow highlight
|
||||||
if (settings.overflowHighlight) {
|
if (settings.overflowHighlight) {
|
||||||
if (edit && cursor.y==i) {
|
if (edit && cursor.y==i && curWindowLast==GUI_WINDOW_PATTERN) {
|
||||||
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,ImGui::GetColorU32(uiColors[GUI_COLOR_EDITING]));
|
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,ImGui::GetColorU32(uiColors[GUI_COLOR_EDITING]));
|
||||||
} else if (isPlaying && oldRow==i && ord==e->getOrder()) {
|
} else if (isPlaying && oldRow==i && ord==e->getOrder()) {
|
||||||
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PLAY_HEAD]));
|
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PLAY_HEAD]));
|
||||||
|
@ -75,7 +75,7 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
isPushing=true;
|
isPushing=true;
|
||||||
if (edit && cursor.y==i) {
|
if (edit && cursor.y==i && curWindowLast==GUI_WINDOW_PATTERN) {
|
||||||
ImGui::PushStyleColor(ImGuiCol_Header,ImGui::GetColorU32(uiColors[GUI_COLOR_EDITING]));
|
ImGui::PushStyleColor(ImGuiCol_Header,ImGui::GetColorU32(uiColors[GUI_COLOR_EDITING]));
|
||||||
} else if (isPlaying && oldRow==i && ord==e->getOrder()) {
|
} else if (isPlaying && oldRow==i && ord==e->getOrder()) {
|
||||||
ImGui::PushStyleColor(ImGuiCol_Header,ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PLAY_HEAD]));
|
ImGui::PushStyleColor(ImGuiCol_Header,ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PLAY_HEAD]));
|
||||||
|
|
Loading…
Reference in a new issue