Mercurial > fife-parpg
diff engine/extensions/pychan/manager.py @ 157:bb9902910067
input_rework merged!
Bad features:
* Broken DND for zero-projekt.
* Design short-comings.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Tue, 14 Oct 2008 07:41:48 +0000 |
parents | d8e32b4adc5c |
children | 06dddc96ce54 |
line wrap: on
line diff
--- a/engine/extensions/pychan/manager.py Sun Oct 12 20:30:09 2008 +0000 +++ b/engine/extensions/pychan/manager.py Tue Oct 14 07:41:48 2008 +0000 @@ -4,8 +4,9 @@ import widgets import fonts from exceptions import * +from traceback import print_exc -class Manager(fife.IWidgetListener): +class Manager(object): manager = None def __init__(self, engine, debug = False): @@ -26,13 +27,12 @@ self.styles = {} self.addStyle('default',DEFAULT_STYLE) - self.widgetEvents = {} - self.engine.getEventManager().addWidgetListener(self) Manager.manager = self + # Setup synchronous dialogs self.mainLoop = None self.breakFromMainLoop = None - self.can_execute = True + self.can_execute = False def setupModalExecution(self,mainLoop,breakFromMainLoop): """ @@ -128,15 +128,6 @@ index = self.engine.imagePool.addResourceFromFile(filename) return fife.GuiImage(index,self.engine.imagePool) - def defaultWidgetAction(self,event): - if self.debug: - print "Event(%s) received." % event.getId() - - def onWidgetAction(self, event): - #print event.getId(),self.widgetEvents - handler = self.widgetEvents.get( event.getId(), self.defaultWidgetAction ) - handler( event ) - # Default Widget style. DEFAULT_STYLE = {