Setup phone UI
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
// © 2025 Naked People Team. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CommonUserWidget.h"
|
||||
#include "PhoneAppIconWidget.generated.h"
|
||||
|
||||
class UButton;
|
||||
class UImage;
|
||||
class UCommonTextBlock;
|
||||
class UPhoneAppWidget;
|
||||
class UTexture2D;
|
||||
|
||||
// One launcher icon on the phone home screen. Built at runtime by UPhoneHomeScreenWidget from its
|
||||
// AppEntries array; broadcasts the app class to launch when tapped.
|
||||
UCLASS(Abstract)
|
||||
class NAKEDDESIRE_API UPhoneAppIconWidget : public UCommonUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
void Init(const FText& InName, UTexture2D* InIcon, TSubclassOf<UPhoneAppWidget> InAppClass);
|
||||
|
||||
DECLARE_DELEGATE_OneParam(FOnAppIconClicked, TSubclassOf<UPhoneAppWidget>);
|
||||
FOnAppIconClicked OnClicked;
|
||||
|
||||
private:
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
TObjectPtr<UButton> IconButton;
|
||||
|
||||
UPROPERTY(meta = (BindWidgetOptional))
|
||||
TObjectPtr<UImage> IconImage;
|
||||
|
||||
UPROPERTY(meta = (BindWidgetOptional))
|
||||
TObjectPtr<UCommonTextBlock> NameText;
|
||||
|
||||
UPROPERTY()
|
||||
TSubclassOf<UPhoneAppWidget> AppClass;
|
||||
|
||||
UFUNCTION()
|
||||
void HandleClicked();
|
||||
};
|
||||
Reference in New Issue
Block a user