Ue5 控件右键点击事件
程序开发
2023-09-03 11:12:23
问题
控件里的Button按钮,默认事件里没有右键点击事件。

那么如何实现背包里的物品的右键事件呢?(比如弹出细分菜单,转移物件等常见游戏操作)

实现方法
在函数里重载“按下鼠标按钮时”函数:

拉出Mouse Event--按鼠标按钮--设置为“鼠标右键”--最后返回“已处理”
就可以实现右键检测。(下面以打印字符串来检验)

结果
右键图标


标签:
相关文章
-
无相关信息