Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6747


Ignore:
Timestamp:
Apr 16, 2010, 3:01:06 PM (15 years ago)
Author:
rgrieder
Message:

Added onShow and onHide as overridable methods to GUISheet.lua
and applied it in PickupInventory.lua.

Location:
code/trunk/data/gui/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/data/gui/scripts/GUISheet.lua

    r6746 r6747  
    1616end
    1717
     18-- show function for the GUI
     19function P:show()
     20    self.window:show()
     21    self.bVisible = true
     22
     23    self:onShow()
     24end
     25
     26-- Override this function if you need to do work on show
     27function P:onShow()
     28end
     29
    1830-- hide function for the GUI
    1931function P:hide()
    2032    self.window:hide()
    2133    self.bVisible = false
     34
     35    self:onHide()
    2236end
    2337
    24 -- show function for the GUI
    25 function P:show()
    26     self.window:show()
    27     self.bVisible = true
     38-- Override this function if you need to do work on hide
     39function P:onHide()
    2840end
    2941
  • code/trunk/data/gui/scripts/PickupInventory.lua

    r6746 r6747  
    1111end
    1212
    13 function P.show()
    14     P.window:show() -- TODO: Do this through parent...
    15     P.bVisible = true
    16    
     13function P.onShow()
    1714    P.createInventory()
    18 
    19 end
    20 
    21 function P.hide()
     15end
     16
     17function P.onHide()
    2218    P.cleanup()
    23    
    2419end
    2520
Note: See TracChangeset for help on using the changeset viewer.