//public string HoverText = ""; //////////////// /// <param name="theme">Appearance style.</param> /// <param name="label">Button's label.</param> /// <param name="scale">Multiplier of label text size.</param> /// <param name="large">Sets label text 'large'.</param> public UITextPanelButton(UITheme theme, string label, float scale = 1f, bool large = false) : base(theme, true, label, scale, large) { this.Theme = theme; this.IsEnabled = true; this.SetPadding(5f); theme.ApplyButton(this); var self = this; this.OnMouseOver += delegate(UIMouseEvent evt, UIElement fromElem) { if (!self.IsEnabled) { return; } theme.ApplyButtonLit(self); }; this.OnMouseOut += delegate(UIMouseEvent evt, UIElement fromElem) { if (!self.IsEnabled) { return; } theme.ApplyButton(self); }; this.RefreshTheme(); }