mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
GUI: fix sort button in effect list
This commit is contained in:
parent
9b1e137851
commit
ac011a0fa1
1 changed files with 9 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "gui.h"
|
||||
#include "guiConst.h"
|
||||
#include <imgui.h>
|
||||
#include "IconsFontAwesome4.h"
|
||||
|
||||
void FurnaceGUI::drawEffectList() {
|
||||
if (nextWindow==GUI_WINDOW_EFFECT_LIST) {
|
||||
|
@ -11,9 +12,14 @@ void FurnaceGUI::drawEffectList() {
|
|||
if (!effectListOpen) return;
|
||||
ImGui::SetNextWindowSizeConstraints(ImVec2(60.0f*dpiScale,20.0f*dpiScale),ImVec2(canvasW,canvasH));
|
||||
if (ImGui::Begin("Effect List",&effectListOpen,globalWinFlags)) {
|
||||
ImGui::Text("Chip at cursor: %s",e->getSystemName(e->sysOfChan[cursor.xCoarse]));
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Sort Effects")) ImGui::OpenPopup("effectSort");
|
||||
float availB=ImGui::GetContentRegionAvail().x-ImGui::GetFrameHeightWithSpacing();
|
||||
if (availB>0) {
|
||||
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")) {
|
||||
for (int i=0; i<9; i++) {
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[fxColorsSort[i]]);
|
||||
|
|
Loading…
Reference in a new issue