Dynamicly create UI elements on runtime

Have a great idea about how to expand ML - post it here
henris
Newbie
Newbie
Posts: 8
Joined: Fri Mar 16, 2012 10:06 am
Contact:

Dynamicly create UI elements on runtime

Postby henris » Wed Mar 28, 2012 11:44 am

Would it be possible to add an option to UI elements for dynamic runtime creation? As an example you could create a single group of UI elements (thumbnail button, title text etc.) representing a movie item in the movie browser scene and then just tell how many there should be and how they should be organised and ML would on runtime create the elements. So instead of creating 32 groups of UI elements you would create only one thus making changes a breeze. In the UI element properties you could then utilise the index number (with some fancy syntax) for server variable reference replacement.

We could start with a few parameters for dynamic creation: column count, row count, column spacing and row spacing should be enough for starters. The dynamic creation could also first be implemented on those element types which are used in media scenes. Since the ML does not (to my understanding) support grouping elements into "components" you would have to tweak the spacings if you have more one element to be duplicated. Of course true grouping would make this dynamic creation way more powerfull.

This idea came from looking at the way the media scenes are currently built and from my own need to modify them to support 1920x1080 display resolutions. There are 32 movie items consisting of several UI elements each and the only the difference seemed to be the server variable index in the element properties. The idea of having to manipulate 32 almost identical elements just doesn't feel right, what if I wanted to change to some color or display a new attribute. I would also see this kind of dynamic creation usefull for any other area where more than a few items are created and they are accessing some index based server variables.

I have no idea how the ML client creates the actual UI from scene files on runtime but I would guess that this should be almost trivial to implement and should not mess with any other area since the end result should be exactly the same as with hand made scene. Of course you could implement the duplication on the designer side but that is not the right place in my mind.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Dynamicly create UI elements on runtime

Postby CinemarDave » Wed Mar 28, 2012 6:02 pm

Would it be possible to add an option to UI elements for dynamic runtime creation?

I understand what you would like to do. However, that is simply not possible in the current versions of the software. Implementing this would be a major undertaking and probably will not happen in the V4 releases. Have a look at the sample 16x9 scenes especially the new FanArt library. This will give you a leg up on scene design since they are native 1920x1080 designs.

henris
Newbie
Newbie
Posts: 8
Joined: Fri Mar 16, 2012 10:06 am
Contact:

Re: Dynamicly create UI elements on runtime

Postby henris » Fri Mar 30, 2012 12:12 pm

I'm a little confused now but I guess that's normal for a ML newbie. I downloaded and installed the Fan Art library (based on 27) but don't seem to find working 1920x1080 scenes. The installation created the following directory structure under the content folder:
- 0027
-- 1024x768
-- RemoteControl

There is a fully working set of scenes (starting from home.mls) in the 1024x768 folder. The RemoteControl folder contains Movies_* and Netflix_* scene files but no home.mls. The problem is that everything underneath 1024x768 is consistently in 4:3 1024x768 resolution and the RemoteControl scenes seem to be totally separate and not working (don't navigate between scenes). I can open the Movies_Thumbs_Browse.mls and it's populated with the media data but the only thing working is the yellow highlight when I select a movie. There is no way to navigate to next page or display movie details.

So is there somewhere a working 1920x1080 library with home.mls?

I also noticed some weird but consistent behaviour with saving of client options (content folder, startup scene, display resolutions). The changes seem to be persistent (over client restart) only if I save the current scene file after closing the options dialogue with ok button. I would have assumed that the options are client settings and have nothing to do with a scene file.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Dynamicly create UI elements on runtime

Postby CinemarDave » Fri Mar 30, 2012 12:30 pm

Set your content folder to the RemoteControl folder.
Open the Movies_Thumbs_Browse.mls as the base scene.
These are a set of scenes that are optimized for use with a MCE Remote control. However you can use the keyboard as well to navigate. Up,down,left,right,enter and backspace are the most important keys.

This is an example of movies running at 1920x1080 suitable for large displays.


Return to “MainLobby Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest