示例#1
0
 def build_state(self, key, painter=None, title=None, fusionner_class=None):
     """Add state"""
     ##        if not key in self._states:
     if fusionner_class is None:
         FusionnerClass = _Fusionner
     if title is None:
         title = Title("")
     if painter == -1:
         fusionner = FusionnerClass(title)
     else:
         fusionner = FusionnerClass(painter, title)
     state = State(fusionner)
     self._states[key] = state
示例#2
0
 def finish(self):
     Element.finish(self)
     self.press_params._normalize(self)
     fusionner_press = self.press_params.get_fusionner()
     state_pressed = State(fusionner_press)
     self._states[constants.STATE_PRESSED] = state_pressed
示例#3
0
 def finish(self):
     fusionner_attr = self.normal_params.get_fusionner()
     state_normal = State(fusionner_attr)
     self._states[constants.STATE_NORMAL] = state_normal
     self.current_state = self._states[constants.STATE_NORMAL]
     self._finished = True
示例#4
0
 def finish(self):
     Element.finish(self)
     time_state = State(self.time_params.get_fusionner())
     self.add_state(constants.REAC_TIME, time_state)
     self.set_init_pos()
     self.change_state(constants.REAC_TIME)