Hi, i am trying to add an SWindow on the screen for an inventory UI.
First is it a good thing to use SWindow for a game ?
Right now i got the window to show up but either in complete fullscreen or with my content in the middle wihout any title bar.
Also when the window is in fullscreen and i click the “cross” to close it crash the editor. In any of those situation the window is not draggable.
i use this inside my widget :
SWindow::Construct(SWindow::FArguments()
.Title(LOCTEXT("Title", "Inventory"))
.SupportsMinimize(false)
.SupportsMaximize(false)
.SizingRule( ESizingRule::Autosized
.AutoCenter(EAutoCenter::None)
.IsInitiallyMaximized(false)
.bDragAnywhere(true)
[
//my content
]);
and this to put it on screen :
GEngine->GameViewport->AddViewportWidgetContent( /*reference to widget content*/ SNew(SWeakWidget).PossiblyNullContent(InventoryUIWidget.ToSharedRef()));
So i would like to just have a window apparing iwith the size of my content and be able to drag it around, should i use something else ?
I have a hard time finding any simple example on how to use windows, thanks for your help !