mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-05 20:35:06 +00:00
GUI: better order display - UNTESTED
This commit is contained in:
parent
9f7b18d038
commit
749b0f39d0
1 changed files with 5 additions and 2 deletions
|
@ -39,7 +39,10 @@ void FurnaceGUI::drawOrders() {
|
|||
for (int i=0; i<e->getTotalChannelCount(); i++) {
|
||||
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::PushStyleVar(ImGuiStyleVar_ItemSpacing,prevSpacing);
|
||||
ImGui::TableSetupScrollFreeze(1,1);
|
||||
|
@ -246,4 +249,4 @@ void FurnaceGUI::drawOrders() {
|
|||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_ORDERS;
|
||||
oldOrder1=e->getOrder();
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue