changeset 506:226e26d1d11e

Fixed the pychan demo. Changed the default color key in basicapplication to 255,0,255
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 19 May 2010 14:34:35 +0000
parents ee65aa323457
children d6de9ab3ce2a
files demos/pychan_demo/settings-dist.xml demos/pychan_demo/settings.py engine/python/fife/extensions/basicapplication.py
diffstat 3 files changed, 26 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/pychan_demo/settings-dist.xml	Wed May 19 14:34:35 2010 +0000
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<Settings>
+	<Module name="FIFE">
+		<Setting name="FullScreen" type="int"> 0 </Setting>
+		<Setting name="PlaySounds" type="int"> 1 </Setting>
+		<Setting name="RenderBackend" type="str"> OpenGL </Setting>
+		<Setting name="ScreenWidth" type="int"> 1024 </Setting>
+		<Setting name="ScreenHeight" type="int"> 768 </Setting>
+		<Setting name="BitsPerPixel" type="int"> 0 </Setting>
+		<Setting name="InitialVolume" type="float"> 5.0 </Setting>
+		<Setting name="SDLRemoveFakeAlpha" type="int"> 1 </Setting>
+		<Setting name="WindowTitle" type="str"> Pychan demo [FIFE Client] </Setting>
+		<Setting name="WindowIcon" type="str"> gui/icons/pychan_logo.png </Setting>
+		<Setting name="Font" type="str"> fonts/freefont/FreeMono.ttf </Setting>
+		<Setting name="FontGlyphs" strip="0" type="str"> abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&amp;`'*#=[]\"</Setting>
+		<Setting name="DefaultFontSize" type="int"> 16 </Setting>
+		<Setting name="LogModules" type="list"> controller ; GUI </Setting>
+		<Setting name="PychanDebug" type="bool"> True </Setting>
+		<Setting name="LogToPrompt" type="int"> 1 </Setting>
+		<Setting name="LogToFile" type="int"> 0 </Setting>
+		<Setting name="ColorKeyEnabled" type="bool"> False </Setting>
+		<Setting name="ColorKey" type="string"> 255,0,255 </Setting>
+	</Module>
+
+</Settings>
\ No newline at end of file
--- a/demos/pychan_demo/settings.py	Tue May 18 19:37:31 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# ####################################################################
-#  Copyright (C) 2005-2009 by the FIFE team
-#  http://www.fifengine.de
-#  This file is part of FIFE.
-#
-#  FIFE is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License, or (at your option) any later version.
-#
-#  This library 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
-#  Lesser General Public License for more details.
-#
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the
-#  Free Software Foundation, Inc.,
-#  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-# ####################################################################
-
-BitsPerPixel        = 0
-FullScreen          = 0
-InitialVolume       = 5
-PlaySounds          = 1
-RenderBackend       = "OpenGL"
-SDLRemoveFakeAlpha  = 1
-ScreenWidth         = 1024
-ScreenHeight        = 768
-
-LogModules          = ['GUI']#['hexgrid']
-LogToPrompt         = 1
-LogToFile           = 0
-
-FontGlyphs          = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]\""
-Font                = 'fonts/freefont/FreeMono.ttf'
-
-# optional color key settings
-ColorKeyEnabled		= 0
-ColorKey			= 255,0,255
-
-WindowTitle			= 'Pychan demo [FIFE Client]'
-WindowIcon			= 'gui/icons/pychan_logo.png'
--- a/engine/python/fife/extensions/basicapplication.py	Tue May 18 19:37:31 2010 +0000
+++ b/engine/python/fife/extensions/basicapplication.py	Wed May 19 14:34:35 2010 +0000
@@ -114,7 +114,7 @@
 			pass
 			
 		try:
-			key = self._setting.get("FIFE", "ColorKey", "255,255,255").split(',')
+			key = self._setting.get("FIFE", "ColorKey", "255,0,255").split(',')
 			engineSetting.setColorKey(int(key[0]), int(key[1]), int(key[2]))
 		except:
 			pass