summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-13 23:20:02 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-13 23:20:02 +0300
commita55e7e257730e6cee115f407e31f8a91dc9ad447 (patch)
tree8d833ab258060c4fa28d0ec97fb18791a3011693
parent6e5976f5fb99c99b4142ee2a8f8f81598559954d (diff)
downloadmanaverse-a55e7e257730e6cee115f407e31f8a91dc9ad447.tar.gz
manaverse-a55e7e257730e6cee115f407e31f8a91dc9ad447.tar.bz2
manaverse-a55e7e257730e6cee115f407e31f8a91dc9ad447.tar.xz
manaverse-a55e7e257730e6cee115f407e31f8a91dc9ad447.zip
Move theme related constants into separate file.
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/const/gui/theme.h32
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/theme.h2
-rw-r--r--src/gui/widgets/widget2.h3
6 files changed, 38 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5085424db..111a6bb0d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -912,6 +912,7 @@ SET(SRCS
const/equipment.h
const/spells.h
const/utils/timer.h
+ const/gui/theme.h
const/render/graphics.h
render/graphics.cpp
render/graphics.h
diff --git a/src/Makefile.am b/src/Makefile.am
index c3b765088..c542a4a57 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -474,6 +474,7 @@ SRC += events/actionevent.h \
const/equipment.h \
const/spells.h \
const/utils/timer.h \
+ const/gui/theme.h \
const/render/graphics.h \
render/graphics.cpp \
render/graphics.h \
diff --git a/src/const/gui/theme.h b/src/const/gui/theme.h
new file mode 100644
index 000000000..67c0e7c30
--- /dev/null
+++ b/src/const/gui/theme.h
@@ -0,0 +1,32 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2008 The Legend of Mazzeroth Development Team
+ * Copyright (C) 2009 Aethyra Development Team
+ * Copyright (C) 2009 The Mana World Development Team
+ * Copyright (C) 2009-2010 The Mana Developers
+ * Copyright (C) 2011-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CONST_GUI_THEME_H
+#define CONST_GUI_THEME_H
+
+#include "localconsts.h"
+
+const int THEME_PALETTES = 5;
+
+#endif // CONST_GUI_THEME_H
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 067ececda..c98e463dc 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -27,6 +27,8 @@
#include "configuration.h"
#include "graphicsmanager.h"
+#include "const/gui/theme.h"
+
#include "gui/skin.h"
#include "gui/themeinfo.h"
diff --git a/src/gui/theme.h b/src/gui/theme.h
index 2332db1da..2afb41da7 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -46,8 +46,6 @@ class Theme;
struct ThemeInfo;
-const int THEME_PALETTES = 5;
-
extern Theme *theme;
class Theme final : public Palette,
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index 5955397fc..b8c0163d2 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -21,8 +21,9 @@
#ifndef GUI_WIDGETS_WIDGET2_H
#define GUI_WIDGETS_WIDGET2_H
-#include "gui/themecolorsidoperators.h"
+#include "const/gui/theme.h"
+#include "gui/themecolorsidoperators.h"
#include "gui/theme.h"
class Widget;