Changeset 784


Ignore:
Timestamp:
03/04/11 16:02:51 (8 years ago)
Author:
qubodup
Message:

Patch by qubodup:

  • spinners now understand background_color for text_field
  • char creation gui elements are black on white now
Location:
branches/active/character_customization/game
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/active/character_customization/game/gui/character_screen.xml

    r783 r784  
    2020            <Spacer></Spacer> 
    2121            <VBox hexpand="1" min_size="110,0" opaque="0"> 
    22               <TextField name="characterName" text="Name"></TextField> 
    23               <IntSpinner name="age" lower_limit="18" upper_limit="60" 
     22              <TextField background_color="0,0,0,0" name="characterName" text="None" 
     23                       font="OldTypewriter"></TextField> 
     24              <IntSpinner base_color="0,0,0,0" background_color="0,0,0,0" name="age" lower_limit="18" upper_limit="60" 
    2425                          font="OldTypewriter_8"></IntSpinner> 
    25               <Spinner name="sex" items="Male,Female" 
    26                        font="OldTypewriter"></Spinner> 
    27               <Spinner name="origin" items="Oldster,Young Blood" 
     26              <Spinner base_color="0,0,0,0" background_color="0,0,0,0" name="sex" items="Male,Female" 
    2827                       font="OldTypewriter_8"></Spinner> 
    29               <Spinner name="portrait" items="" 
     28              <Spinner base_color="0,0,0,0" background_color="0,0,0,0" name="origin" items="Oldster,Young Blood" 
     29                       font="OldTypewriter_8"></Spinner> 
     30              <Spinner base_color="0,0,0,0" background_color="0,0,0,0" name="portrait" items="" 
    3031                       font="OldTypewriter_8"></Spinner> 
    3132            </VBox> 
  • branches/active/character_customization/game/parpg/gui/spinners.py

    r779 r784  
    4646    items = property(**items()) 
    4747     
     48    def background_color(): 
     49        def fget(self): 
     50            return self.text_field.background_color 
     51         
     52        def fset(self, background_color): 
     53            self.text_field.background_color = background_color 
     54         
     55        return locals() 
     56    background_color = property(**background_color()) 
     57     
    4858    def font(): 
    4959        def fget(self): 
     
    5767     
    5868    def __init__(self, items=None, default_item_n=0, circular=True, 
    59                  min_size=(50, 14), max_size=(50, 14), font=None, **kwargs): 
     69                 min_size=(50, 14), max_size=(50, 14), font=None, background_color=None, **kwargs): 
    6070        self._current_index = 0 
    6171        self._items = map(unicode, items) if items is not None else [] 
     
    6373        self.circular = circular 
    6474        self.text_field = TextField(font=font) 
     75        self.text_field = TextField(background_color=background_color) 
    6576        self.text_field.min_size = min_size 
    6677        self.text_field.max_size = max_size 
Note: See TracChangeset for help on using the changeset viewer.