public void InitSettings()
        {
            Controls.Clear();

            int x = 100;
            int y = 60;

            StatsLabel      = new Label(Input);
            StatsLabel.Text = "statistics:";
            StatsLabel.SetX(x);
            StatsLabel.SetY(y);
            Controls.Add(StatsLabel);

            y += 20;

            DateTime PlayingTime = new DateTime(GameComponent.GSettings.List.StatsTimePlayed);

            Stats = new TextScreen();
            Stats.SetX(x + 15);
            Stats.SetY(y);
            Stats.AddLine(GameComponent.GSettings.List.StatsKills + " kills");
            Stats.AddLine(GameComponent.GSettings.List.StatsDeaths + " deaths");
            Stats.AddLine(Int32.Parse(PlayingTime.ToString("hh")) + " hours " + Int32.Parse(PlayingTime.ToString("mm")) + " min " + Int32.Parse(PlayingTime.ToString("ss")) + " sec in game");
            Stats.AddLine(GameComponent.GSettings.List.StatsGamesPlayed + " games played");
            Stats.AddLine(GameComponent.GSettings.List.StatsAccuracy + " is your accuracy");
            Controls.Add(Stats);

            y += 20 + Stats.TotalHeight;

            DimensionLabel      = new Label(Input);
            DimensionLabel.Text = "dimension:";
            DimensionLabel.SetX(x);
            DimensionLabel.SetY(y);
            Controls.Add(DimensionLabel);

            DimensionOption = new UpDownControl(Input, x + 100, y);
            DimensionOption.PushValue("640x480");
            DimensionOption.PushValue("800x600");
            DimensionOption.SetCurrent(GameComponent.GSettings.List.ScreenWidth == 640 ? 0 : 1);
            DimensionOption.CreateCallback(OnOptionChange);
            Controls.Add(DimensionOption);

            y += 20;

            NameLabel      = new Label(Input);
            NameLabel.Text = "username:";
            NameLabel.SetX(x);
            NameLabel.SetY(y);
            Controls.Add(NameLabel);

            NameInput = new TextBox(Input);
            NameInput.AppendText(GameComponent.GSettings.List.Name);
            NameInput.SetX(x + 92);
            NameInput.SetY(y);
            NameInput.SetKeyDownCallback(OnOptionChange);
            Controls.Add(NameInput);
        }
Пример #2
0
        public CreditsGuiScreen(InputHandler Input)
            : base(Input, true, true, false, false)
        {
            SetTitle("credits");

            Text.SetY(60);
            Text.AddLine("dedicated to java.");
            Text.AddLine("");
            Text.AddLine("andrey podkolzin - network, map editor");
            Text.AddLine("alexey - the code");
            Text.AddLine("stanislav matviychuck - graphics");
        }
Пример #3
0
        public InstructionsGuiScreen(InputHandler Input)
            : base(Input, true, true, false, false)
        {
            SetTitle("how to play");

            Text.SetY(60);
            Text.AddLine("use wasd or arrows to move, and break or space to shoot.");
            Text.AddLine("to show up statistics, press tab during game.");
            Text.AddLine("");
            Text.AddLine("in deathmatch mode, you are to kill everything moveable.");
            Text.AddLine("in teamdeathmatch mode, your team is to kill everything moveable.");
            Text.AddLine("and in capture the flag mode, you team must sneak more hostile");
            Text.AddLine("flags than enemies do in 5 minutes.");
            Text.AddLine("");
            Text.AddLine("isn't that easy?");
        }
Пример #4
0
        public MapEditorHelpGuiScreen(InputHandler Input)
            : base(Input, true, true, false, false)
        {
            SetTitle("Map editor help");

            Text.SetY(60);
            Text.AddLine("arrows or wasd to move.");
            Text.AddLine("shift for multiple selection.");
            Text.AddLine("Ctrl+C, Ctrl+V, Ctrl+X to copy, paste and cut, accordingly.");
            Text.AddLine("Ctrl+Z, Ctrl+Y to undo and redo.");
            Text.AddLine("M to activate minimap.");
            Text.AddLine("Q to preview the whole level.");
            Text.AddLine("Ctrl+S to save.");
            Text.AddLine("F1 and F2 to activate the lines of");
            Text.AddLine("vertical and horizontal symmetry, accordingly.");
            Text.AddLine("F3 to deactivate the lines of symmetry.");
            Text.AddLine("");
            Text.AddLine("isn't that easy?");
        }