make prompt tab initial tab in debugger

fix Dialog class for R77
This commit is contained in:
thrust26 2019-06-15 14:47:12 +02:00
parent aef9decdfb
commit 802b5a33bc
3 changed files with 12 additions and 7 deletions

View File

@ -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();

View File

@ -136,6 +136,7 @@ class DebuggerDialog : public Dialog
unique_ptr<GUI::Font> myLFont; // used for labels
unique_ptr<GUI::Font> myNFont; // used for normal text
bool myFirstLoad;
private:
// Following constructors and assignment operators not supported

View File

@ -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;