Beispiel #1
0
        public GSystemButton(int x, int y, int width, int height, Color backColor, Color foreColor, string text, IFont font)
            : base(x, y, width, height)
        {
            this.m_InactiveColor = backColor;
            this.m_ActiveColor   = ControlPaint.Dark(backColor, -this.Darkness);
            this.m_PressedColor  = ControlPaint.Light(backColor);
            this.m_ForeColor     = foreColor;
            this.m_CanDrag       = false;
            GLabel glabel = new GLabel(text, font, Hues.Default, 0, 0);

            this.m_Children.Add((Gump)glabel);
            glabel.Center();
            this.FillAlpha = 1f;
            this.UpdateColors();
        }
Beispiel #2
0
        public GMenuItem(string text)
            : base(0, 50, 120, 24)
        {
            this.m_Text          = text;
            this.m_DefaultColor  = Color.FromArgb(192, 192, 192);
            this.m_OverColor     = Color.FromArgb(32, 64, 128);
            this.m_ExpandedColor = Color.FromArgb(32, 64, 128);
            this.FillAlpha       = 0.25f;
            this.m_CanDrag       = false;
            GLabel glabel = new GLabel(text, Engine.DefaultFont, Hues.Load(1153), 0, 0);

            this.m_Children.Add((Gump)glabel);
            glabel.Center();
            glabel.X = 4 - glabel.Image.xMin;
            this.m_NonRestrictivePicking = true;
        }
Beispiel #3
0
        public GSecureTrade(int serial, Gump container, string myName, string theirName)
            : base(50, 50, 281, 116)
        {
            this.m_Serial    = serial;
            this.m_Container = container;
            this.m_CanDrop   = true;
            this.FillAlpha   = 0.5f;
            this.FillColor   = 6324479;
            GBorder3D gborder3D1 = new GBorder3D(false, 0, 0, this.Width, this.Height);

            gborder3D1.FillAlpha     = 0.0f;
            gborder3D1.ShouldHitTest = false;
            this.m_Children.Add((Gump)gborder3D1);
            GBorder3D gborder3D2 = new GBorder3D(true, 6, 6, 132, 104);

            gborder3D2.FillAlpha     = 0.0f;
            gborder3D2.ShouldHitTest = false;
            this.m_Children.Add((Gump)gborder3D2);
            GBorder3D gborder3D3 = new GBorder3D(false, 7, 7, 130, 20);

            gborder3D3.ShouldHitTest = false;
            GLabel glabel1 = new GLabel(this.Truncate(myName, (IFont)Engine.GetUniFont(1), gborder3D3.Width - 28), (IFont)Engine.GetUniFont(1), Hues.Load(1), 0, 0);

            gborder3D3.Children.Add((Gump)glabel1);
            glabel1.Center();
            glabel1.X = 28 - glabel1.Image.xMin;
            this.m_Children.Add((Gump)gborder3D3);
            GBorder3D gborder3D4 = new GBorder3D(true, 143, 6, 132, 104);

            gborder3D4.FillAlpha     = 0.0f;
            gborder3D4.ShouldHitTest = false;
            this.m_Children.Add((Gump)gborder3D4);
            GBorder3D gborder3D5 = new GBorder3D(false, 144, 7, 130, 20);

            gborder3D5.ShouldHitTest = false;
            GLabel glabel2 = new GLabel(this.Truncate(theirName, (IFont)Engine.GetUniFont(1), gborder3D5.Width - 28), (IFont)Engine.GetUniFont(1), Hues.Load(1), 0, 0);

            gborder3D5.Children.Add((Gump)glabel2);
            glabel2.Center();
            glabel2.X = gborder3D5.Width - 28 - glabel2.Image.xMax;
            this.m_Children.Add((Gump)gborder3D5);
            this.m_Children.Add((Gump) new GAlphaBackground(1, 1, 5, 114)
            {
                ShouldHitTest = false,
                BorderColor   = 12632256,
                FillColor     = 12632256,
                FillAlpha     = 1f
            });
            this.m_Children.Add((Gump) new GAlphaBackground(275, 1, 5, 114)
            {
                ShouldHitTest = false,
                BorderColor   = 12632256,
                FillColor     = 12632256,
                FillAlpha     = 1f
            });
            this.m_Children.Add((Gump) new GAlphaBackground(6, 1, 269, 5)
            {
                ShouldHitTest = false,
                BorderColor   = 12632256,
                FillColor     = 12632256,
                FillAlpha     = 1f
            });
            this.m_Children.Add((Gump) new GAlphaBackground(6, 110, 269, 5)
            {
                ShouldHitTest = false,
                BorderColor   = 12632256,
                FillColor     = 12632256,
                FillAlpha     = 1f
            });
            this.m_Children.Add((Gump) new GAlphaBackground(138, 6, 5, 104)
            {
                ShouldHitTest = false,
                BorderColor   = 12632256,
                FillColor     = 12632256,
                FillAlpha     = 1f
            });
        }