GUI: fix sort button in effect list
This commit is contained in:
parent
9b1e137851
commit
ac011a0fa1
|
|
@ -1,6 +1,7 @@
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "guiConst.h"
|
#include "guiConst.h"
|
||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
|
#include "IconsFontAwesome4.h"
|
||||||
|
|
||||||
void FurnaceGUI::drawEffectList() {
|
void FurnaceGUI::drawEffectList() {
|
||||||
if (nextWindow==GUI_WINDOW_EFFECT_LIST) {
|
if (nextWindow==GUI_WINDOW_EFFECT_LIST) {
|
||||||
|
|
@ -11,9 +12,14 @@ void FurnaceGUI::drawEffectList() {
|
||||||
if (!effectListOpen) return;
|
if (!effectListOpen) return;
|
||||||
ImGui::SetNextWindowSizeConstraints(ImVec2(60.0f*dpiScale,20.0f*dpiScale),ImVec2(canvasW,canvasH));
|
ImGui::SetNextWindowSizeConstraints(ImVec2(60.0f*dpiScale,20.0f*dpiScale),ImVec2(canvasW,canvasH));
|
||||||
if (ImGui::Begin("Effect List",&effectListOpen,globalWinFlags)) {
|
if (ImGui::Begin("Effect List",&effectListOpen,globalWinFlags)) {
|
||||||
ImGui::Text("Chip at cursor: %s",e->getSystemName(e->sysOfChan[cursor.xCoarse]));
|
float availB=ImGui::GetContentRegionAvail().x-ImGui::GetFrameHeightWithSpacing();
|
||||||
ImGui::SameLine();
|
if (availB>0) {
|
||||||
if (ImGui::Button("Sort Effects")) ImGui::OpenPopup("effectSort");
|
ImGui::PushTextWrapPos(availB);
|
||||||
|
ImGui::TextWrapped("Chip at cursor: %s",e->getSystemName(e->sysOfChan[cursor.xCoarse]));
|
||||||
|
ImGui::PopTextWrapPos();
|
||||||
|
ImGui::SameLine();
|
||||||
|
}
|
||||||
|
ImGui::Button(ICON_FA_BARS "##SortEffects");
|
||||||
if (ImGui::BeginPopupContextItem("effectSort")) {
|
if (ImGui::BeginPopupContextItem("effectSort")) {
|
||||||
for (int i=0; i<9; i++) {
|
for (int i=0; i<9; i++) {
|
||||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[fxColorsSort[i]]);
|
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[fxColorsSort[i]]);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue