Changeset 638


Ignore:
Timestamp:
08/09/10 15:46:47 (9 years ago)
Author:
beliar
Message:

Patch by Beliar

  • Actions in the actions box are now added at the bottom and the scrollbar automatically scrolls to the bottom.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/gui/hud.py

    r632 r638  
    128128           @return: None""" 
    129129        self.actions_box.adaptLayout() 
    130         self.actions_box.parent.adaptLayout() 
     130        actions_scroll_area = self.actions_box.parent 
     131        actions_scroll_area.adaptLayout() 
     132        real_widget = actions_scroll_area.real_widget 
     133        real_widget.setVerticalScrollAmount(real_widget.getVerticalMaxScroll()) 
    131134 
    132135    def addAction(self, action): 
     
    139142        action_label = pychan.widgets.Label(text = action, wrap_text = True) 
    140143        action_label.max_width = self.actions_box.width 
    141         self.actions_box.insertChild(action_label, 0) 
     144        self.actions_box.addChild(action_label) 
    142145        self.refreshActionsBox() 
    143146 
Note: See TracChangeset for help on using the changeset viewer.