Skip to content

Instantly share code, notes, and snippets.

@Philtherage
Philtherage / UMainMenu.h
Created May 19, 2022 16:03
Server Row Selection In C++
public:
FORCEINLINE class USessionEntryWidget* GetCurrentSelectedSessionEntry() const
{
return CurrentSelectedEntry;
}
void SetCurrentSelectedSessionEntry(USessionEntryWidget* InEntry);
private:
@Philtherage
Philtherage / UInGameMenu.cpp
Last active May 16, 2022 21:29
Something like this for Setting up and Tearing Down your widgets. NativeDestruct() will also be called when Leaving MainMenu Level. This Works as of Engine Version 5.0.1.
void UInGameMenu::OnCancel()
{
//this function Destroys the widget and calls NativeDestruct().
RemoveFromParent();
//Ignore this I used delegates instead of an interface.
if(OnCancelSelected.IsBound())
{
OnCancelSelected.Execute();
}