ZUI coding - Maybe HaxeUI


#1

Hey guys,

I am trying to figure some things out with the ZUI coding. I have gone over the Kode Garden example and am starting to get the hang of whats going on. I have a few questions.

  1. How can you change the color of the text or background. I see in the documentation that color is an option for the Handles and so I assume for the UI elements. I can’t seem to figure out the right dot sequence or position inside the parens to put it.

  2. How would you asses the slider position from Nodes - say for a health slider. Would this use the set static property node? Would the UI code have to be on the same object?

  3. How would you access a button in nodes if it was created with a script (the script seems to be the only way to access all of the options available as I was asking about in the 1st question.

  4. For a game UI would it be better to use HaxeUI? It seems to have more options and might be better for this purpose but I can’t seem to find any information on how to use it with armory.

Any answers would be helpful or anything that might point me to more or better information would also be great.

Monte


#2

Yeah, for game HaxeUI would be better but I thinks HaxeUI (Kha Backend) is not stable yet -> https://github.com/haxeui/haxeui-kha.


#3

Updated the minimal example at https://github.com/armory3d/haxeui_example (note that it needs to be cloned recursively like stated in the readme, in order to get the haxeui modules). HTML5 seems to work ok, otherwise there are compile issues with haxeui + kha, will see how to resolve that.


#4

@lubos - is it possible to control the position of the slider in ZUI by a variable? To use it for a health slider for example. Also can you control the color, size and font or each line of text? I am trying to figure it all out be examples but can’t seem to discover all the dot sequence.


#5

i think maybe you can


#6

I guess I am a complete idiot when it comes to the GItHub - I have no idea what clone recursively or how to do it.


#7

Noted! Will add docs on that asap.

For the git clone stuff:

  • Open command line in some folder where you want the project to be downloaded
  • Paste git clone --recursive https://github.com/armory3d/haxeui_example into command line and hit enter

That should be it. Git can be installed from here if needed.


#8

I don’t understand where you get the command line within a folder. Have installed git as linked to above.


#9

Hi, you have to create a folder, name it and then clic in its adresse bar and type cmd.


#10

Thanks very much!!! I will test this out later today.


#11

You’re welcome :slight_smile: You can learn more here https://wiki.blender.org/wiki/Building_Blender/Windows and if you speak french check this out : https://www.youtube.com/watch?v=_oMRcJNvU9s
Cheers.

Command line to enter in a folder if you a tree is "cd "


#12

That worked perfectly - thanks again for the advise and help.