How to make a mobile game menu(button that can be touched?)

i manged to make one using widget but only on mouse click i need to know to make one with touch( on widget interfase)

when u click on the button itself in the umg, on the details panel it will say “on clicked” and “on pressed” and you will click the “on pressed” and either copy and paste everything after the “on clicked” or just drag the arrow from your on clicked event to your on pressed event, they will be in the same event graph, but for testing purposes, so your button still works in the editor i would try copying and pasting the function, i hope this helps!

what is the diffrancebetween onclick and onpress?
onpress can be interacted with the touch and onclick cant?

Correct, but as for the “on release” depends, if the button takes you to a new map or something of the sort then you dont need it, but if it triggers an attack or something like that then yes you would use it

That is thebdifference you are correct

Hi!

Default Engine do not generate Click, Over and Touch events. For activate this events, create blueprint Player Controller. Enable all events and add this controller to Game Mode. For testing touch event on PC, in Project Setting enable Use Mouse Touch.

1 Like

so what behrton wrote was incorrect? or you just expanded the answer?

btw im making a button style game that switch level for ech button clicked(can i make the blutprint universal or do i have to put in at every lvl (btw tnx for the help :slight_smile: )

tnx :))
you help alot

Anytime! Glad i could help!

@Behrtron Can you please edit this to make it readable. Honestly.