2023-08-10 22:40:02 -07:00

20 lines
488 B
XML

<prefab name="Button" type="">
<asset type="truetype" name="font_main" />
<UISimpleLabel ref="uiItem" font="font_main" size="32" />
<UISimpleMenuItem ref="menuItem" />
<code type="init">
useEvent([&amp;]{
uiItem->color = COLOR_RED;
}, menuItem->eventHoveredOn);
useEvent([&amp;]{
uiItem->color = COLOR_BLUE;
}, menuItem->eventHoveredOff);
useEvent([&amp;]{
uiItem->color = COLOR_GREEN;
}, menuItem->eventSelected);
</code>
</prefab>