def __init__(self, mouquet, obj, index): Companion.__init__(self, obj) self.mouquet = mouquet self.obj = Frame(str(obj.current_anim.filenames[index])) self.anim = obj.current_anim self.index = index self.variables = [["filename", FilenameCompanion()]]
def __init__(self, mouquet, obj, index): Companion.__init__(self, obj) self.mouquet = mouquet self.obj = Frame(str(obj.current_anim.filenames[index])) self.anim = obj.current_anim self.index = index self.variables = [ ["filename", FilenameCompanion()] ]
def __init__(self, mouquet, obj): Companion.__init__(self, obj.current_anim) self.sprite = obj self.obj = obj.current_anim self.mouquet = mouquet self.resource = mouquet.active_resource self.add_variables([ ["filename", FilenameCompanion()], "nbframes", "virtual_frames"]) self.ignore = [ "data" ]
def __init__(self, akiki, obj): Companion.__init__(self, obj) self.akiki = akiki self.resource = akiki.active_resource self.add_variables([ ["first_scene", ResourceCompanion(obj, Scene, as_string = True)] ]) self.ignore.update(["screen", "to_call"]) self.functions = [ "on_key_down", "on_key_up", "on_key_down_repeat", "on_mouse_button_down", "on_mouse_button_up", "on_left_button_down", "on_left_button_up" ]
def __init__(self, mouquet, obj): Companion.__init__(self, obj.current_anim) self.sprite = obj self.obj = obj.current_anim self.mouquet = mouquet self.resource = mouquet.active_resource self.add_variables([["filename", FilenameCompanion()], "nbframes", "virtual_frames"]) self.ignore = ["data"]
def __init__(self, resource, obj, index): Companion.__init__(self, None) self.resource = resource self.obj = foo(obj, obj.current_anim, index) obj = obj.current_anim self.anim = obj self.obj.delay = obj.delays[index] self.obj.move_offset_x = obj.move_offsets[index].x self.obj.move_offset_y = obj.move_offsets[index].y self.obj.hotspot_x = obj.hotspots[index][0] self.obj.hotspot_y = obj.hotspots[index][1] self.variables = [ "delay", "frame", "move_offset_x", "move_offset_y", "hotspot_x", "hotspot_y" ] self.ignore = [ "data" ]
def __init__(self, resource, obj, index): Companion.__init__(self, None) self.resource = resource self.obj = foo(obj, obj.current_anim, index) obj = obj.current_anim self.anim = obj self.obj.delay = obj.delays[index] self.obj.move_offset_x = obj.move_offsets[index].x self.obj.move_offset_y = obj.move_offsets[index].y self.obj.hotspot_x = obj.hotspots[index][0] self.obj.hotspot_y = obj.hotspots[index][1] self.variables = [ "delay", "frame", "move_offset_x", "move_offset_y", "hotspot_x", "hotspot_y" ] self.ignore = ["data"]
def change_value(self, name, value): try: if name == "filename": self.resource.filename = value self.obj.filename = value self.obj.nbframes = 1 self.obj.virtual_frames = 1 self.mouquet.change_script() elif name == "nbframes": Companion.change_value(self, name, value) self.sprite.current_anim = self.obj self.resource.change_global_property(name, str(value)) self.obj.frame_width = self.obj.size[0] / value elif name == "virtual_frames": v = value if v > self.obj.virtual_frames: v = v - self.obj.virtual_frames self.obj.orders.extend([0] * v) self.obj.delays.extend([0] * v) for i in xrange(v): self.obj.move_offsets.append(Point(0, 0)) self.obj.hotspots.append(Point(0, 0)) elif v < self.obj.virtual_frames: self.obj.orders = self.obj.orders[:v] self.obj.delays = self.obj.delays[:v] self.obj.move_offsets = self.obj.move_offsets[:v] self.obj.hotspots = self.obj.hotspots[:v] Companion.change_value(self, name, value) self.resource.change_global_property(name, str(value)) self.mouquet.populate_frame_list(self.obj) else: Companion.change_value(self, name, value) self.resource.change_global_property(name, str(value)) except: pass
def __init__(self, resource, item, classe): Companion.__init__(self, item.obj, resource) self.classe = classe self.item = item self.add_variables([["color", ColorCompanion(item.obj, None)]])
def __init__(self, resource, obj): Companion.__init__(self, obj, resource) self.resource = resource self.obj = obj self.variables = ["filename"]
def __init__(self, obj, resource = None): import pypoujol Companion.__init__(self, obj, resource) obj_class = wx.GetApp().gns.getattr("Object") self.add_variables([["result_object", ResourceCompanion(obj, obj_class)], ["with_object", ResourceCompanion(obj, obj_class)]])