TextArea.cs 557 B

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