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
myTiaOutput->setZoomWidget(myTiaZoom);
setHelpAnchor(" ", true);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -152,6 +152,8 @@ void Dialog::setHelpAnchor(const string& helpAnchor, bool debugger)
_helpAnchor = helpAnchor;
_debuggerHelp = debugger;
if(hasTitle())
{
if(_helpWidget == nullptr)
{
_helpWidget = new ButtonWidget(this, _font, _w - _font.getMaxCharWidth() * 3.5, 0,
@ -161,10 +163,11 @@ void Dialog::setHelpAnchor(const string& helpAnchor, bool debugger)
_helpWidget->setTextColor(kColorTitleText);
}
if(hasTitle() && hasHelp())
if(hasHelp())
_helpWidget->clearFlags(Widget::FLAG_INVISIBLE);
else
_helpWidget->setFlags(Widget::FLAG_INVISIBLE);
}
#endif
}