Changeset 7:99c4f2226314


Ignore:
Timestamp:
Aug 30, 2009, 1:34:02 PM (11 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Convert:
svn:b4e93282-eac8-4b8b-b765-0f5d36de2b68@8
Message:

Add padding, centre menu.

Location:
gamelib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gamelib/main.py

    r6 r7  
    4545    main_menu = MainMenu()
    4646
    47     c = gui.Container(align=-1, valign=-1)
     47    c = gui.Container(align=0, valign=0)
    4848    c.add(main_menu, 0, 0)
    4949
  • gamelib/mainmenu.py

    r6 r7  
    2727        fullscreen_toggle.connect(gui.CLICK, fullscreen_toggled)
    2828
    29         self.tr()
    30         self.td(gui.Label(constants.NAME, color=constants.FG_COLOR), colspan=2)
     29        style = {
     30            "padding_bottom": 15,
     31        }
     32        td_kwargs = {
     33            "align": 0,
     34            "style": style,
     35        }
    3136
    3237        self.tr()
    33         self.td(start_button, align=0)
     38        self.td(gui.Label(constants.NAME, color=constants.FG_COLOR), **td_kwargs)
    3439
    3540        self.tr()
    36         self.td(fullscreen_toggle, align=0)
     41        self.td(start_button, **td_kwargs)
    3742
    3843        self.tr()
    39         self.td(quit_button, align=0)
     44        self.td(fullscreen_toggle, **td_kwargs)
     45
     46        self.tr()
     47        self.td(quit_button, **td_kwargs)
Note: See TracChangeset for help on using the changeset viewer.