Mercurial > sypikslang
changeset 222:69941f04f1c0
Layout tweaks
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 12 May 2012 21:07:51 +0200 |
parents | bf92c982996e |
children | 19aae2b701d1 |
files | gamelib/gamegui.py gamelib/gui.py |
diffstat | 2 files changed, 23 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/gamegui.py Sat May 12 21:02:02 2012 +0200 +++ b/gamelib/gamegui.py Sat May 12 21:07:51 2012 +0200 @@ -57,7 +57,7 @@ class EndTurnButton(BigButton): def __init__(self, parent): - super(EndTurnButton, self).__init__(((WIDTH - 128), 10), 'End Turn') + super(EndTurnButton, self).__init__(((WIDTH - 128), 0), 'End Turn') self.parent = parent def on_click(self): @@ -66,12 +66,12 @@ class NextTurnButton(PopWindowButton): def __init__(self): - super(NextTurnButton, self).__init__(((WIDTH - 128), 10), 'Next Turn') + super(NextTurnButton, self).__init__(((WIDTH - 128), 0), 'Next Turn') class AssignButton(PopWindowButton): def __init__(self, parent): - super(AssignButton, self).__init__(((WIDTH - 128), 10), + super(AssignButton, self).__init__(((WIDTH - 128), 0), 'Assign Scheme') self.parent = parent @@ -82,7 +82,7 @@ class CancelButton(PopWindowButton): def __init__(self, parent): - super(CancelButton, self).__init__(((WIDTH - 256), 10), + super(CancelButton, self).__init__(((WIDTH - 256), 0), 'Cancel Scheme') self.parent = parent @@ -94,7 +94,7 @@ class ResetButton(BigButton): def __init__(self, parent, text='Clear calendars'): - super(ResetButton, self).__init__((10, 10), text) + super(ResetButton, self).__init__((10, 0), text) self.parent = parent def on_click(self): @@ -457,19 +457,19 @@ reset = ResetButton(self) self.add_child(reset) - self.points = ValueLabel((10, 75), 'Blue-Sky Research Projects') + self.points = ValueLabel((10, 60), 'Blue-Sky Research Projects') self.add_child(self.points) - self.minions = ValueLabel((310, 75), 'Minions available') + self.minions = ValueLabel((310, 60), 'Minions available') self.add_child(self.minions) - self.money = ValueLabel((510, 75), 'Money') + self.money = ValueLabel((510, 60), 'Money') self.add_child(self.money) - self.milestone = ValueLabel((10, 95), 'Currently taken over') + self.milestone = ValueLabel((10, 80), 'Currently taken over') self.add_child(self.milestone) - self.reputation = ValueLabel((310, 95), 'Reputation') + self.reputation = ValueLabel((310, 80), 'Reputation') self.add_child(self.reputation) - self.advice = ValueLabel((10, 115), 'Research advice', width=780) + self.advice = ValueLabel((10, 100), 'Research advice', width=780) self.add_child(self.advice) def update_labels(self): @@ -488,9 +488,9 @@ self.lab = lab self.develop = develop - labbut = SwitchWinButton((150, 10), 'SCIENCE!!', lab) + labbut = SwitchWinButton((150, 0), 'SCIENCE!!', lab) self.add_child(labbut) - devbut = SwitchWinButton((300, 10), 'Engineering', develop) + devbut = SwitchWinButton((300, 0), 'Engineering', develop) self.add_child(devbut) self.update_labels() @@ -502,7 +502,7 @@ self.remove_child(widget) self._missions = [] x = 0 - y = 150 + y = 130 for mission in sorted(self.game.get_available_missions(), key=lambda x: x.NAME): widget = MissionWidget(mission, (x, y), self) @@ -554,7 +554,7 @@ super(DevelopmentWindow, self).__init__(screen, lab.game) self.lab = lab - labbut = SwitchWinButton((150, 10), 'SCIENCE!!', lab) + labbut = SwitchWinButton((150, 0), 'SCIENCE!!', lab) self.add_child(labbut) self.activity = None @@ -566,7 +566,7 @@ # Oh, what tangled webs we weave if not self.activity: self.activity = activity - actbut = SwitchWinButton((300, 10), 'Schemes', activity) + actbut = SwitchWinButton((300, 0), 'Schemes', activity) self.add_child(actbut) def _make_science_widgets(self): @@ -574,7 +574,7 @@ self.remove_child(widget) self._sciences = [] x = 0 - y = 150 + y = 130 for science in sorted(self.game.lab.science, key=lambda x: x.NAME): if science.SCIENCE_TYPE == 'schematic': widget = ScienceWidget(science, (x, y), self) @@ -583,7 +583,7 @@ x += widget.WIDTH + 10 if x >= WIDTH: x = 0 - y += widget.HEIGHT + 5 + y += widget.HEIGHT def end_turn(self): # Drop back to the research screen @@ -628,9 +628,9 @@ self.activity = ActivityWindow(screen, self, self.develop) self.develop.set_activity_window(self.activity) - devbut = SwitchWinButton((150, 10), 'Engineering', self.develop) + devbut = SwitchWinButton((150, 0), 'Engineering', self.develop) self.add_child(devbut) - actbut = SwitchWinButton((300, 10), 'Schemes', self.activity) + actbut = SwitchWinButton((300, 0), 'Schemes', self.activity) self.add_child(actbut) self._sciences = [] @@ -644,7 +644,7 @@ self.remove_child(widget) self._sciences = [] x = 0 - y = 150 + y = 130 for science in sorted(self.game.lab.science, key=lambda x: x.NAME): if science.SCIENCE_TYPE == 'research': widget = ScienceWidget(science, (x, y), self)
--- a/gamelib/gui.py Sat May 12 21:02:02 2012 +0200 +++ b/gamelib/gui.py Sat May 12 21:07:51 2012 +0200 @@ -52,9 +52,9 @@ class IconTextButton(TextButton): WIDTH = 198 - HEIGHT = 80 + HEIGHT = 73 - TEXT_OFFSET = (0, 60) + TEXT_OFFSET = (0, 58) def __init__(self, pos, name, text, font=font_auto, shadow=True): rect = (pos[0], pos[1], self.WIDTH, self.HEIGHT)