windows readme
This commit is contained in:
parent
c9f60047c1
commit
503c782f70
|
@ -11,9 +11,6 @@ class Delegate(GameChild):
|
|||
self.load_configuration()
|
||||
self.disable()
|
||||
|
||||
def disable(self):
|
||||
self.enabled = False
|
||||
|
||||
def load_configuration(self):
|
||||
config = self.get_configuration("event")
|
||||
self.cancel_flag_key = config["cancel-flag-key"]
|
||||
|
@ -21,6 +18,9 @@ class Delegate(GameChild):
|
|||
self.command_event_id = config["command-id-offset"] + \
|
||||
globals()[config["user-event-id"]]
|
||||
|
||||
def disable(self):
|
||||
self.enabled = False
|
||||
|
||||
def enable(self):
|
||||
self.enabled = True
|
||||
|
||||
|
@ -54,7 +54,8 @@ class Delegate(GameChild):
|
|||
self.subscribers[kind].remove(callback)
|
||||
|
||||
def compare(self, evt, commands=None, cancel=False, **attributes):
|
||||
self.add_cancel_flag_to_attributes(attributes, cancel)
|
||||
if evt.type == self.command_event_id:
|
||||
self.add_cancel_flag_to_attributes(attributes, cancel)
|
||||
if commands is not None and not isinstance(commands, list):
|
||||
commands = [commands]
|
||||
if commands is not None:
|
||||
|
|
|
@ -37,12 +37,21 @@ class SetupWin(Setup):
|
|||
self.create_archive()
|
||||
|
||||
def copy_data_files(self):
|
||||
root = self.config.get("setup", "windows-dist-path")
|
||||
for path in chain(*zip(*self.build_data_map())[1]):
|
||||
dest = join(self.config.get("setup", "windows-dist-path"),
|
||||
dirname(path))
|
||||
dest = join(root, dirname(path))
|
||||
if not exists(dest):
|
||||
makedirs(dest)
|
||||
copy(path, dest)
|
||||
self.include_readme(root)
|
||||
|
||||
def include_readme(self, root):
|
||||
name = "README"
|
||||
if exists(name):
|
||||
readme = open(name, "r")
|
||||
reformatted = open(join(root, name + ".txt"), "w")
|
||||
for line in open(name, "r"):
|
||||
reformatted.write(line.rstrip() + "\r\n")
|
||||
|
||||
def create_archive(self):
|
||||
config = self.config.get_section("setup")
|
||||
|
|
|
@ -68,8 +68,7 @@ class Sprite(Animation):
|
|||
self.increment_frame_index()
|
||||
|
||||
def get_current_frame(self):
|
||||
if self.frames:
|
||||
return self.frames[self.frame_index]
|
||||
return self.frames[self.frame_index]
|
||||
|
||||
def increment_frame_index(self):
|
||||
index = self.frame_index + 1
|
||||
|
@ -112,9 +111,8 @@ class Sprite(Animation):
|
|||
self.frames = []
|
||||
|
||||
def update(self):
|
||||
if self.frames:
|
||||
Animation.update(self)
|
||||
self.draw()
|
||||
Animation.update(self)
|
||||
self.draw()
|
||||
|
||||
def draw(self):
|
||||
self.display_surface.blit(self.get_current_frame(), self.rect)
|
||||
|
|
Loading…
Reference in New Issue