Example #1
0
 public void BackTest()
 {
     string statictext = string.Empty; // TODO: Passenden Wert initialisieren
     float depth = 0F; // TODO: Passenden Wert initialisieren
     LayerDock xDock = new LayerDock(); // TODO: Passenden Wert initialisieren
     LayerDock yDock = new LayerDock(); // TODO: Passenden Wert initialisieren
     Func<bool> visible = null; // TODO: Passenden Wert initialisieren
     TextLayer target = new TextLayer(statictext, depth, xDock, yDock, visible); // TODO: Passenden Wert initialisieren
     target.Back();
     Assert.Inconclusive("Eine Methode, die keinen Wert zurückgibt, kann nicht überprüft werden.");
 }
Example #2
0
 public void HeightTest()
 {
     string statictext = string.Empty; // TODO: Passenden Wert initialisieren
     float depth = 0F; // TODO: Passenden Wert initialisieren
     LayerDock xDock = new LayerDock(); // TODO: Passenden Wert initialisieren
     LayerDock yDock = new LayerDock(); // TODO: Passenden Wert initialisieren
     Func<bool> visible = null; // TODO: Passenden Wert initialisieren
     TextLayer target = new TextLayer(statictext, depth, xDock, yDock, visible); // TODO: Passenden Wert initialisieren
     int actual;
     actual = target.Height;
     Assert.Inconclusive("Überprüfen Sie die Richtigkeit dieser Testmethode.");
 }
Example #3
0
        public Renderer()
        {
            this.gd = Static.Device;
            var window = Static.Window;
            var control = Static.RenderTarget;
            window.Move += Renderer_Move;
            window.Shown += Renderer_Move;
            control.Move += Renderer_Move;
            control.SizeChanged += control_Resize;

            effect = Static.Effect;
            AdjustDevice();

            volume = Static.Volume;

            Pen2D pen = new Pen2D(System.Drawing.Color.White, 3);
            var lineCross = new Bitmap2D(40, 40);
            Graphics2D glc = Graphics2D.FromImage(lineCross);
            glc.DrawLine(pen, 20, 0, 20, 16);
            glc.DrawLine(pen, 20, 24, 20, 40);
            glc.DrawLine(pen, 0, 20, 16, 20);
            glc.DrawLine(pen, 24, 20, 40, 20);

            layerLineCross = new Layer(GraphicsHelper.Convert(lineCross, gd), 1, 0.7f, LayerDock.Center, LayerDock.Center, () => true);
            layerLineCross.Push(new LayerCell
            {
                SourceTexture = new Rectangle(0, 0, 40, 40),
                DestinationScreen = new Rectangle(-18, -18, 36, 36)
            });
            layerCurrentChatLine = new TextLayer("> ", 0.7f, LayerDock.Near, LayerDock.Near, () => Static.GameManager.chat);
            layerCurrentChatLine.Translation = () => new Vector2(10, 10 + layerCurrentChatLine.Height - 30);

            chatHistory = new Queue<Layer>();
            debug1 = new TextLayer("", 0.7f, LayerDock.Near, LayerDock.Far, () => true);
            debug1.Translation = () => new Vector2(0, -30);
            debug2 = new TextLayer("", 0.7f, LayerDock.Near, LayerDock.Far, () => true);
            debug2.Translation = () => new Vector2(0, -60);
            debug3 = new TextLayer("", 0.7f, LayerDock.Near, LayerDock.Far, () => true);
            debug3.Translation = () => new Vector2(0, -90);
            currentMat = new TextLayer("", 0.7f, LayerDock.Near, LayerDock.Far, () => true);
            currentMat.Translation = () => new Vector2(0, -120);

            hoverBox = HelpfulStuff.getCube(0.51f, GraphicsHelper.TextureCoord(36));
        }
Example #4
0
 public void TextLayerConstructorTest()
 {
     string statictext = string.Empty; // TODO: Passenden Wert initialisieren
     float depth = 0F; // TODO: Passenden Wert initialisieren
     LayerDock xDock = new LayerDock(); // TODO: Passenden Wert initialisieren
     LayerDock yDock = new LayerDock(); // TODO: Passenden Wert initialisieren
     Func<bool> visible = null; // TODO: Passenden Wert initialisieren
     TextLayer target = new TextLayer(statictext, depth, xDock, yDock, visible);
     Assert.Inconclusive("TODO: Code zum Überprüfen des Ziels implementieren");
 }
Example #5
0
 public void AddChatHistory(string line)
 {
     lock (chatHistory)
     {
         Stopwatch sw = Stopwatch.StartNew();
         var layer = new TextLayer(line, 0.7f, LayerDock.Near, LayerDock.Near, () => sw.ElapsedMilliseconds < 5000 || Static.GameManager.chat);
         layer.Translation = () => new Vector2(10, 80 + layer.Height);
         foreach (var liner in chatHistory)
         {
             var trans = liner.Translation() + new Vector2(0, layer.Height);
             liner.Translation = () => trans;
         }
         chatHistory.Enqueue(layer);
         if (chatHistory.Count > 10)
             chatHistory.Dequeue();
     }
 }