Mercurial > fife-parpg
diff clients/pychan_demo/pychan_test.py @ 143:fe7ff4808529
- added guichan slider widget to pychan gui wrapper
- added new attribute class to attrs.py (FloatAttr)
- added demo to pychan demo client
NOTE:
- demo isn't nice yet - but I'll refactor the client anyway
author | chewie@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Tue, 07 Oct 2008 02:12:57 +0000 |
parents | 97d6946bd917 |
children | bb9902910067 |
line wrap: on
line diff
--- a/clients/pychan_demo/pychan_test.py Sun Oct 05 15:27:31 2008 +0000 +++ b/clients/pychan_demo/pychan_test.py Tue Oct 07 02:12:57 2008 +0000 @@ -48,7 +48,8 @@ eventMap = { 'creditsLink' : self.showCredits, 'closeButton' : self.quit, - 'demoList' : self.selectExample + 'demoList' : self.selectExample, + 'slider': self.test_slider } self.gui.mapEvents(eventMap) @@ -65,6 +66,9 @@ self.demoList.items += self.examples.keys() self.gui.show() + self.slider = self.gui.findChild(name='slider') + self.slider_value = self.gui.findChild(name='slider_value') + self.currentExample = None self.creditsWidget = None @@ -78,6 +82,9 @@ def showCredits(self): print pychan.loadXML('gui/credits.xml').execute({ 'okButton' : "Yay!" }) + + def test_slider(self): + self.slider_value._setText( str(self.slider.getValue()) ) class TestXMLApplication(basicapplication.ApplicationBase): """