Delta Engine
»
Support
»
UI
»
Loading and showing a scene created in the UI editor.
Joined: 12/31/2013(UTC) Posts: 11 Location: Enschede
Thanks: 2 times
|
Hi,
i was wondering which example contains a code snippet that loads and shows a scene created using the UI scene editor.
Thanks in advance,
Peter Vrenken
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
There are a few examples in SceneTests.cs: Code:
public class SceneTests : TestWithMocksOrVisually
{
//...
[Test, CloseAfterFirstFrame]
public void LoadSceneWithoutAnyControls()
{
var loadedScene = ContentLoader.Load<Scene>("EmptyScene");
Assert.AreEqual("EmptyScene", loadedScene.Name);
Assert.AreEqual(0, loadedScene.Controls.Count);
}
[Test]
public void LoadSceneWithAButton()
{
var loadedScene = ContentLoader.Load<Scene>("SceneWithAButton");
Assert.AreEqual("SceneWithAButton", loadedScene.Name);
Assert.AreEqual(1, loadedScene.Controls.Count);
Assert.AreEqual(typeof(Button), loadedScene.Controls[0].GetType());
}
//...
Also the scene tutorials will be back in a few weeks: http://deltaengine.net/learn/tutorials
|
|
|
|
Delta Engine
»
Support
»
UI
»
Loading and showing a scene created in the UI editor.
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.