protected virtual void OnEnable() { if (gui == null) { gui = new RabbitGUI(); } }
public string OnGUI(string label, string text, int minLines, int maxLines, RabbitGUI gui) { if (!string.IsNullOrEmpty(label)) { gui.Label(label); } content.text = text; float height = GUIStyles.TextArea.CalcHeight(content, gui.Width); int numLines = (int)(height / 13f); numLines = Mathf.Clamp(numLines, minLines, maxLines); height = 20 + ((numLines - 1) * 13f); if (_prevHeight != height) { _prevHeight = height; gui.RequestResetIfRabbit(); } var layout = Layout.sHeight(height); var result = gui.ScrollableTextArea(text, ref _scrollPos, layout); return(result); }
protected virtual void OnEnable() { if (gui == null) { gui = new RabbitGUI(); gui.OnRepaint = Repaint; } }
protected virtual void OnEnable() { if (gui == null) { gui = new RabbitGUI(); gui.OnRepaint = Repaint; } }
protected virtual void OnEnable() { LoadPrefs(); if (gui == null) { gui = new RabbitGUI(prefs); gui.OnRepaint = Repaint; } }
protected virtual void OnEnable() { LoadPrefs(); if (gui == null) { gui = new RabbitGUI(prefs); gui.OnRepaint = Repaint; } }