Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ StyleKey< T >()

void Terraria.GameContent.UI.States.UIVirtualKeyboard.StyleKey< T > ( UITextPanel< T > button,
bool external = false )
inlineprivate

Definition at line 632 of file UIVirtualKeyboard.cs.

633 {
634 button.PaddingLeft = 0f;
635 button.PaddingRight = 0f;
636 button.BackgroundColor = new Color(63, 82, 151) * 0.7f;
637 if (!external)
638 {
639 button.BorderColor = _internalBorderColor * 0.7f;
640 }
641 button.OnMouseOver += delegate(UIMouseEvent evt, UIElement listeningElement)
642 {
643 ((UITextPanel<T>)listeningElement).BackgroundColor = new Color(73, 94, 171) * 0.85f;
644 if (!external)
645 {
646 ((UITextPanel<T>)listeningElement).BorderColor = _internalBorderColorSelected * 0.85f;
647 }
648 };
649 button.OnMouseOut += delegate(UIMouseEvent evt, UIElement listeningElement)
650 {
651 ((UITextPanel<T>)listeningElement).BackgroundColor = new Color(63, 82, 151) * 0.7f;
652 if (!external)
653 {
654 ((UITextPanel<T>)listeningElement).BorderColor = _internalBorderColor * 0.7f;
655 }
656 };
657 }

References Terraria.GameContent.UI.States.UIVirtualKeyboard._internalBorderColor, Terraria.GameContent.UI.States.UIVirtualKeyboard._internalBorderColorSelected, and Microsoft.Xna.Framework.Graphics.Color.