SceneTests ChangeBackgroundImage Method Delta Engine Documentation

Namespace: DeltaEngine.Scenes.Tests
Assembly: DeltaEngine.Scenes.Tests (in DeltaEngine.Scenes.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void ChangeBackgroundImage()
Examples

[Test, CloseAfterFirstFrame]
public void ChangeBackgroundImage()
{
    Assert.AreEqual(0, scene.Controls.Count);
    var background = new Material(ShaderFlags.Position2DColoredTextured,
        "SimpleMainMenuBackground");
    scene.SetQuadraticBackground(background);
    Assert.AreEqual(1, scene.Controls.Count);
    Assert.AreEqual(background, ((Sprite)scene.Controls[0]).Material);
    var logo = new Material(ShaderFlags.Position2DColoredTextured, "DeltaEngineLogo");
    scene.SetQuadraticBackground(logo);
    Assert.AreEqual(1, scene.Controls.Count);
    Assert.AreEqual(logo, ((Sprite)scene.Controls[0]).Material);
}
See Also