Jump to content

Recommended Posts

Hi everyone,

 

i am currently working on designing an interface. I have looked at some tutorials on youtube and Moricky's UI template.

The videos sadly don't cover what i had in mind and with Moricky's template i just see the result and not how its built.

I have some difficulties grasping some concepts.

 

1) I want to make a tree view element in the interface that the user can select, expand and collapse. I see how its done in Moricky's template but is there any way to design it in the GUI Editor? I dont see a Tree View element in the list of available resources.

 

2) Because of 1), is the assumption correct that you only design the overall appearance of the interface in the editor, but do the fine tuning in the code? (setting the CT_TREE type, etc...)

 

3) If 2) is correct, what kind of element do i need to place into the GUI editor to convert it into a Tree View in the code?

 

4) Because of 1)-3) it seems that the GUI is hard to maintain after you made the corrections described in 2). I know that you can export the layout in as editor-compatible and the classes. But i assume most of the work is done in the code and not in the editor. 

 

Can anyone shed some light on this?

 

Regards,

iFu

 

Share this post


Link to post
Share on other sites

bump, noone got a comment on this?  :(

Share this post


Link to post
Share on other sites

1) No you are correct you can not design a tree in the GUI editor. Not visually.

2) Correct

3) Anything as all your using it for is position and size [x,y,w,h] mainly so a RscText will do.

4) Yes generally (for me anyway) all i use the GUI editor for is designing a starting layout, then do all the rest in a text editor.

There is no need to export a editor compatible layout as you can load the dialog in the editor via ctrl+i and typing in the path e.g

missionConfigFile >> "NameOfUI"

or for RscTitles dialogs

missionConfigFile >> "RscTitles" >> "NameOfUI"

MissionConfigFile is the description.ext

You can also look at the games UIs this way by using

configFile >> "RscDisplayInventory"

Being the inventory UI etc.

You can find a list of games UIs by opening the configViewer and scrolling all the way to the bottom where they are all listed Rsc#.

Any control types that are not supported are displayed as a RscText i think.

You can ctrl right click an element and fill out any non supported parameters that will get exported.

Try loading Morickys test UI and ctrl right click each element to see.

configfile >> "RscTestControlTypes"

  • Like 1

Share this post


Link to post
Share on other sites

Thank you for the detailed answer!

Share this post


Link to post
Share on other sites

Usually when I create a GUI I tend to use simple elements like a background element to visually size the GUI and basically just place placeholders and then change it in the config.

Share this post


Link to post
Share on other sites

I personally prefer to design my GUIs "hardcore", meaning 100% in Notepad++, because once you understand how the numbers work, it's very handy, because you can use #define to relate values to each other in order for all UI elements to align if you change just one value, plus you don't get values like 0.4956234, as you would with the GUI Editor, when you actually want the value to be 0.5.

 

For instance, if you make the size of every UI element dependent on the [x,y,w,h] values of the whole display/dialog and you simply want to make it a bit smaller, then all you need to do is change the display's overall size and all your elements align automatically. That can save a lot of development time, especially in large and complex UIs.

Share this post


Link to post
Share on other sites

because you can use #define to relate values to each other in order for all UI elements to align if you change just one value, plus you don't get values like 0.4956234, as you would with the GUI Editor, when you actually want the value to be 0.5.

 

For instance, if you make the size of every UI element dependent on the [x,y,w,h] values of the whole display/dialog and you simply want to make it a bit smaller, then all you need to do is change the display's overall size and all your elements align automatically. That can save a lot of development time, especially in large and complex UIs.

 

Could you maybe provide a sample of such define?

 

First of all, i need to get a hang of GUI development but i sense that working in the editor is more efficient when you understand what you are doing.

BTW: regarding resizing. Grid: Absolute is kinda obvious and i know that safezone is relative to the resolution of the client. But what is GUI_GRID exactly? Why should i use it over safezone?

Share this post


Link to post
Share on other sites

GUI_GRID afaik means it will always be there and always have that size, so if you had a screen smaller than the GUI you made or the GUI started on the end of a screen for example you wouldn't see it.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×