Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        protected override void DoInitialize()
        {
            var label = new CtrlLabel(100, GUIAnchorStyles.None);

            //label.RenderBackground = true; // for debug purpose.
            label.Initialize();
            label.AcceptPicking = false;
            this.label          = label;

            this.Children.Add(label);

            label.TextChanged += label_TextChanged;
            label.Text         = "Button";
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        protected override void DoInitialize()
        {
            this.RenderUnit.Initialize();

            var label = new CtrlLabel(100, GUIAnchorStyles.None);

            label.Text         = "Button";
            label.TextChanged += label_TextChanged;
            // move label to center.
            {
                int diffX = this.Width - label.Width;
                int diffY = this.Height - label.Height;
                label.Location = new GUIPoint(diffX / 2, diffY / 2);
            }
            label.Initialize();

            this.label = label;
            this.Children.Add(label);
        }