added tooltip to GameInfoDialog 'Save' button

This commit is contained in:
thrust26 2020-12-22 12:18:39 +01:00
parent 568a77c83f
commit d0dec8601c
3 changed files with 8 additions and 4 deletions

View File

@ -971,10 +971,10 @@ void Dialog::addDefaultsExtraOKCancelBGroup(
buttonWidth, buttonHeight, defaultsText, GuiObject::kDefaultsCmd)); buttonWidth, buttonHeight, defaultsText, GuiObject::kDefaultsCmd));
wid.push_back(_defaultWidget); wid.push_back(_defaultWidget);
wid.push_back(new ButtonWidget(this, font, HBORDER + buttonWidth + BUTTON_GAP, addExtraWidget(new ButtonWidget(this, font, HBORDER + buttonWidth + BUTTON_GAP,
_h - buttonHeight - VBORDER, buttonWidth, buttonHeight, _h - buttonHeight - VBORDER, buttonWidth, buttonHeight,
extraText, extraCmd) extraText, extraCmd));
); wid.push_back(_extraWidget);
addOKCancelBGroup(wid, font, okText, cancelText, focusOKButton, buttonWidth); addOKCancelBGroup(wid, font, okText, cancelText, focusOKButton, buttonWidth);
} }

View File

@ -76,6 +76,7 @@ class Dialog : public GuiObject
void addBGroupToFocusList(const WidgetArray& list) { _buttonGroup = list; } void addBGroupToFocusList(const WidgetArray& list) { _buttonGroup = list; }
void addTabWidget(TabWidget* w); void addTabWidget(TabWidget* w);
void addDefaultWidget(Widget* w) { _defaultWidget = w; } void addDefaultWidget(Widget* w) { _defaultWidget = w; }
void addExtraWidget(Widget* w) { _extraWidget = w; }
void addOKWidget(Widget* w) { _okWidget = w; } void addOKWidget(Widget* w) { _okWidget = w; }
void addCancelWidget(Widget* w) { _cancelWidget = w; } void addCancelWidget(Widget* w) { _cancelWidget = w; }
void setFocus(Widget* w); void setFocus(Widget* w);
@ -196,6 +197,7 @@ class Dialog : public GuiObject
Widget* _focusedWidget{nullptr}; Widget* _focusedWidget{nullptr};
Widget* _dragWidget{nullptr}; Widget* _dragWidget{nullptr};
Widget* _defaultWidget{nullptr}; Widget* _defaultWidget{nullptr};
Widget* _extraWidget{nullptr};
Widget* _okWidget{nullptr}; Widget* _okWidget{nullptr};
Widget* _cancelWidget{nullptr}; Widget* _cancelWidget{nullptr};

View File

@ -93,6 +93,8 @@ GameInfoDialog::GameInfoDialog(
// Add Defaults, OK and Cancel buttons // Add Defaults, OK and Cancel buttons
addDefaultsExtraOKCancelBGroup(wid, font, "Save", kSavePressed); addDefaultsExtraOKCancelBGroup(wid, font, "Save", kSavePressed);
_extraWidget->setToolTip("Save the current ROM's properties in a\n"
"separate file in the default directory.");
addBGroupToFocusList(wid); addBGroupToFocusList(wid);
} }