Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Athin on August 08, 2019, 11:28:00 PM
-
Hey guys,
I've always struggled with how to handle UI buttons constantly activating/deactivating with my RTS project and was looking for some advice. My basic setup currently is whenever you click on a unit/building, that send an event to activate X buttons in an array and also hands them an Int Button ID . When X button is clicked, it shoots that button ID to a logic check FSM to see what action to do.
This works for the most part but is very chunky and bulky as I have to reset icons and values constantly.
Thanks for any help anyone can give!
-
Hi,
UI is very heavy on handling, so don't be surprised by this, simple hello world always look simple, but when you actually want a proper UI, a lot of work is required, and often completly overlooked in favor of the gameplay itself...
your implementation sound good. I usually make sure my events reflect where they come from so :
XXX / ON BUTTON CLICK
then my logic will catch this and maybe send more events related to XXX
XXX / EXECUTE
Things like that.
Bye,
Jean
-
Thanks Jean!
At least now I know I'm on the right path. There is very little online for UI tutorials other then the simple 1-3 pop up windows. I was just worried I was missing something huge and was doing it the hard way. Sounds like UI in general is just bulky.
Will try your tips as well. May save me a few headaches once I get a few layers deep in UI :)
Thanks
-
Hi,
Check out the meface sample on the ecosystem, it has a complex ui
https://twitter.com/jeanatplaymaker/status/968773939630571520?lang=bn
and it can't get worse in terms of two way bindings between UI and content.
Bye,
Jean