From 8fe78eacd885931d54b3888dcfb5572885d80a7e Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 23 Jul 2016 11:58:20 -0400 Subject: [PATCH] add help text to favorite's menu tooltip when the list is empty --- src/gui/game/GameView.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp index 34e3debe1..b3f0ed946 100644 --- a/src/gui/game/GameView.cpp +++ b/src/gui/game/GameView.cpp @@ -612,7 +612,10 @@ void GameView::NotifyMenuListChanged(GameModel * sender) { std::string tempString = ""; tempString += menuList[i]->GetIcon(); - ui::Button * tempButton = new ui::Button(ui::Point(WINDOWW-16, currentY), ui::Point(15, 15), tempString, menuList[i]->GetDescription()); + std::string description = menuList[i]->GetDescription(); + if (i == SC_FAVORITES && Favorite::Ref().GetFavoritesList()->size() == 0) + description += " (Use ctrl+shift+click to favorite an element)"; + ui::Button * tempButton = new ui::Button(ui::Point(WINDOWW-16, currentY), ui::Point(15, 15), tempString, description); tempButton->Appearance.Margin = ui::Border(0, 2, 3, 2); tempButton->SetTogglable(true); tempButton->SetActionCallback(new MenuAction(this, i));