Ejemplo n.º 1
0
        /// <summary>
        /// Erzeugt eine neue Instanz eines CreativeModeScreen-Objekts und initialisiert diese mit einem Knot3Game-Objekt game, sowie einem Knoten knot.
        /// </summary>
        public VisualTestsScreen(GameCore game)
            : base(game)
        {
            // die Spielwelt
            world = new World(screen: this, drawOrder: DisplayLayer.GameWorld, bounds: Bounds.FromLeft(0.60f));

            // Hintergrund
            //SkyCube skyCube = new SkyCube (screen: this, position: Vector3.Zero, distance: world.Camera.MaxPositionDistance + 500);
            //world.Add (skyCube);

            // Menü
            settingsMenu                    = new Menu(this, DisplayLayer.Overlay + DisplayLayer.Menu);
            settingsMenu.Bounds             = Bounds.FromRight(0.40f).FromBottom(0.9f).FromLeft(0.8f);
            settingsMenu.Bounds.Padding     = new ScreenPoint(this, 0.010f, 0.010f);
            settingsMenu.RelativeItemHeight = 0.030f;

            float[] validEdgeCounts = new float[] { 500, 1000, 2000, 3000, 4000, 5000, 7500, 10000, 15000 };
            optionEdgeCount = new FloatOption(
                section: "visualtests",
                name: "edgecount",
                defaultValue: validEdgeCounts.At(0),
                validValues: validEdgeCounts,
                configFile: Config.Default
                )
            {
                Verbose = false
            };
            optionEdgeCount.Value = validEdgeCounts.At(0);
            itemEdgeCount         = new ComboBox(
                screen: this,
                drawOrder: DisplayLayer.Overlay + DisplayLayer.MenuItem,
                text: "Edges:"
                );
            itemEdgeCount.AddEntries(optionEdgeCount);
            itemEdgeCount.ValueChanged += OnEdgeCountChanged;

            itemDisplayTime = new InputItem(
                screen: this,
                drawOrder: DisplayLayer.Overlay + DisplayLayer.MenuItem,
                text: "Time:",
                inputText: ""
                );

            itemFPS = new InputItem(
                screen: this,
                drawOrder: DisplayLayer.Overlay + DisplayLayer.MenuItem,
                text: "FPS:",
                inputText: ""
                );

            OnEdgeCountChanged(null);
        }