Mercurial > MadButterfly
comparison pyink/domview.py @ 1501:4a57650bb926
Apply changes returned from transition editor
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 04 May 2011 13:34:36 +0800 |
parents | 2a9b9c281f80 |
children | f185a9d23a30 |
comparison
equal
deleted
inserted
replaced
1500:65249f15138e | 1501:4a57650bb926 |
---|---|
306 | 306 |
307 def get_transition(self, cond): | 307 def get_transition(self, cond): |
308 transitions = self.transitions | 308 transitions = self.transitions |
309 transition = transitions[cond] | 309 transition = transitions[cond] |
310 return transition | 310 return transition |
311 | |
312 def chg_transition_cond(self, cond, new_cond): | |
313 transitions = self.transitions | |
314 | |
315 trn = transitions[cond] | |
316 trn.set_condition(new_cond) | |
317 | |
318 del transitions[cond] | |
319 transitions[new_cond] = trn | |
320 pass | |
311 pass | 321 pass |
312 | 322 |
313 | 323 |
314 class Component(object): | 324 class Component(object): |
315 # | 325 # |
1174 | 1184 |
1175 def set_transition_path(self, state_name, cond, path): | 1185 def set_transition_path(self, state_name, cond, path): |
1176 state = self._get_state(state_name) | 1186 state = self._get_state(state_name) |
1177 trn = state.get_transition(cond) | 1187 trn = state.get_transition(cond) |
1178 trn.set_path(path) | 1188 trn.set_path(path) |
1189 pass | |
1190 | |
1191 def chg_transition_cond(self, state_name, cond, new_cond): | |
1192 state = self._get_state(state_name) | |
1193 state.chg_transition_cond(cond, new_cond) | |
1179 pass | 1194 pass |
1180 pass | 1195 pass |
1181 | 1196 |
1182 | 1197 |
1183 ## \brief Parser for scenes nodes. | 1198 ## \brief Parser for scenes nodes. |