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

  1. // ====================================================================
  2. // (C) 2002, Epic Games
  3. // ====================================================================
  4.  
  5. class moFloatEdit extends GUIMenuOption;
  6.  
  7. var        GUIFloatEdit    MyNumericEdit;
  8. var        float            MinValue, MaxValue, Step;
  9.  
  10. function InitComponent(GUIController MyController, GUIComponent MyOwner)
  11. {
  12.     Super.Initcomponent(MyController, MyOwner);
  13.     MyNumericEdit = GUIFloatEdit(MyComponent);
  14.     MyNumericEdit.MinValue = MinValue;
  15.     MyNumericEdit.MaxValue = MaxValue;
  16.     MyNumericEdit.Step = Step;
  17.     MyNumericEdit.CalcMaxLen();
  18.     MyNumericEdit.OnChange = InternalOnChange;
  19. }
  20.  
  21. function SetValue(float V)
  22. {
  23.     MyNumericEdit.SetValue(v);
  24. }
  25.  
  26. function float GetValue()
  27. {
  28.     return float(MyNumericEdit.Value);
  29. }
  30.  
  31. function InternalOnChange(GUIComponent Sender)
  32. {
  33.     OnChange(self);
  34. }
  35.  
  36.  
  37. defaultproperties
  38. {
  39.     ComponentClassName="GUI.GUIFloatEdit"
  40.     OnClickSound=CS_Click
  41. }