Example #1
0
        static PlayerList()
        {
            var screen = GUCView.GetScreenSize();

            int x = (screen.X - Width) / 2;
            int y = (screen.Y - Height) / 2;

            vis      = new GUCVisual(x, y - GUCView.FontsizeMenu, Width, Height + GUCView.FontsizeMenu);
            vis.Font = GUCView.Fonts.Menu;
            vis.CreateTextCenterX("Spielerliste", 0);

            listVis = new GUCVisual(x, y, Width, Height);
            vis.AddChild(listVis);

            listVis.SetBackTexture(BackTex);
            for (int offset = 20; offset < Height - GUCView.FontsizeDefault - 5; offset += GUCView.FontsizeDefault + 1)
            {
                listVis.CreateText("", 17, offset);
            }
        }
Example #2
0
        public DropItemMenu()
        {
            const int backWidth  = 120;
            const int backHeight = 64;

            back = new GUCVisual((GUCView.GetScreenSize().X - backWidth) / 2, (GUCView.GetScreenSize().Y - backHeight) / 2, backWidth, backHeight);
            back.SetBackTexture("Inv_Back.tga");

            const int borderWidth  = 80;
            const int borderHeight = 24;

            border = (GUCVisual)back.AddChild(new GUCVisual((GUCView.GetScreenSize().X - borderWidth) / 2, (GUCView.GetScreenSize().Y - borderHeight) / 2, borderWidth, borderHeight));
            border.SetBackTexture("Inv_Titel.tga");

            const int tbWidth = borderWidth - 20;

            tb             = (GUCTextBox)border.AddChild(new GUCTextBox((GUCView.GetScreenSize().X - tbWidth) / 2, (GUCView.GetScreenSize().Y - GUCView.FontsizeDefault) / 2, tbWidth, true));
            tb.OnlyNumbers = true;

            player = ScriptClient.Client.Character;
        }
Example #3
0
        public ScoreBoard()
        {
            var screen = GetScreenSize();
            int height = screen.Y - YDistance * 2;

            titleVis       = new GUCVisual(0, 0, Width, height - FontsizeMenu);
            titleText      = titleVis.CreateTextCenterX("", 0);
            titleText.Font = Fonts.Menu;

            vis = new GUCVisual(0, FontsizeMenu, Width, height);
            vis.SetBackTexture(BackTex);

            int x = xOffset; int y = yOffset;

            vis.CreateText("Name", x, y); x   += NameWidth;
            vis.CreateText("Punkte", x, y); x += ScoreWidth;
            vis.CreateText("Kills", x, y); x  += KillsWidth;
            vis.CreateText("Tode", x, y); x   += DeathsWidth;
            vis.CreateText("Ping", x, y);

            int bottom = y + height - GUCView.FontsizeDefault;

            y += 5;

            while (y < bottom)
            {
                GUCVisualText t;
                x  = xOffset;
                y += FontsizeDefault;

                vis.CreateText("", x, y); x += NameWidth;
                t = vis.CreateText("", x + ScoreWidth / 2, y); x += ScoreWidth; t.Format = GUCVisualText.TextFormat.Center;
                t = vis.CreateText("", x + KillsWidth / 2, y); x += KillsWidth; t.Format = GUCVisualText.TextFormat.Center;
                t = vis.CreateText("", x + DeathsWidth / 2, y); x += DeathsWidth; t.Format = GUCVisualText.TextFormat.Center;
                t = vis.CreateText("", x + PingWidth / 2, y); x += PingWidth; t.Format = GUCVisualText.TextFormat.Center;
            }

            titleVis.AddChild(vis);
        }