summaryrefslogtreecommitdiff
path: root/src/game/GameModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GameModel.cpp')
-rw-r--r--src/game/GameModel.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp
index 668b755..bec2c98 100644
--- a/src/game/GameModel.cpp
+++ b/src/game/GameModel.cpp
@@ -517,6 +517,28 @@ void GameModel::RemoveNotification(Notification * notification)
notifyNotificationsChanged();
}
+void GameModel::SetToolTip(std::string text)
+{
+ toolTip = text;
+ notifyToolTipChanged();
+}
+
+void GameModel::SetInfoTip(std::string text)
+{
+ infoTip = text;
+ notifyInfoTipChanged();
+}
+
+std::string GameModel::GetToolTip()
+{
+ return toolTip;
+}
+
+std::string GameModel::GetInfoTip()
+{
+ return infoTip;
+}
+
void GameModel::notifyNotificationsChanged()
{
for(std::vector<GameView*>::iterator iter = observers.begin(); iter != observers.end(); ++iter)
@@ -644,3 +666,19 @@ void GameModel::notifyLogChanged(string entry)
observers[i]->NotifyLogChanged(this, entry);
}
}
+
+void GameModel::notifyInfoTipChanged()
+{
+ for(int i = 0; i < observers.size(); i++)
+ {
+ observers[i]->NotifyInfoTipChanged(this);
+ }
+}
+
+void GameModel::notifyToolTipChanged()
+{
+ for(int i = 0; i < observers.size(); i++)
+ {
+ observers[i]->NotifyToolTipChanged(this);
+ }
+} \ No newline at end of file