public sealed override void OnInitialize()
        {
            WindowPanel              = new UIAdvPanel();
            WindowPanel.OnMouseDown += new MouseEvent(DragStart);
            WindowPanel.OnMouseOver += new MouseEvent(Dragging);
            WindowPanel.OnMouseUp   += new MouseEvent(DragEnd);
            Initialize(WindowPanel);
            var closeTex = TemplateMod.ModTexturesTable["CloseButton"];

            close = new UIButton(closeTex, false);
            close.Left.Set(-30f, 1f);
            close.Top.Set(10f, 0f);
            close.Width.Set(20f, 0f);
            close.Height.Set(20f, 0f);
            close.ButtonDefaultColor = Color.White;
            close.ButtonChangeColor  = Color.Red;
            close.OnClick           += Close_OnClick;
            WindowPanel.Append(close);
            this.Append(WindowPanel);
        }
Beispiel #2
0
        public UIAdvTextBox()
        {
            textBlinking    = false;
            textBlinkCount  = BLINK_INTERVAL;
            Font            = Main.fontMouseText;
            ForegroundColor = Color.Black;
            Password        = false;
            appearedText    = "";
            Text            = "";

            var textPanel = new UIAdvPanel(TemplateMod.ModTexturesTable["Box"])
            {
                Color = Color.White
            };

            textPanel.Top.Set(0, 0);
            textPanel.Left.Set(0, 0);
            textPanel.Width.Set(0, 1);
            textPanel.Height.Set(0, 1);
            this.Append(textPanel);
        }
 protected virtual void Initialize(UIAdvPanel WindowPanel)
 {
 }