diff --git a/src/debugger/gui/DebuggerDialog.cxx b/src/debugger/gui/DebuggerDialog.cxx index 069350151..d1da59c15 100644 --- a/src/debugger/gui/DebuggerDialog.cxx +++ b/src/debugger/gui/DebuggerDialog.cxx @@ -54,7 +54,8 @@ DebuggerDialog::DebuggerDialog(OSystem& osystem, DialogContainer& parent, : Dialog(osystem, parent, x, y, w, h), myTab(nullptr), myRomTab(nullptr), - myFatalError(nullptr) + myFatalError(nullptr), + myFirstLoad(true) { createFont(); // Font is sized according to available space @@ -73,6 +74,14 @@ DebuggerDialog::DebuggerDialog(OSystem& osystem, DialogContainer& parent, // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void DebuggerDialog::loadConfig() { + // set initial focus to myPrompt + if (myFirstLoad) + { + setFocus(myPrompt); + myFirstLoad = false; + } + + myTab->loadConfig(); myTiaInfo->loadConfig(); myTiaOutput->loadConfig(); diff --git a/src/debugger/gui/DebuggerDialog.hxx b/src/debugger/gui/DebuggerDialog.hxx index 5826172f6..fc687365a 100644 --- a/src/debugger/gui/DebuggerDialog.hxx +++ b/src/debugger/gui/DebuggerDialog.hxx @@ -136,6 +136,7 @@ class DebuggerDialog : public Dialog unique_ptr myLFont; // used for labels unique_ptr myNFont; // used for normal text + bool myFirstLoad; private: // Following constructors and assignment operators not supported diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index 4b307d3e0..e41c8d697 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -445,17 +445,12 @@ void Dialog::handleText(char text) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Dialog::handleKeyDown(StellaKey key, StellaMod mod) { - // Test for TAB character - // Control-Tab selects next tab - // Shift-Control-Tab selects previous tab - // Tab sets next widget in current tab - // Shift-Tab sets previous widget in current tab Event::Type e = Event::NoType; // FIXME - I don't think this will compile! #if defined(RETRON77) // special keys used for R77 - else if (key == KBDK_F13) + if (key == KBDK_F13) e = Event::UITabPrev; else if (key == KBDK_BACKSPACE) e = Event::UITabNext;