BigMo / KCMods

A collection of my mods for the game Kingdoms and Castles
8 stars 3 forks source link

Add interactive button component #2

Open cedricjansen opened 4 years ago

cedricjansen commented 4 years ago

Behaviour events: on mousehover, on mousedown, on mouseleave, onmousedownhold

BigMo commented 4 years ago

I could add a readonly property state to the Button UI element that is set when the user interacts with the button. The mod menu would then send this to subscribed mods and those mods could react on this change of state. What's the actual use-case you had in mind though? Would the suggested approach do?