added help anchor to DebuggerDialog

This commit is contained in:
thrust26 2021-04-17 20:59:29 +02:00
parent a83683a902
commit 2cdd9bc1f6
2 changed files with 16 additions and 11 deletions

View File

@ -67,6 +67,8 @@ DebuggerDialog::DebuggerDialog(OSystem& osystem, DialogContainer& parent,
// Inform the TIA output widget about its associated zoom widget // Inform the TIA output widget about its associated zoom widget
myTiaOutput->setZoomWidget(myTiaZoom); myTiaOutput->setZoomWidget(myTiaZoom);
setHelpAnchor(" ", true);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -152,19 +152,22 @@ void Dialog::setHelpAnchor(const string& helpAnchor, bool debugger)
_helpAnchor = helpAnchor; _helpAnchor = helpAnchor;
_debuggerHelp = debugger; _debuggerHelp = debugger;
if(_helpWidget == nullptr) if(hasTitle())
{ {
_helpWidget = new ButtonWidget(this, _font, _w - _font.getMaxCharWidth() * 3.5, 0, if(_helpWidget == nullptr)
_font.getMaxCharWidth() * 3.5 + 0.5, buttonHeight(), "?", {
kHelpCmd); _helpWidget = new ButtonWidget(this, _font, _w - _font.getMaxCharWidth() * 3.5, 0,
_helpWidget->setBGColor(kColorTitleBar); _font.getMaxCharWidth() * 3.5 + 0.5, buttonHeight(), "?",
_helpWidget->setTextColor(kColorTitleText); kHelpCmd);
} _helpWidget->setBGColor(kColorTitleBar);
_helpWidget->setTextColor(kColorTitleText);
}
if(hasTitle() && hasHelp()) if(hasHelp())
_helpWidget->clearFlags(Widget::FLAG_INVISIBLE); _helpWidget->clearFlags(Widget::FLAG_INVISIBLE);
else else
_helpWidget->setFlags(Widget::FLAG_INVISIBLE); _helpWidget->setFlags(Widget::FLAG_INVISIBLE);
}
#endif #endif
} }