comparison engine/core/controller/enginesettings.h @ 425:ad7969d9460b

A client can now specify a global color key to be used with all images. The default color key is (255,0,255) in RGB format. Also the client can enable/disable the color key feature by using the setColorKeyEnabled function in the EngineSettings class. By default the color key feature is disabled. fixes[t:451]
author vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 20 Feb 2010 19:11:01 +0000
parents 64738befdf3b
children 79678719d569
comparison
equal deleted inserted replaced
424:e29fbf84cb41 425:ad7969d9460b
184 */ 184 */
185 unsigned int getImageChunkingSize() const { 185 unsigned int getImageChunkingSize() const {
186 return m_image_chunking_size; 186 return m_image_chunking_size;
187 } 187 }
188 188
189 /** Sets the title of the window
190 */
189 void setWindowTitle(const std::string& title); 191 void setWindowTitle(const std::string& title);
190 192
193 /** Gets the current window title
194 */
191 std::string getWindowTitle() const { 195 std::string getWindowTitle() const {
192 return m_windowtitle; 196 return m_windowtitle;
193 } 197 }
194 198
199 /** Sets the icon that appears in the window title bar
200 */
195 void setWindowIcon(const std::string& icon); 201 void setWindowIcon(const std::string& icon);
196 202
203 /** Gets the icon in the window title bar
204 */
197 std::string getWindowIcon() const { 205 std::string getWindowIcon() const {
198 return m_windowicon; 206 return m_windowicon;
199 } 207 }
208
209 /** Sets whether to use the colorkey feature
210 */
211 void setColorKeyEnabled(bool colorkeyenable);
212
213 /** Gets whether the colorkey feature is in use
214 */
215 bool isColorKeyEnabled() const;
216
217 /** Sets the global colorkey to use for images
218 */
219 void setColorKey(Uint8 r, Uint8 g, Uint8 b);
220
221 /** Gets the global colorkey setting
222 */
223 const SDL_Color& getColorKey() const;
200 224
201 private: 225 private:
202 unsigned int m_bitsperpixel; 226 unsigned int m_bitsperpixel;
203 bool m_fullscreen; 227 bool m_fullscreen;
204 float m_initialvolume; 228 float m_initialvolume;
212 236
213 std::string m_defaultfontpath; 237 std::string m_defaultfontpath;
214 unsigned int m_defaultfontsize; 238 unsigned int m_defaultfontsize;
215 std::string m_defaultfontglyphs; 239 std::string m_defaultfontglyphs;
216 unsigned int m_image_chunking_size; 240 unsigned int m_image_chunking_size;
241 bool m_iscolorkeyenabled;
242 SDL_Color m_colorkey;
217 }; 243 };
218 244
219 }//FIFE 245 }//FIFE
220 246
221 #endif 247 #endif