diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-11 16:07:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-11 16:07:26 +0300 |
commit | c38e43cee40cfd7cad2a92ea704aa26c23523b67 (patch) | |
tree | a063389e5c7ddbaa448d495f3573bedf02e983b5 | |
parent | 56807a19c2414934b405658da99b67fb53a129a3 (diff) | |
download | manaverse-c38e43cee40cfd7cad2a92ea704aa26c23523b67.tar.gz manaverse-c38e43cee40cfd7cad2a92ea704aa26c23523b67.tar.bz2 manaverse-c38e43cee40cfd7cad2a92ea704aa26c23523b67.tar.xz manaverse-c38e43cee40cfd7cad2a92ea704aa26c23523b67.zip |
Add own theme xml configuration for each shortcuts based window.
-rw-r--r-- | src/game.cpp | 8 | ||||
-rw-r--r-- | src/gui/shortcutwindow.cpp | 7 | ||||
-rw-r--r-- | src/gui/shortcutwindow.h | 3 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/game.cpp b/src/game.cpp index 3c7579d78..6eda01640 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -216,7 +216,7 @@ static void createGuiWindows() minimap = new Minimap; helpWindow = new HelpWindow; debugWindow = new DebugWindow; - itemShortcutWindow = new ShortcutWindow("ItemShortcut"); + itemShortcutWindow = new ShortcutWindow("ItemShortcut", "items.xml"); for (int f = 0; f < SHORTCUT_TABS; f ++) { itemShortcutWindow->addTab(toString(f + 1), @@ -230,13 +230,13 @@ static void createGuiWindows() } emoteShortcutWindow = new ShortcutWindow("EmoteShortcut", - new EmoteShortcutContainer); + new EmoteShortcutContainer, "emotes.xml"); outfitWindow = new OutfitWindow(); specialsWindow = new SpecialsWindow(); dropShortcutWindow = new ShortcutWindow("DropShortcut", - new DropShortcutContainer); + new DropShortcutContainer, "drops.xml"); - spellShortcutWindow = new ShortcutWindow("SpellShortcut", + spellShortcutWindow = new ShortcutWindow("SpellShortcut", "spells.xml", 265, 328); for (int f = 0; f < SPELL_SHORTCUT_TABS; f ++) { diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp index cf491c9f0..df21488a5 100644 --- a/src/gui/shortcutwindow.cpp +++ b/src/gui/shortcutwindow.cpp @@ -52,8 +52,9 @@ class ShortcutTab : public Tab ShortcutWindow::ShortcutWindow(const std::string &title, ShortcutContainer *content, + std::string skinFile, int width, int height) : - Window("Window", false, 0, "shortcuts.xml") + Window("Window", false, 0, skinFile) { setWindowName(title); // no title presented, title bar is padding so window can be moved. @@ -97,7 +98,9 @@ ShortcutWindow::ShortcutWindow(const std::string &title, loadWindowState(); } -ShortcutWindow::ShortcutWindow(const std::string &title, int width, int height) +ShortcutWindow::ShortcutWindow(const std::string &title, std::string skinFile, + int width, int height) : + Window("Window", false, 0, skinFile) { setWindowName(title); // no title presented, title bar is padding so window can be moved. diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h index 4301b72d1..1c91835e8 100644 --- a/src/gui/shortcutwindow.h +++ b/src/gui/shortcutwindow.h @@ -41,9 +41,10 @@ class ShortcutWindow : public Window * Constructor. */ ShortcutWindow(const std::string &title, ShortcutContainer *content, + std::string skinFile = "", int width = 0, int height = 0); - ShortcutWindow(const std::string &title, + ShortcutWindow(const std::string &title, std::string skinFile = "", int width = 0, int height = 0); /** |