summaryrefslogtreecommitdiff
path: root/src/gui/models/magicschoolmodel.h
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-10-12 00:20:33 +0000
committerFedja Beader <fedja@protonmail.ch>2024-10-12 00:20:33 +0000
commit5cad574cbc6aa0696b5586f3112141cd4f5ddf54 (patch)
tree9e0969b55d60b975063a3e14edbb3550b605a2b1 /src/gui/models/magicschoolmodel.h
parentdd12272279a0b58c5fea170d28e13395c23906a8 (diff)
downloadmv-5cad574cbc6aa0696b5586f3112141cd4f5ddf54.tar.gz
mv-5cad574cbc6aa0696b5586f3112141cd4f5ddf54.tar.bz2
mv-5cad574cbc6aa0696b5586f3112141cd4f5ddf54.tar.xz
mv-5cad574cbc6aa0696b5586f3112141cd4f5ddf54.zip
Add dark magic to text command magic schools listHEADmaster
Further idea: a lot of these models are wrappers around a string options array. Maybe convert the classes into a single template class taking an array parameter? **** mana/plus!111 Approved-by: Led Mitz <smoothshifter@tuta.io>
Diffstat (limited to 'src/gui/models/magicschoolmodel.h')
-rw-r--r--src/gui/models/magicschoolmodel.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/models/magicschoolmodel.h b/src/gui/models/magicschoolmodel.h
index 7237b5eec..b91af6cda 100644
--- a/src/gui/models/magicschoolmodel.h
+++ b/src/gui/models/magicschoolmodel.h
@@ -30,7 +30,9 @@
#include "localconsts.h"
-const char *MAGIC_SCHOOL_TEXT[6] =
+#define NUM_ELEMENTS(a) sizeof(a) / sizeof(a[0])
+
+const char *MAGIC_SCHOOL_TEXT[] =
{
// TRANSLATORS: magic school
N_("General Magic"),
@@ -43,7 +45,9 @@ const char *MAGIC_SCHOOL_TEXT[6] =
// TRANSLATORS: magic school
N_("Nature Magic"),
// TRANSLATORS: magic school
- N_("Astral Magic")
+ N_("Astral Magic"),
+ // TRANSLATORS: magic school
+ N_("Dark Magic"),
};
class MagicSchoolModel final : public ListModel
@@ -57,7 +61,7 @@ class MagicSchoolModel final : public ListModel
int getNumberOfElements() override final
{
- return 6;
+ return NUM_ELEMENTS(MAGIC_SCHOOL_TEXT);
}
std::string getElementAt(int i) override final