[英]How to add SWidgetSwitcher and get/set current widget index in Unreal Engine 4?
I'm trying to make a simple menu widget with Slate.我正在尝试用 Slate 制作一个简单的菜单小部件。 I'm able to add canvas, buttons etc like SNew(SCanvas)
but I am stuck with SNew(SWidgetSwitcher)
, on how to use this and set the widget index.我可以添加 canvas、按钮等,如SNew(SCanvas)
但我坚持使用SNew(SWidgetSwitcher)
,关于如何使用它并设置小部件索引。 I'm new to this and havn't found much info on Google, so:我是新手,在谷歌上找不到太多信息,所以:
How to I add an SWidgetSwitcher
and get/set current widget index in Unreal Engine 4 ?如何在Unreal Engine 4中添加SWidgetSwitcher
并获取/设置当前小部件索引?
SNew(SWidgetSwitcher)
.WidgetIndex(this, &SMyUIWidget::GetCurrentTabIndex)
This might help you: https://nerivec.github.io/old-ue4-wiki/pages/slate-tabs.html这可能会对您有所帮助: https://nerivec.github.io/old-ue4-wiki/pages/slate-tabs.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.