TextField.cs 575 B

1234567891011121314151617181920
  1. using System;
  2. using UnityEngine;
  3. namespace COM3D2.MeidoPhotoStudio.Plugin
  4. {
  5. public class TextField : BaseControl
  6. {
  7. public string Value { get; set; } = string.Empty;
  8. public void Draw(GUIStyle textFieldStyle, params GUILayoutOption[] layoutOptions)
  9. {
  10. if (!Visible) return;
  11. Value = GUILayout.TextField(Value, textFieldStyle, layoutOptions);
  12. }
  13. public override void Draw(params GUILayoutOption[] layoutOptions)
  14. {
  15. Draw(new GUIStyle(GUI.skin.textField), layoutOptions);
  16. }
  17. }
  18. }