TextArea.cs 569 B

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