summaryrefslogtreecommitdiff
path: root/src/gui/dialogsmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogsmanager.cpp')
-rw-r--r--src/gui/dialogsmanager.cpp28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp
index a68ba32c0..a33872e5e 100644
--- a/src/gui/dialogsmanager.cpp
+++ b/src/gui/dialogsmanager.cpp
@@ -1,11 +1,11 @@
/*
- * The ManaPlus Client
+ * The ManaVerse Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
* Copyright (C) 2011-2020 The ManaPlus Developers
- * Copyright (C) 2020-2023 The ManaVerse Developers
+ * Copyright (C) 2020-2025 The ManaVerse Developers
*
- * This file is part of The ManaPlus Client.
+ * This file is part of The ManaVerse Client.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,6 +26,8 @@
#include "configuration.h"
#include "settings.h"
+#include "being/localplayer.h"
+
#include "being/playerinfo.h"
#include "const/sound.h"
@@ -55,9 +57,9 @@
#include "debug.h"
-#ifdef WIN32
+#ifdef _WIN32
#undef ERROR
-#endif // WIN32
+#endif // _WIN32
Window *deathNotice = nullptr;
DialogsManager *dialogsManager = nullptr;
@@ -192,6 +194,11 @@ void DialogsManager::attributeChanged(const AttributesT id,
const int total = CAST_S32(oldVal);
if (newVal >= max && total < max)
{
+ const std::string overweightMessage(
+ // TRANSLATORS: overweight message in speech bubble
+ _("Warning: You are overburdened,"
+ " you have difficulty regenerating."));
+ /*
weightNoticeTime = cur_time + 5;
CREATEWIDGETV(weightNotice, OkDialog,
std::string(),
@@ -208,9 +215,17 @@ void DialogsManager::attributeChanged(const AttributesT id,
260);
weightNotice->addActionListener(
&weightListener);
+ */
+ if (localPlayer != nullptr)
+ localPlayer->setSpeech(overweightMessage);
}
else if (newVal < max && total >= max)
{
+ const std::string underweightMessage(
+ // TRANSLATORS: overweight message in speech bubble
+ _("You are no longer overburdened,"
+ " regeneration back to normal."));
+ /*
weightNoticeTime = cur_time + 5;
CREATEWIDGETV(weightNotice, OkDialog,
std::string(),
@@ -227,6 +242,9 @@ void DialogsManager::attributeChanged(const AttributesT id,
260);
weightNotice->addActionListener(
&weightListener);
+ */
+ if (localPlayer != nullptr)
+ localPlayer->setSpeech(underweightMessage);
}
}
}