Changeset 779


Ignore:
Timestamp:
03/04/11 00:16:49 (8 years ago)
Author:
technomage
Message:

Patch by Technomage

  • Edited the gui/character_screen.xml script to make the character creation screen use the notebook theme. It isn't finished at this point, though;
  • Added the new Spinner and IntSpinner? PyChan? widgets in parpg/gui/spinners.py;
  • Added a bunch of simple arrow button images to gui/buttons;
  • Fixed the pychan_designer.py tool so that it can now load fonts from game/fonts;
  • Added a new fontdef for 8-point font;
Location:
branches/active/character_customization
Files:
14 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/active/character_customization/game/fonts/oldtypewriter.fontdef

    r741 r779  
    44source: fonts/oldtypewriter.ttf 
    55size: 12 
     6antialias: 1 
     7color: 0,0,0 
    68 
     9[Font/OldTypewriter_8] 
     10 
     11type: truetype 
     12source: fonts/oldtypewriter.ttf 
     13size: 8 
    714antialias: 1 
    8  
    915color: 0,0,0 
  • branches/active/character_customization/game/gui/character_screen.xml

    r693 r779  
    1 <!-- 
    2  * Buttons have a dimension of 95x20 pixels 
    3  * 3 pixels vertical spacing is foreseen between buttons 
    4  * 7 pixels spacing is foreseen above and below the buttons 
    5  * Total height should be num_button*20 + (num_button-1)*3 + 2*7 
    6 --> 
    7 <VBox name="CharacterScreen" padding="0" background_image="gui/main_menu/main_menu_background_under_buttons.png" position_technique="center:center" size="320,340"> 
    8   <ImageButton name="startButton" up_image="gui/main_menu/new_game_plain.png" hover_image="gui/main_menu/new_game_hovered.png" down_image="gui/main_menu/new_game_pressed.png"/> 
    9   <ImageButton name="cancelButton"  up_image="gui/main_menu/exit_plain.png" hover_image="gui/main_menu/exit_hovered.png" down_image="gui/main_menu/exit_pressed.png"/> 
     1<VBox name="CharacterScreen" 
     2      background_image="gui/notebook/notebook_background.png" opaque="0" 
     3      min_size="780,545" max_size="780,545"> 
     4  <HBox vexpand="1" padding="0" opaque="0"> 
     5    <VBox min_size="20,0" padding="0" opaque="0"> 
     6      <Spacer fixed_size="50"></Spacer> 
     7      <VBox name="leftTabs" min_size="20,0" padding="0" opaque="0"></VBox> 
     8      <Spacer fixed_size="40"></Spacer> 
     9    </VBox> 
     10    <VBox hexpand="1" padding="0" opaque="0"> 
     11      <HBox name="topTabs" min_size="0,30" opaque="0"></HBox> 
     12      <HBox vexpand="1" opaque="0"> 
     13        <VBox name="leftPage" max_size="362,9999" min_size="362,0" opaque="0"> 
     14          <Spacer fixed_size="5"></Spacer> 
     15          <HBox opaque="0"> 
     16            <Spacer fixed_size="25"></Spacer> 
     17            <Icon name="portrait" image="gui/portraits/camilla.png" 
     18                  max_size="100,123"></Icon> 
     19            <Spacer></Spacer> 
     20            <VBox hexpand="1" min_size="110,0" opaque="0"> 
     21              <TextField name="characterName" text="Name"></TextField> 
     22              <IntSpinner name="age" lower_limit="18" upper_limit="60" 
     23                          font="OldTypewriter_8"></IntSpinner> 
     24              <Spinner name="sex" items="Male,Female" 
     25                       font="OldTypewriter"></Spinner> 
     26              <Spinner name="origin" items="Oldster,Young Blood" 
     27                       font="OldTypewriter_8"></Spinner> 
     28              <Spinner name="portrait" items="" 
     29                       font="OldTypewriter_8"></Spinner> 
     30            </VBox> 
     31            <Spacer min_size="2"></Spacer> 
     32            <Icon name="model" image="gui/character_model.png" 
     33                  max_size="100,123"></Icon> 
     34          </HBox> 
     35        </VBox> 
     36        <Spacer fixed_size="10"></Spacer> 
     37        <VBox name="rightPages" hexpand="1" opaque="0"></VBox> 
     38      </HBox> 
     39      <HBox name="bottomTabs" min_size="0,30" opaque="0"> 
     40        <ImageButton name="cancelButton" 
     41                     up_image="gui/main_menu/exit_plain.png" 
     42                     hover_image="gui/main_menu/exit_hovered.png" 
     43                     down_image="gui/main_menu/exit_pressed.png"/> 
     44        <ImageButton name="startButton" 
     45                     up_image="gui/main_menu/new_game_plain.png" 
     46                     hover_image="gui/main_menu/new_game_hovered.png" 
     47                     down_image="gui/main_menu/new_game_pressed.png"/> 
     48      </HBox> 
     49    </VBox> 
     50    <VBox min_size="20,0" padding="0" opaque="0"> 
     51      <Spacer fixed_size="50"></Spacer> 
     52      <VBox name="rightTabs" min_size="20,0" opaque="0"></VBox> 
     53      <Spacer fixed_size="40"></Spacer> 
     54    </VBox> 
     55    <Spacer fixed_size="4"></Spacer> 
     56  </HBox> 
    1057</VBox> 
  • branches/active/character_customization/game/parpg/gui/__init__.py

    r736 r779  
    11from fife.extensions import pychan 
    22from .inventorygui import EquipmentSlot, InventoryGrid 
     3from .spinners import Spinner, IntSpinner 
    34 
    45pychan.registerWidget(EquipmentSlot) 
    56pychan.registerWidget(InventoryGrid) 
     7pychan.registerWidget(Spinner) 
     8pychan.registerWidget(IntSpinner) 
  • branches/active/character_customization/tools/pychan_designer/pychan_designer.py

    r774 r779  
    7474        setting = Setting(settings_file=settings_file) 
    7575        super(GuichanDesignerApplication, self).__init__(setting=setting) 
     76        # PyChanDesigner fonts 
    7677        pychan.loadFonts('fonts/freefont.fontdef') 
    7778        pychan.setupModalExecution(self.mainLoop, self.breakFromMainLoop) 
     
    350351    parpg_root = os.path.abspath(os.path.join('..', '..', 'game')) 
    351352    os.chdir(parpg_root) 
     353    # Load PARPG fonts 
     354    fonts_directory = os.path.abspath('fonts') 
     355    file_names = os.listdir(fonts_directory) 
     356    for file_name in file_names: 
     357        base_name, extension = os.path.splitext(file_name) 
     358        if extension == '.fontdef': 
     359            file_path = os.path.join(fonts_directory, file_name) 
     360            pychan.loadFonts(file_path) 
    352361    application.xml_script_path = xml_script_path 
    353362    with file(xml_script_path) as xml_file: 
  • branches/active/character_customization/tools/pychan_designer/settings-dist.xml

    r716 r779  
    22<Settings> 
    33    <Module name="FIFE"> 
    4         <Setting name="FullScreen" type="bool">True</Setting> 
     4        <Setting name="FullScreen" type="bool">False</Setting> 
    55        <Setting name="PlaySounds" type="bool">False</Setting> 
    66        <Setting name="RenderBackend" type="str">OpenGL</Setting> 
Note: See TracChangeset for help on using the changeset viewer.