Changeset 106


Ignore:
Timestamp:
06/08/09 16:49:16 (10 years ago)
Author:
bretzel_parpg
Message:

The gui's icons will now be arranged properly in all resolutions

Location:
trunk/PARPG
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/PARPG/gui/hud.xml

    r103 r106  
    1313  <ImageButton name="hudReady2" /> 
    1414 
    15   <ScrollArea name="actionsScrollArea" vertical_scrollbar="1" horizontal_scrollbar="0" 
    16               position="325,5"> 
     15  <ScrollArea name="actionsScrollArea" vertical_scrollbar="1"  
     16              horizontal_scrollbar="0"> 
    1717    <ListBox name="actionsBox" /> 
    1818  </ScrollArea> 
  • trunk/PARPG/scripts/hud.py

    r103 r106  
    3939        self.hud.findChild(name="inventoryButton").position = (screen_width-59, 7) 
    4040 
    41         self.hud.findChild(name='hudReady1').position = (screen_width-820, 7) 
    42         self.hud.findChild(name='hudReady2').position = (screen_width-760, 7) 
    43         self.hud.findChild(name='hudReady3').position = (screen_width-215, 7) 
    44         self.hud.findChild(name='hudReady4').position = (screen_width-155, 7) 
    45  
    46         actions_width = screen_width - 550  
     41        ready1 = self.hud.findChild(name='hudReady1') 
     42        ready2 = self.hud.findChild(name='hudReady2') 
     43        ready3 = self.hud.findChild(name='hudReady3') 
     44        ready4 = self.hud.findChild(name='hudReady4') 
     45        actions_scroll_area = self.hud.findChild(name='actionsScrollArea') 
     46 
     47        if (screen_width == 1440): 
     48            ready1.position = (screen_width-1235, 7) 
     49            ready2.position = (screen_width-1175, 7) 
     50            ready3.position = (screen_width-215, 7) 
     51            ready4.position = (screen_width-155, 7) 
     52            actions_scroll_area.position = (325, 5) 
     53            actions_width = screen_width - 550 
     54 
     55        elif (screen_width == 1280): 
     56            ready1.position = (screen_width-1075, 7) 
     57            ready2.position = (screen_width-1015, 7) 
     58            ready3.position = (screen_width-215, 7) 
     59            ready4.position = (screen_width-155, 7) 
     60            actions_scroll_area.position = (325, 5) 
     61            actions_width = screen_width - 550 
     62 
     63        elif (screen_width == 1024): 
     64            ready1.position = (screen_width-820, 7) 
     65            ready2.position = (screen_width-760, 7) 
     66            ready3.position = (screen_width-215, 7) 
     67            ready4.position = (screen_width-155, 7) 
     68            actions_scroll_area.position = (325, 5) 
     69            actions_width = screen_width - 550 
     70 
     71        elif (screen_width == 800): 
     72            ready1.position = (screen_width-640, 7) 
     73            ready2.position = (screen_width-580, 7) 
     74            ready3.position = (screen_width-185, 7) 
     75            ready4.position = (screen_width-125, 7) 
     76            actions_scroll_area.position = (280, 5) 
     77            actions_width = screen_width - 475 
     78 
     79        else: 
     80            ready1.position = (screen_width-475, 7) 
     81            ready2.position = (screen_width-420, 7) 
     82            ready3.position = (screen_width-175, 7) 
     83            ready4.position = (screen_width-120, 7) 
     84            actions_scroll_area.position = (280, 5) 
     85            actions_width = screen_width - 465 
     86 
    4787        self.hud.findChild(name="actionsBox").min_size = (actions_width, 0) 
    48         self.hud.findChild(name="actionsScrollArea").size = (actions_width, 55) 
     88        actions_scroll_area.size = (actions_width, 55) 
    4989 
    5090        self.hud.show() 
Note: See TracChangeset for help on using the changeset viewer.