Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: exostum on January 24, 2015, 07:48:35 AM

Title: Custom unit panel
Post by: exostum on January 24, 2015, 07:48:35 AM
Hello Everyone.

For my new colonial space map I added a custom player unit and now I want to add a select panel with option like the one with normal player unit:

(the activate ressuply destroy button and  checkbox for example)

But I am at my limits of my CRPL.

Here is what is already done

Moveable by user CRPL interface (https://github.com/Exostum/CRPL/blob/master/Moveable.crpl)
Selectable by user CRPL interface (https://github.com/Exostum/CRPL/blob/master/Selectable.crpl)
Main CRPL script for unit (https://github.com/Exostum/CRPL/blob/master/AntiCreeperGenerator.crpl)

So any idea how to start it ? Anyone willing to help me ?

Edit : Attached a screenshot of what i am referring to




Title: Re: Custom unit panel
Post by: stewbasic on January 25, 2015, 08:10:27 PM
This might help for the background at least
http://knucklecracker.com/forums/index.php?topic=16722

However as far as I know, you can't put something over the vanilla HUD without disabling normal controls (because the vanilla HUD consumes all clicks on it, so CRPL can't see them, and is also drawn in front of any cores).
Title: Re: Custom unit panel
Post by: exostum on January 26, 2015, 06:59:49 AM
Thanks, I  will include you in the credits of my map if I use it.

For now i need more help

Here where i am at test phase

So far the panel activate when the unit is selected, but i can see it when normal control are activated.

Title: Re: Custom unit panel
Post by: stewbasic on January 31, 2015, 12:58:10 PM
Yeah the vanilla HUD is drawn on top but partially transparent, so you'll have to hide the custom one when it shouldn't be seen. Easiest way would be to move it off screen (including any other cores you use to make up the HUD, such as text labels). See attached example.