GUI: fix toggles losing their colors on hover
This commit is contained in:
parent
03e226e52b
commit
b82e96ec20
5 changed files with 102 additions and 72 deletions
|
|
@ -152,20 +152,20 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
|
||||
ImGui::BeginDisabled(sample->depth!=DIV_SAMPLE_DEPTH_8BIT && sample->depth!=DIV_SAMPLE_DEPTH_16BIT);
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Button,TOGGLE_COLOR(!sampleDragMode));
|
||||
pushToggleColors(!sampleDragMode);
|
||||
if (ImGui::Button(ICON_FA_I_CURSOR "##SSelect")) {
|
||||
sampleDragMode=false;
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
popToggleColors();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Edit mode: Select");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::PushStyleColor(ImGuiCol_Button,TOGGLE_COLOR(sampleDragMode));
|
||||
pushToggleColors(sampleDragMode);
|
||||
if (ImGui::Button(ICON_FA_PENCIL "##SDraw")) {
|
||||
sampleDragMode=true;
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
popToggleColors();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Edit mode: Draw");
|
||||
}
|
||||
|
|
@ -687,20 +687,20 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
|
||||
ImGui::BeginDisabled(sample->depth!=DIV_SAMPLE_DEPTH_8BIT && sample->depth!=DIV_SAMPLE_DEPTH_16BIT);
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Button,TOGGLE_COLOR(!sampleDragMode));
|
||||
pushToggleColors(!sampleDragMode);
|
||||
if (ImGui::Button(ICON_FA_I_CURSOR "##SSelect")) {
|
||||
sampleDragMode=false;
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
popToggleColors();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Edit mode: Select");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::PushStyleColor(ImGuiCol_Button,TOGGLE_COLOR(sampleDragMode));
|
||||
pushToggleColors(sampleDragMode);
|
||||
if (ImGui::Button(ICON_FA_PENCIL "##SDraw")) {
|
||||
sampleDragMode=true;
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
popToggleColors();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Edit mode: Draw");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue