furnace/src/gui/orders.cpp

466 lines
17 KiB
C++
Raw Normal View History

2022-02-17 22:40:23 -05:00
/**
* Furnace Tracker - multi-system chiptune tracker
2025-01-28 18:49:19 -05:00
* Copyright (C) 2021-2025 tildearrow and contributors
2022-02-17 22:40:23 -05:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "gui.h"
2022-11-29 18:30:48 -05:00
#include <fmt/printf.h>
#include <imgui.h>
2022-02-17 22:40:23 -05:00
#include "IconsFontAwesome4.h"
2022-11-29 18:30:48 -05:00
#include "imgui_internal.h"
#include "../ta-log.h"
2022-11-29 18:30:48 -05:00
void FurnaceGUI::drawMobileOrderSel() {
if (!portrait) return;
2022-11-30 17:20:04 -05:00
if (!orderScrollLocked) {
if (orderScroll>(float)curOrder-0.005f && orderScroll<(float)curOrder+0.005f) {
orderScroll=curOrder;
} else if (orderScroll<curOrder) {
orderScroll+=MAX(0.05f,(curOrder-orderScroll)*0.2f);
if (orderScroll>curOrder) orderScroll=curOrder;
WAKE_UP;
} else {
orderScroll-=MAX(0.05f,(orderScroll-curOrder)*0.2f);
if (orderScroll<curOrder) orderScroll=curOrder;
WAKE_UP;
}
}
2022-11-29 18:30:48 -05:00
ImGui::SetNextWindowPos(ImVec2(0.0f,mobileMenuPos*-0.65*canvasH));
ImGui::SetNextWindowSize(ImVec2(canvasW,0.12*canvasW));
if (ImGui::Begin("OrderSel",NULL,globalWinFlags)) {
ImDrawList* dl=ImGui::GetWindowDrawList();
ImGuiWindow* window=ImGui::GetCurrentWindow();
ImGuiStyle& style=ImGui::GetStyle();
ImVec2 size=ImGui::GetContentRegionAvail();
ImVec2 minArea=window->DC.CursorPos;
ImVec2 maxArea=ImVec2(
minArea.x+size.x,
minArea.y+size.y
);
ImRect rect=ImRect(minArea,maxArea);
ImGui::ItemSize(size,style.FramePadding.y);
if (ImGui::ItemAdd(rect,ImGui::GetID("OrderSelW"))) {
2022-11-30 17:20:04 -05:00
ImVec2 centerPos=ImLerp(minArea,maxArea,ImVec2(0.5,0.5));
for (int i=0; i<e->curSubSong->ordersLen; i++) {
ImVec2 pos=centerPos;
ImVec4 color=uiColors[GUI_COLOR_TEXT];
pos.x+=(i-orderScroll)*40.0*dpiScale;
if (pos.x<-200.0*dpiScale) continue;
if (pos.x>canvasW+200.0*dpiScale) break;
String text=fmt::sprintf("%.2X",i);
float targetSize=size.y-fabs(i-orderScroll)*2.0*dpiScale;
if (targetSize<8.0*dpiScale) targetSize=8.0*dpiScale;
2022-12-03 00:51:57 -05:00
color.w*=CLAMP(2.0f*(targetSize/size.y-0.5f),0.0f,1.0f);
2022-11-29 18:30:48 -05:00
2022-11-30 17:20:04 -05:00
ImGui::PushFont(bigFont);
ImVec2 textSize=ImGui::CalcTextSize(text.c_str());
ImGui::PopFont();
2022-11-29 18:30:48 -05:00
2022-11-30 17:20:04 -05:00
pos.x-=textSize.x*0.5*(targetSize/textSize.y);
pos.y-=targetSize*0.5;
2022-11-29 18:30:48 -05:00
2022-11-30 17:20:04 -05:00
dl->AddText(bigFont,targetSize,pos,ImGui::GetColorU32(color),text.c_str());
}
}
if (ImGui::IsItemClicked()) {
orderScrollSlideOrigin=ImGui::GetMousePos().x+orderScroll*40.0f*dpiScale;
2022-11-30 17:37:48 -05:00
orderScrollRealOrigin=ImGui::GetMousePos();
2022-11-30 17:20:04 -05:00
orderScrollLocked=true;
2022-11-30 17:37:48 -05:00
orderScrollTolerance=true;
2022-11-29 18:30:48 -05:00
}
2024-12-09 13:56:20 -05:00
// time
if (e->isPlaying() && settings.playbackTime) {
int totalTicks=e->getTotalTicks();
int totalSeconds=e->getTotalSeconds();
String info="";
if (totalSeconds==0x7fffffff) {
info="";
} else {
if (totalSeconds>=86400) {
int totalDays=totalSeconds/86400;
int totalYears=totalDays/365;
totalDays%=365;
int totalMonths=totalDays/30;
totalDays%=30;
info+=fmt::sprintf("%dy",totalYears);
info+=fmt::sprintf("%dm",totalMonths);
info+=fmt::sprintf("%dd",totalDays);
}
if (totalSeconds>=3600) {
info+=fmt::sprintf("%.2d:",(totalSeconds/3600)%24);
}
info+=fmt::sprintf("%.2d:%.2d.%.2d",(totalSeconds/60)%60,totalSeconds%60,totalTicks/10000);
}
ImVec2 textSize=ImGui::CalcTextSize(info.c_str());
dl->AddRectFilled(ImVec2(11.0f*dpiScale,(size.y*0.5)-(5.0f*dpiScale)),ImVec2((21.0f*dpiScale)+textSize.x,(size.y*0.5)+textSize.y+(5.0f*dpiScale)),ImGui::GetColorU32(ImGuiCol_WindowBg));
dl->AddRect(ImVec2(11.0f*dpiScale,(size.y*0.5)-(5.0f*dpiScale)),ImVec2((21.0f*dpiScale)+textSize.x,(size.y*0.5)+textSize.y+(5.0f*dpiScale)),ImGui::GetColorU32(ImGuiCol_Border),0,0,dpiScale);
dl->AddText(ImVec2(16.0f*dpiScale,(size.y)*0.5),ImGui::GetColorU32(ImGuiCol_Text),info.c_str());
}
2022-11-29 18:30:48 -05:00
}
ImGui::End();
}
2022-02-17 22:40:23 -05:00
2023-03-25 19:13:22 -04:00
#define NEXT_BUTTON \
if (++buttonColumn>=buttonColumns) { \
buttonColumn=0; \
} else { \
ImGui::SameLine(); \
}
2023-03-25 19:43:21 -04:00
void FurnaceGUI::drawOrderButtons() {
int buttonColumns=(settings.orderButtonPos==0)?8:1;
int buttonColumn=0;
2023-08-30 02:31:25 -04:00
while (buttonColumns<8 && ((int)(8/buttonColumns)*ImGui::GetFrameHeightWithSpacing())>ImGui::GetContentRegionAvail().y) {
2023-03-25 19:43:21 -04:00
buttonColumns++;
}
if (ImGui::Button(ICON_FA_PLUS)) { handleUnimportant
// add order row (new)
doAction(GUI_ACTION_ORDERS_ADD);
}
if (ImGui::IsItemHovered()) {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Add new order"));
2023-03-25 19:43:21 -04:00
}
NEXT_BUTTON;
2023-08-26 07:37:28 -04:00
pushDestColor();
2023-03-25 19:43:21 -04:00
if (ImGui::Button(ICON_FA_MINUS)) { handleUnimportant
// remove this order row
doAction(GUI_ACTION_ORDERS_REMOVE);
}
2023-08-26 07:37:28 -04:00
popDestColor();
2023-03-25 19:43:21 -04:00
if (ImGui::IsItemHovered()) {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Remove order"));
2023-03-25 19:43:21 -04:00
}
NEXT_BUTTON;
if (ImGui::Button(ICON_FA_FILES_O)) { handleUnimportant
// duplicate order row
doAction(GUI_ACTION_ORDERS_DUPLICATE);
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
doAction(GUI_ACTION_ORDERS_DEEP_CLONE);
}
if (ImGui::IsItemHovered()) {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Duplicate order (right-click to deep clone)"));
2023-03-25 19:43:21 -04:00
}
NEXT_BUTTON;
if (ImGui::Button(ICON_FA_ANGLE_UP)) { handleUnimportant
// move order row up
doAction(GUI_ACTION_ORDERS_MOVE_UP);
}
if (ImGui::IsItemHovered()) {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Move order up"));
2023-03-25 19:43:21 -04:00
}
NEXT_BUTTON;
if (ImGui::Button(ICON_FA_ANGLE_DOWN)) { handleUnimportant
// move order row down
doAction(GUI_ACTION_ORDERS_MOVE_DOWN);
}
if (ImGui::IsItemHovered()) {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Move order down"));
2023-03-25 19:43:21 -04:00
}
NEXT_BUTTON;
if (ImGui::Button(ICON_FA_ANGLE_DOUBLE_DOWN)) { handleUnimportant
// duplicate order row at end
doAction(GUI_ACTION_ORDERS_DUPLICATE_END);
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
doAction(GUI_ACTION_ORDERS_DEEP_CLONE_END);
}
if (ImGui::IsItemHovered()) {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Place copy of current order at end of song (right-click to deep clone)"));
2023-03-25 19:43:21 -04:00
}
NEXT_BUTTON;
if (ImGui::Button(changeAllOrders?ICON_FA_LINK"##ChangeAll":ICON_FA_CHAIN_BROKEN"##ChangeAll")) { handleUnimportant
// whether to change one or all orders in a row
changeAllOrders=!changeAllOrders;
}
if (ImGui::IsItemHovered()) {
if (changeAllOrders) {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Order change mode: entire row"));
2023-03-25 19:43:21 -04:00
} else {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Order change mode: one"));
2023-03-25 19:43:21 -04:00
}
}
NEXT_BUTTON;
2023-12-28 17:32:40 -05:00
if (orderEditMode==0 && mobileUI) {
orderEditMode=1;
}
2023-03-25 19:43:21 -04:00
const char* orderEditModeLabel="?##OrderEditMode";
if (orderEditMode==3) {
orderEditModeLabel=ICON_FA_ARROWS_V "##OrderEditMode";
} else if (orderEditMode==2) {
orderEditModeLabel=ICON_FA_ARROWS_H "##OrderEditMode";
} else if (orderEditMode==1) {
orderEditModeLabel=ICON_FA_I_CURSOR "##OrderEditMode";
} else {
orderEditModeLabel=ICON_FA_MOUSE_POINTER "##OrderEditMode";
}
if (ImGui::Button(orderEditModeLabel)) { handleUnimportant
orderEditMode++;
2023-12-28 17:32:40 -05:00
if (orderEditMode>3) orderEditMode=mobileUI?1:0;
2023-03-25 19:43:21 -04:00
curNibble=false;
}
if (ImGui::IsItemHovered()) {
if (orderEditMode==3) {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Order edit mode: Select and type (scroll vertically)"));
2023-03-25 19:43:21 -04:00
} else if (orderEditMode==2) {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Order edit mode: Select and type (scroll horizontally)"));
2023-03-25 19:43:21 -04:00
} else if (orderEditMode==1) {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Order edit mode: Select and type (don't scroll)"));
2023-03-25 19:43:21 -04:00
} else {
2024-05-26 20:31:17 -04:00
ImGui::SetTooltip(_("Order edit mode: Click to change"));
2023-03-25 19:43:21 -04:00
}
}
}
2022-02-17 22:40:23 -05:00
void FurnaceGUI::drawOrders() {
2022-02-19 18:18:12 -05:00
static char selID[4096];
2022-02-17 22:40:23 -05:00
if (nextWindow==GUI_WINDOW_ORDERS) {
ordersOpen=true;
ImGui::SetNextWindowFocus();
nextWindow=GUI_WINDOW_NOTHING;
}
if (!ordersOpen) return;
2022-11-05 15:50:35 -04:00
if (mobileUI) {
patWindowPos=(portrait?ImVec2(0.0f,(mobileMenuPos*-0.65*canvasH)):ImVec2((0.16*canvasH)+0.5*canvasW*mobileMenuPos,0.0f));
2023-12-28 17:32:40 -05:00
patWindowSize=(portrait?ImVec2(canvasW,canvasH-(0.16*canvasW)-(pianoOpen?(0.4*canvasW):0.0f)):ImVec2(canvasW-(0.16*canvasH),canvasH-(pianoOpen?(0.3*canvasH):0.0f)));
2022-11-05 15:50:35 -04:00
ImGui::SetNextWindowPos(patWindowPos);
ImGui::SetNextWindowSize(patWindowSize);
} else {
//ImGui::SetNextWindowSizeConstraints(ImVec2(440.0f*dpiScale,400.0f*dpiScale),ImVec2(canvasW,canvasH));
}
2024-05-27 18:53:46 -04:00
if (ImGui::Begin("Orders",&ordersOpen,globalWinFlags|ImGuiWindowFlags_NoScrollbar|ImGuiWindowFlags_NoScrollWithMouse,_("Orders"))) {
2023-03-25 19:43:21 -04:00
if (ImGui::BeginTable("OrdColumn",(settings.orderButtonPos==0)?1:2,ImGuiTableFlags_BordersInnerV)) {
if (settings.orderButtonPos==2) {
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthStretch);
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed);
} else if (settings.orderButtonPos==1) {
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed);
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthStretch);
}
ImVec2 prevSpacing=ImGui::GetStyle().ItemSpacing;
if (settings.orderButtonPos!=0) {
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,ImVec2(1.0f*dpiScale,1.0f*dpiScale));
}
2023-03-24 20:17:28 -04:00
ImGui::TableNextRow();
2023-03-25 19:43:21 -04:00
if (settings.orderButtonPos<2) {
ImGui::TableNextColumn();
drawOrderButtons();
}
if (settings.orderButtonPos==0) {
ImGui::TableNextRow();
}
2022-02-17 22:40:23 -05:00
ImGui::TableNextColumn();
2023-03-24 20:17:28 -04:00
int displayChans=0;
2022-02-17 22:40:23 -05:00
for (int i=0; i<e->getTotalChannelCount(); i++) {
2023-03-24 20:17:28 -04:00
if (e->curSubSong->chanShow[i]) displayChans++;
2022-02-17 22:40:23 -05:00
}
2023-03-24 20:17:28 -04:00
ImGui::PushFont(patFont);
bool tooSmall=((displayChans+1)>((ImGui::GetContentRegionAvail().x)/(ImGui::CalcTextSize("AA").x+2.0*ImGui::GetStyle().ItemInnerSpacing.x)));
2023-08-30 02:31:25 -04:00
float yHeight=ImGui::GetContentRegionAvail().y;
float lineHeight=(ImGui::GetTextLineHeight()+4*dpiScale);
if (e->isPlaying() || haveHitBounds) {
if (followOrders) {
float nextOrdScroll=(playOrder+1)*lineHeight-((yHeight-(tooSmall?ImGui::GetStyle().ScrollbarSize:0.0f))/2.0f);
if (nextOrdScroll<0.0f) nextOrdScroll=0.0f;
ImGui::SetNextWindowScroll(ImVec2(-1.0f,nextOrdScroll));
}
}
2024-11-08 04:42:45 -05:00
ImVec2 clipBegin=ImGui::GetCursorScreenPos();
ImVec2 clipEnd=clipBegin+ImGui::GetContentRegionAvail();
2023-03-24 20:17:28 -04:00
if (ImGui::BeginTable("OrdersTable",1+displayChans,(tooSmall?ImGuiTableFlags_SizingFixedFit:ImGuiTableFlags_SizingStretchSame)|ImGuiTableFlags_ScrollX|ImGuiTableFlags_ScrollY)) {
if (tooSmall) {
// set up cell sizes? I don't know
}
2023-03-24 20:17:28 -04:00
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing,prevSpacing);
ImGui::TableSetupScrollFreeze(1,1);
2022-02-17 22:40:23 -05:00
ImGui::TableNextRow(0,lineHeight);
ImGui::TableNextColumn();
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_ORDER_ROW_INDEX]);
2023-03-24 20:17:28 -04:00
for (int i=0; i<e->getTotalChannelCount(); i++) {
if (!e->curSubSong->chanShow[i]) continue;
ImGui::TableNextColumn();
2024-07-14 02:56:18 -04:00
ImGui::TextNoHashHide("%s",e->getChannelShortName(i));
2022-02-17 22:40:23 -05:00
}
2024-11-08 04:42:45 -05:00
// OH MY FREAKING. just let me sleep.
clipBegin.y+=lineHeight;
2022-02-17 22:40:23 -05:00
ImGui::PopStyleColor();
2023-03-24 20:17:28 -04:00
for (int i=0; i<e->curSubSong->ordersLen; i++) {
ImGui::TableNextRow(0,lineHeight);
if (playOrder==i && e->isPlaying()) ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,ImGui::GetColorU32(uiColors[GUI_COLOR_ORDER_ACTIVE]));
2022-02-17 22:40:23 -05:00
ImGui::TableNextColumn();
if (curOrder==i) {
2024-11-08 04:42:45 -05:00
if (ImGui::GetCurrentWindowRead()->ScrollbarY) {
clipEnd.x-=ImGui::GetStyle().ScrollbarSize;
}
2023-03-24 20:17:28 -04:00
// draw a border
2024-11-08 04:42:45 -05:00
ImGui::PushClipRect(clipBegin,clipEnd,false);
2023-03-24 20:17:28 -04:00
ImDrawList* dl=ImGui::GetWindowDrawList();
ImVec2 rBegin=ImGui::GetCursorScreenPos();
rBegin.y-=ImGui::GetStyle().CellPadding.y;
2024-11-08 04:42:45 -05:00
ImVec2 rEnd=ImVec2(clipEnd.x,rBegin.y+lineHeight);
2023-03-24 20:17:28 -04:00
dl->AddRect(rBegin,rEnd,ImGui::GetColorU32(uiColors[GUI_COLOR_ORDER_SELECTED]),2.0f*dpiScale);
2024-11-08 04:42:45 -05:00
ImGui::PopClipRect();
2023-03-24 20:17:28 -04:00
}
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_ORDER_ROW_INDEX]);
bool highlightLoop=(i>=loopOrder && i<=loopEnd);
if (highlightLoop) ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg,ImGui::GetColorU32(uiColors[GUI_COLOR_SONG_LOOP]));
if (settings.orderRowsBase==1) {
snprintf(selID,4096,"%.2X##O_S%.2x",i,i);
} else {
snprintf(selID,4096,"%d##O_S%.2x",i,i);
}
if (ImGui::Selectable(selID)) {
setOrder(i);
curNibble=false;
orderCursor=-1;
if (orderEditMode==0) {
handleUnimportant;
}
2022-02-17 22:40:23 -05:00
}
ImGui::PopStyleColor();
2023-03-24 20:17:28 -04:00
for (int j=0; j<e->getTotalChannelCount(); j++) {
if (!e->curSubSong->chanShow[j]) continue;
if (!ImGui::TableNextColumn()) continue;
2023-03-24 20:17:28 -04:00
DivPattern* pat=e->curPat[j].getPattern(e->curOrders->ord[j][i],false);
/*if (!pat->name.empty()) {
snprintf(selID,4096,"%s##O_%.2x_%.2x",pat->name.c_str(),j,i);
} else {*/
snprintf(selID,4096,"%.2X##O_%.2x_%.2x",e->curOrders->ord[j][i],j,i);
//}
ImGui::PushStyleColor(ImGuiCol_Text,(curOrder==i || e->curOrders->ord[j][i]==e->curOrders->ord[j][curOrder])?uiColors[GUI_COLOR_ORDER_SIMILAR]:uiColors[GUI_COLOR_ORDER_INACTIVE]);
if (ImGui::Selectable(selID,settings.ordersCursor?(cursor.xCoarse==j && curOrder!=i):false)) {
2023-03-24 20:17:28 -04:00
if (curOrder==i) {
if (orderEditMode==0) {
prepareUndo(GUI_UNDO_CHANGE_ORDER);
e->lockSave([this,i,j]() {
if (changeAllOrders) {
for (int k=0; k<e->getTotalChannelCount(); k++) {
if (e->curOrders->ord[k][i]<(unsigned char)(DIV_MAX_PATTERNS-1)) e->curOrders->ord[k][i]++;
}
} else {
if (e->curOrders->ord[j][i]<(unsigned char)(DIV_MAX_PATTERNS-1)) e->curOrders->ord[j][i]++;
}
2023-03-24 20:17:28 -04:00
});
e->walkSong(loopOrder,loopRow,loopEnd);
makeUndo(GUI_UNDO_CHANGE_ORDER);
} else {
orderCursor=j;
curNibble=false;
}
2022-02-17 22:40:23 -05:00
} else {
2023-03-24 20:17:28 -04:00
setOrder(i);
e->walkSong(loopOrder,loopRow,loopEnd);
if (orderEditMode!=0) {
orderCursor=j;
curNibble=false;
}
}
if (orderEditMode==0) {
handleUnimportant;
2022-02-17 22:40:23 -05:00
}
2023-03-24 20:17:28 -04:00
}
ImGui::PopStyleColor();
if (orderEditMode!=0 && curOrder==i && orderCursor==j) {
// draw a border
ImDrawList* dl=ImGui::GetWindowDrawList();
dl->AddRect(ImGui::GetItemRectMin(),ImGui::GetItemRectMax(),ImGui::GetColorU32(uiColors[GUI_COLOR_TEXT]),2.0f*dpiScale);
}
if (!pat->name.empty() && ImGui::IsItemHovered()) {
ImGui::SetTooltip("%s",pat->name.c_str());
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
if (curOrder==i) {
if (orderEditMode==0) {
prepareUndo(GUI_UNDO_CHANGE_ORDER);
e->lockSave([this,i,j]() {
if (changeAllOrders) {
for (int k=0; k<e->getTotalChannelCount(); k++) {
if (e->curOrders->ord[k][i]>0) e->curOrders->ord[k][i]--;
}
} else {
if (e->curOrders->ord[j][i]>0) e->curOrders->ord[j][i]--;
}
});
e->walkSong(loopOrder,loopRow,loopEnd);
makeUndo(GUI_UNDO_CHANGE_ORDER);
} else {
orderCursor=j;
curNibble=false;
}
} else {
setOrder(i);
e->walkSong(loopOrder,loopRow,loopEnd);
if (orderEditMode!=0) {
orderCursor=j;
curNibble=false;
}
2022-02-17 22:40:23 -05:00
}
}
}
}
2023-03-24 20:17:28 -04:00
ImGui::PopStyleVar();
ImGui::EndTable();
2022-02-17 22:40:23 -05:00
}
ImGui::PopFont();
2023-03-25 19:13:22 -04:00
2023-03-25 19:43:21 -04:00
if (settings.orderButtonPos==2) {
ImGui::TableNextColumn();
drawOrderButtons();
2023-03-24 20:17:28 -04:00
}
2023-03-25 19:13:22 -04:00
2023-03-25 19:43:21 -04:00
if (settings.orderButtonPos!=0) {
ImGui::PopStyleVar();
2023-03-24 20:17:28 -04:00
}
ImGui::EndTable();
2022-02-17 22:40:23 -05:00
}
}
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_ORDERS;
ImGui::End();
2022-03-14 15:54:45 -04:00
}