home *** CD-ROM | disk | FTP | other *** search
/ Game Level Design / GLDesign.bin / Software / UnrealEngine2Runtime / UE2Runtime-22262001_Demo.exe / GUI / Classes / GUIListBoxBase.uc < prev    next >
Text File  |  2003-06-30  |  2KB  |  65 lines

  1. // ====================================================================
  2. //  Class:  GUI.GUIListBoxBase
  3. //
  4. //  The GUIListBoxBase is a wrapper for a GUIList and it's ScrollBar
  5. //
  6. //  Written by Joe Wilcox
  7. //  (c) 2002, Epic Games, Inc.  All Rights Reserved
  8. // ====================================================================
  9.  
  10. class GUIListBoxBase extends GUIMultiComponent
  11.         Native;
  12.  
  13. cpptext
  14. {
  15.     void PreDraw(UCanvas* Canvas);
  16.     void Draw(UCanvas* Canvas);                                // Handle drawing of the component natively
  17. }
  18.  
  19. var Automated    GUIVertScrollBar    MyScrollBar;
  20. var             GUIListBase            MyList;
  21. var                bool                bVisibleWhenEmpty;        // List box is visible when empty.
  22.  
  23.  
  24. function InitBaseList(GUIListBase LocalList)
  25. {
  26.     local int i;
  27.  
  28.     MyList = LocalList;
  29.  
  30.     LocalList.StyleName = StyleName;
  31.     LocalList.bVisibleWhenEmpty = bVisibleWhenEmpty;
  32.     LocalList.MyScrollBar = MyScrollBar;
  33.     MyScrollBar.MyList = LocalList;
  34.  
  35.     MyScrollBar.FocusInstead = LocalList;
  36.  
  37.     for (i=0;i<MyScrollBar.Controls.Length;i++)
  38.         MyScrollBar.Controls[i].FocusInstead = LocalList;
  39.  
  40.     SetVisibility(bVisible);
  41. }
  42.  
  43. function SetHint(string NewHint)
  44. {
  45.     local int i;
  46.     Super.SetHint(NewHint);
  47.  
  48.     for (i=0;i<Controls.Length;i++)
  49.         Controls[i].SetHint(NewHint);
  50. }
  51.  
  52. defaultproperties
  53. {
  54.     Begin Object Class=GUIVertScrollBar Name=TheScrollbar
  55.         bVisible=false
  56.     End Object
  57.     MyScrollBar=TheScrollbar
  58.  
  59.     bAcceptsInput=true;
  60.     StyleName="ListBox"
  61.     bVisibleWhenEmpty=False
  62.  
  63.     PropagateVisibility=true
  64.  
  65. }