Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline vrenken  
#1 Posted : Saturday, January 4, 2014 2:22:16 PM(UTC)
vrenken

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

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Benjamin  
#2 Posted : Saturday, January 4, 2014 4:31:17 PM(UTC)
Benjamin

Medals: Admin

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
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
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.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.039 seconds.