[4744] | 1 | /* |
---|
[1853] | 2 | orxonox - the future of 3D-vertical-scrollers |
---|
| 3 | |
---|
| 4 | Copyright (C) 2004 orx |
---|
| 5 | |
---|
| 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 9 | any later version. |
---|
[1855] | 10 | |
---|
| 11 | ### File Specific: |
---|
| 12 | main-programmer: ... |
---|
| 13 | co-programmer: ... |
---|
[1853] | 14 | */ |
---|
| 15 | |
---|
[3955] | 16 | //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ |
---|
[1853] | 17 | |
---|
[8141] | 18 | #include "glgui_style.h" |
---|
[1853] | 19 | |
---|
[8448] | 20 | #include "loading/load_param.h" |
---|
| 21 | |
---|
[8141] | 22 | namespace OrxGui |
---|
| 23 | { |
---|
[1853] | 24 | |
---|
[1856] | 25 | |
---|
[8141] | 26 | /** |
---|
| 27 | * @brief standard constructor |
---|
| 28 | */ |
---|
[8448] | 29 | GLGuiStyle::GLGuiStyle (const TiXmlElement* root) |
---|
[8141] | 30 | { |
---|
[8448] | 31 | if (root != NULL) |
---|
| 32 | this->loadParams(root); |
---|
| 33 | |
---|
[8141] | 34 | } |
---|
[4320] | 35 | |
---|
| 36 | |
---|
[8141] | 37 | /** |
---|
| 38 | * @brief standard deconstructor |
---|
[4320] | 39 | */ |
---|
[8141] | 40 | GLGuiStyle::~GLGuiStyle () |
---|
| 41 | { |
---|
| 42 | // delete what has to be deleted here |
---|
| 43 | } |
---|
[8448] | 44 | |
---|
| 45 | void GLGuiStyle::loadParams(const TiXmlElement* root) |
---|
| 46 | { |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | void GLGuiStyle::setBorderLeft(float value) |
---|
| 50 | { |
---|
| 51 | for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) |
---|
| 52 | setBorderLeft(value, (OrxGui::State)i); |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | void GLGuiStyle::setBorderLeft(float value, OrxGui::State state) |
---|
| 56 | {} |
---|
| 57 | |
---|
| 58 | void GLGuiStyle::setBorderLeftS(float value, const std::string& state) |
---|
| 59 | {} |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | void GLGuiStyle::setBorderRight(float value) |
---|
| 63 | { |
---|
| 64 | for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) |
---|
| 65 | setBorderRight(value, (OrxGui::State)i); |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | void GLGuiStyle::setBorderRight(float value, OrxGui::State state) |
---|
| 69 | {} |
---|
| 70 | |
---|
| 71 | void GLGuiStyle::setBorderRightS(float value, const std::string& state) |
---|
| 72 | {} |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | void GLGuiStyle::setBorderTop(float value) |
---|
| 76 | { |
---|
| 77 | for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) |
---|
| 78 | setBorderTop(value, (OrxGui::State)i); |
---|
| 79 | } |
---|
| 80 | |
---|
| 81 | void GLGuiStyle::setBorderTop(float value, OrxGui::State state) |
---|
| 82 | {} |
---|
| 83 | |
---|
| 84 | void GLGuiStyle::setBorderTopS(float value, const std::string& state) |
---|
| 85 | {} |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | void GLGuiStyle::setBorderBottom(float value) |
---|
| 89 | { |
---|
| 90 | for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) |
---|
| 91 | setBorderBottom(value, (OrxGui::State)i); |
---|
| 92 | } |
---|
| 93 | |
---|
| 94 | void GLGuiStyle::setBorderBottom(float value, OrxGui::State state) |
---|
| 95 | {} |
---|
| 96 | |
---|
| 97 | void GLGuiStyle::setBorderBottomS(float value, const std::string& state) |
---|
| 98 | {} |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | void GLGuiStyle::setTextSize(float value) |
---|
| 102 | { |
---|
| 103 | for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) |
---|
| 104 | setTextSize(value, (OrxGui::State)i); |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | void GLGuiStyle::setTextSize(float value, OrxGui::State state) |
---|
| 108 | {} |
---|
| 109 | |
---|
| 110 | void GLGuiStyle::setTextSizeS(float value, const std::string& state) |
---|
| 111 | {} |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | void GLGuiStyle::setBackgroundColor(const Color& color) |
---|
| 115 | { |
---|
| 116 | for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) |
---|
| 117 | setBackgroundColor(color, (OrxGui::State)i); |
---|
| 118 | } |
---|
| 119 | |
---|
| 120 | void GLGuiStyle::setBackgroundColor(const Color& color, OrxGui::State state) |
---|
| 121 | {} |
---|
| 122 | |
---|
| 123 | void GLGuiStyle::setBackgroundColorS(float r, float g, float b, float a, const std::string& state) |
---|
| 124 | {} |
---|
| 125 | |
---|
| 126 | |
---|
| 127 | void GLGuiStyle::setBackgroundTexture(const Texture& texture) |
---|
| 128 | { |
---|
| 129 | for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) |
---|
| 130 | setBackgroundTexture(texture, (OrxGui::State)i); |
---|
| 131 | } |
---|
| 132 | |
---|
| 133 | void GLGuiStyle::setBackgroundTexture(const Texture& texture, OrxGui::State state) |
---|
| 134 | {} |
---|
| 135 | |
---|
| 136 | void GLGuiStyle::setBackgroundTexture(const std::string& textureName, const std::string& state) |
---|
| 137 | {} |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | void GLGuiStyle::setForegroundColor(const Color& color) |
---|
| 141 | { |
---|
| 142 | for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) |
---|
| 143 | setForegroundColor(color, (OrxGui::State)i); |
---|
| 144 | } |
---|
| 145 | |
---|
| 146 | void GLGuiStyle::setForegroundColor(const Color& color, OrxGui::State state) |
---|
| 147 | {} |
---|
| 148 | |
---|
| 149 | void GLGuiStyle::setForegroundColorS(float r, float g, float b, float a, const std::string& state) |
---|
| 150 | {} |
---|
| 151 | |
---|
| 152 | |
---|
| 153 | |
---|
| 154 | void GLGuiStyle::setFeaturePosition(FeaturePosition featurePosition) |
---|
| 155 | { |
---|
| 156 | this->_featurePosition = featurePosition; |
---|
| 157 | } |
---|
| 158 | |
---|
| 159 | void GLGuiStyle::setFeaturePosition(const std::string& featurePosition) |
---|
| 160 | { |
---|
| 161 | |
---|
| 162 | } |
---|
| 163 | |
---|
| 164 | |
---|
| 165 | void GLGuiStyle::setFont(Font* font) |
---|
| 166 | { |
---|
| 167 | this->_font = font; |
---|
| 168 | } |
---|
| 169 | |
---|
| 170 | void GLGuiStyle::setFont(const std::string& fontName) |
---|
| 171 | { |
---|
| 172 | //this->font = new Font(fontName); |
---|
| 173 | } |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | void GLGuiStyle::setAnimated(bool animated) |
---|
| 177 | { |
---|
| 178 | this->_animated = animated; |
---|
| 179 | } |
---|
| 180 | |
---|
| 181 | void GLGuiStyle::animatedStateChanges(bool animated) |
---|
| 182 | { |
---|
| 183 | this->_animatedStateChanges = animated; |
---|
| 184 | } |
---|
| 185 | |
---|
[3365] | 186 | } |
---|