简体   繁体   中英

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. 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. 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 ?

SNew(SWidgetSwitcher)
.WidgetIndex(this, &SMyUIWidget::GetCurrentTabIndex)

This might help you: https://nerivec.github.io/old-ue4-wiki/pages/slate-tabs.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM