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

  1. // ====================================================================
  2. //  Class:  GUI.GUIListBox
  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. class GUIListBox extends GUIListBoxBase
  10.     native;
  11.  
  12. var    Automated GUIList List;    // For Quick Access;
  13.  
  14. function InitComponent(GUIController MyController, GUIComponent MyOwner)
  15. {
  16.     Super.Initcomponent(MyController, MyOwner);
  17.     InitBaseList(List);
  18.     List.OnClick=InternalOnClick;
  19.     List.OnClickSound=CS_Click;
  20.     List.OnChange=InternalOnChange;
  21.  
  22. }
  23.  
  24. function bool InternalOnClick(GUIComponent Sender)
  25. {
  26.     List.InternalOnClick(Sender);
  27.     OnClick(Self);
  28.     return true;
  29. }
  30.  
  31. function InternalOnChange(GUIComponent Sender)
  32. {
  33.     OnChange(Self);
  34. }
  35.  
  36. function int ItemCount()
  37. {
  38.     return List.ItemCount;
  39. }
  40.  
  41. defaultproperties
  42. {
  43.     Begin Object Class=GUIList Name=TheList
  44.         Name="TheList"
  45.     End Object
  46.  
  47.     List=TheList
  48. }