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

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline TopperDEL  
#1 Posted : Tuesday, December 31, 2013 4:35:44 PM(UTC)
TopperDEL

Joined: 12/27/2013(UTC)
Posts: 11
Location: Bayern

Hi!

The last question for today, I promise. ;)

What is the best way to work with the Scenes? I can create Scenes in the DeltaEngine-Editor and I can Show and hide them from code. But there is no clear way to attach code to the controls in the Scene without creating some Kind of "glue code". I Need to search for specific controls in the Controls-Collection of the Scene, cast them to InteractiveButton an attach a Delegate to the Clicked-Action. Is there a better way of doing this? How about creating a Kind of Scene-Controller-Class on saving of the Scene, that automatically creates Clicked-Actions/Events I can bind to?
Or how is it supposed to be done? None of the Starter Kit really uses prebuild Scenes, as far as I know.

Thank you!

Best regards

TopperDEL

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

Offline elasto  
#2 Posted : Tuesday, December 31, 2013 4:50:57 PM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Right now there isn't really a better way to do it than the way you suggest.

If you can flesh out some more details on how you'd like a Controller class to work it can certainly be considered.

One way that occurs to me on reading your post is that there could be a method in Scene that takes a string tag and Action code and searches for the control with that tag and adds the given code to the Clicked delegate.

Would that sort of thing work for you?

(Oh, and feel free to keep asking as many questions as you like ;))
Offline TopperDEL  
#3 Posted : Wednesday, January 1, 2014 2:31:13 PM(UTC)
TopperDEL

Joined: 12/27/2013(UTC)
Posts: 11
Location: Bayern

Yes, that method would help. Imagine a MainMenu in a game with just one button: "Close game". To Close the app on click of that button would Need much more code to find the button and to attach an Event handler then the actual closing Needs. Your suggested Method would work, yes - I then onle had one method call with one Lambda Expression.
Offline Benjamin  
#4 Posted : Wednesday, January 1, 2014 5:04:30 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)
We got quite a few suggestions for the UI Editor and Scenes in general in recent weeks. For the past 2 months most of the editor and game team have been focusing on getting our example game Creepy Towers to work, now we have more time to improve scenes and the Editor to support scenarios like the one you describe (simple auto-generated code from the editor to get started with a freshly build scene). I have written down a feature request for this. This topic will be updated once such a feature is available.
Offline TopperDEL  
#5 Posted : Wednesday, January 1, 2014 5:24:29 PM(UTC)
TopperDEL

Joined: 12/27/2013(UTC)
Posts: 11
Location: Bayern

Thanks! I'm really happy about the way you react on Feedback so far! :)
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Similar Topics
Delta Scenes (UI)
by internetfreak 6/14/2013 11:17:08 PM(UTC)
[bug ]Scenes 6: load content scene (Samples)
by bfox 10/9/2011 3:02:15 PM(UTC)
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.059 seconds.