Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from gui.Scaleform.framework.entities.View import View
- from gui.Scaleform.framework.entities.BaseDAAPIComponent import BaseDAAPIComponent
- from gui.shared import g_eventBus, events, EVENT_BUS_SCOPE
- from gui.Scaleform.genConsts.BATTLE_VIEW_ALIASES import BATTLE_VIEW_ALIASES
- from gui.Scaleform.framework import g_entitiesFactories, ViewSettings, ViewTypes, ScopeTemplates
- class pmodUI(BaseDAAPIComponent):
- def logS(self, *args):
- LOG_DEBUG("FLASH", ", ".join([str(x) for x in args]))
- class pmodInjector(View):
- def _populate(self):
- super(pmodInjector, self)._populate()
- g_eventBus.addListener(events.ComponentEvent.COMPONENT_REGISTERED, self.onComponentRegistered, scope=EVENT_BUS_SCOPE.DEFAULT)
- def _dispose(self):
- g_eventBus.removeListener(events.ComponentEvent.COMPONENT_REGISTERED, self.onComponentRegistered, scope=EVENT_BUS_SCOPE.DEFAULT)
- super(pmodInjector, self)._dispose()
- def onComponentRegistered(self, event):
- if event.alias == BATTLE_VIEW_ALIASES.BATTLE_STATISTIC_DATA_CONTROLLER:
- if self._isDAAPIInited():
- self.flashObject.as_inject()
- self.destroy()
- g_entitiesFactories.addSettings(ViewSettings('pmodInjector', pmodInjector, 'flashFile.swf', ViewTypes.WINDOW, None, ScopeTemplates.GLOBAL_SCOPE))
- g_entitiesFactories.addSettings(ViewSettings('pmodUI', pmodUI, None, ViewTypes.COMPONENT, None, ScopeTemplates.DEFAULT_SCOPE))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement