public GeneralPanel(Simulator simulator, Vector3 position, Vector2 size, double visualPriority, Color color) : base(simulator.Scene, position, size, visualPriority, color) { Simulator = simulator; SetTitle("General"); Difficulty = new ChoicesHorizontalSlider("Difficulty", new List<string>() { "Easy", "Normal", "Hard" }, 0); World = new NumericHorizontalSlider("World #", 1, 20, 1, 1, 100); Level = new NumericHorizontalSlider("Level #", 1, 50, 1, 1, 100); AddWidget("Difficulty", Difficulty); AddWidget("World", World); AddWidget("Level", Level); Initialize(); }
public WaveSubPanel(Simulator simulator, Vector2 size, double visualPriority, Color color) : base(simulator.Scene, Vector3.Zero, size, visualPriority, color) { OnlyShowWidgets = true; SideA = new VerticalPanel(simulator.Scene, new Vector3(), new Vector2(size.X / 2, size.Y), visualPriority, color) { OnlyShowWidgets = true, DistanceBetweenTwoChoices = 15 }; SideB = new VerticalPanel(simulator.Scene, new Vector3(), new Vector2(size.X / 2, size.Y), visualPriority, color) { OnlyShowWidgets = true, DistanceBetweenTwoChoices = 15 }; StartingTime = new NumericHorizontalSlider("Starting time", 0, 500, 0, 10, 50); Enemies = new EnemiesWidget(simulator.EnemiesFactory.All, (int) size.X / 2, 3); Level = new NumericHorizontalSlider("Level", 1, 100, 1, 1, 50); CashValue = new NumericHorizontalSlider("Cash", 0, 100, 0, 5, 100); QuantityWidget = new NumericHorizontalSlider("Quantity", 0, 500, 0, 5, 50); Distances = new ChoicesHorizontalSlider("Distance", WaveGenerator.DistancesStrings, 0); DelayWidget = new NumericHorizontalSlider("Delay", 0, 20, 0, 1, 100); ApplyDelayWidget = new NumericHorizontalSlider("Apply Delay", -1, 20, 0, 1, 100); SwitchEveryWidget = new NumericHorizontalSlider("Switch every", -1, 50, 5, 5, 100); SideA.AddWidget("StartingTime", StartingTime); SideA.AddWidget("Enemies", Enemies); SideA.AddWidget("Level", Level); SideA.AddWidget("CashValue", CashValue); SideB.AddWidget("Quantity", QuantityWidget); SideB.AddWidget("Distances", Distances); SideB.AddWidget("Delay", DelayWidget); SideB.AddWidget("ApplyDelay", ApplyDelayWidget); SideB.AddWidget("SwitchEvery", SwitchEveryWidget); AddWidget("SideA", SideA); AddWidget("SideB", SideB); }