53 lines
1.5 KiB
C++
53 lines
1.5 KiB
C++
// Project Lab - NHTV Igad
|
|
|
|
#pragma once
|
|
|
|
#include "MenuItemBase.h"
|
|
#include "Blueprint/UserWidget.h"
|
|
#include "MenuScreenBase.generated.h"
|
|
|
|
/**
|
|
* Base class for a menu item with controller navigation/input support
|
|
*/
|
|
UCLASS()
|
|
class UNREALPROJECT_API UMenuScreenBase : public UMenuItemBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UMenuScreenBase(const FObjectInitializer& init);
|
|
void NativeConstruct() override;
|
|
void NativeDestruct() override;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "MenuScreen")
|
|
virtual void OpenSubMenu(class USubMenu* submenu);
|
|
UFUNCTION(BlueprintCallable, Category = "MenuScreen")
|
|
void CloseActiveSubMenu();
|
|
UFUNCTION(BlueprintCallable, Category = "MenuScreen")
|
|
virtual void CloseSubMenu(class USubMenu* submenu);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "MenuScreen")
|
|
TArray<class USubMenu*> GetSubMenus();
|
|
UFUNCTION(BlueprintCallable, Category = "MenuScreen")
|
|
class USubMenu* GetActiveSubMenu();
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "MenuScreen")
|
|
void SetButtonHintBar(class UButtonHintBar* bar);
|
|
UFUNCTION(BlueprintCallable, Category = "MenuScreen")
|
|
class UButtonHintBar* GetButtonHintBar() const;
|
|
|
|
void OnItemSelected();
|
|
|
|
virtual void NativeOnMenuAction(EMenuActionBinding action) override;
|
|
|
|
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "MenuScreen")
|
|
bool registerMenuActions;
|
|
|
|
protected:
|
|
UPROPERTY()
|
|
TArray<class USubMenu*> m_subMenus;
|
|
|
|
UPROPERTY()
|
|
class UButtonHintBar* m_buttonHintBar;
|
|
};
|