GUI: better order display - UNTESTED
This commit is contained in:
parent
9f7b18d038
commit
749b0f39d0
|
@ -39,7 +39,10 @@ void FurnaceGUI::drawOrders() {
|
||||||
for (int i=0; i<e->getTotalChannelCount(); i++) {
|
for (int i=0; i<e->getTotalChannelCount(); i++) {
|
||||||
if (e->song.chanShow[i]) displayChans++;
|
if (e->song.chanShow[i]) displayChans++;
|
||||||
}
|
}
|
||||||
if (ImGui::BeginTable("OrdersTable",1+displayChans,ImGuiTableFlags_SizingStretchSame|ImGuiTableFlags_ScrollX|ImGuiTableFlags_ScrollY)) {
|
ImGui::PushFont(patFont);
|
||||||
|
bool tooSmall=(displayChans>((ImGui::GetWindowSize().x-24.0f*dpiScale)/ImGui::CalcTextSize("AAA").x));
|
||||||
|
ImGui::PopFont();
|
||||||
|
if (ImGui::BeginTable("OrdersTable",1+displayChans,(tooSmall?ImGuiTableFlags_SizingFixedFit:ImGuiTableFlags_SizingStretchSame)|ImGuiTableFlags_ScrollX|ImGuiTableFlags_ScrollY)) {
|
||||||
ImGui::PushFont(patFont);
|
ImGui::PushFont(patFont);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,prevSpacing);
|
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,prevSpacing);
|
||||||
ImGui::TableSetupScrollFreeze(1,1);
|
ImGui::TableSetupScrollFreeze(1,1);
|
||||||
|
@ -246,4 +249,4 @@ void FurnaceGUI::drawOrders() {
|
||||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_ORDERS;
|
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_ORDERS;
|
||||||
oldOrder1=e->getOrder();
|
oldOrder1=e->getOrder();
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue