GUI: start with the pattern view focused

This commit is contained in:
tildearrow 2022-03-10 22:10:52 -05:00
parent 91ec641b77
commit 0700ba7e65
2 changed files with 9 additions and 1 deletions

View file

@ -5319,6 +5319,11 @@ bool FurnaceGUI::loop() {
drawChannels();
drawRegView();
if (firstFrame) {
firstFrame=false;
if (patternOpen) nextWindow=GUI_WINDOW_PATTERN;
}
if (ImGuiFileDialog::Instance()->Display("FileDialog",ImGuiWindowFlags_NoCollapse|ImGuiWindowFlags_NoMove,ImVec2(600.0f*dpiScale,400.0f*dpiScale),ImVec2(scrW*dpiScale,scrH*dpiScale))) {
//ImGui::GetIO().ConfigFlags&=~ImGuiConfigFlags_NavEnableKeyboard;
switch (curFileDialog) {
@ -6112,6 +6117,8 @@ bool FurnaceGUI::init() {
oldPat[i]=new DivPattern;
}
firstFrame=true;
#ifdef __APPLE__
SDL_RaiseWindow(sdlWin);
#endif
@ -6238,6 +6245,7 @@ FurnaceGUI::FurnaceGUI():
demandScrollX(false),
fancyPattern(false),
wantPatName(false),
firstFrame(true),
curWindow(GUI_WINDOW_NOTHING),
nextWindow(GUI_WINDOW_NOTHING),
nextDesc(NULL),

View file

@ -584,7 +584,7 @@ class FurnaceGUI {
bool pianoOpen, notesOpen, channelsOpen, regViewOpen;
SelectionPoint selStart, selEnd, cursor;
bool selecting, curNibble, orderNibble, followOrders, followPattern, changeAllOrders;
bool collapseWindow, demandScrollX, fancyPattern, wantPatName;
bool collapseWindow, demandScrollX, fancyPattern, wantPatName, firstFrame;
FurnaceGUIWindows curWindow, nextWindow;
float peak[2];
float patChanX[DIV_MAX_CHANS+1];