Event properties on widgets

If we could define an event right on a widget, we would be able to create modular UI packages.

For example, you could have a UI button defined like this:

	<properties>
		<property name="text" type="text"></property>
		<property name="color" type="color"></property>
		<property name="textSize" type="string" default="1rem"></property>
		<property name="onClick" type="event"></property>
	</properties>

image

Then the user could drag that around and create their own modular menu one piece at a time using Crayta’s built-in controls.

The event would fire off on the client to whatever lua function, where they could program in their action.

4 Likes

Really nice request ! Upvoting now !