From 7a8deb98bde597bc78a305797f20afd039b3c6aa Mon Sep 17 00:00:00 2001 From: koritsa Date: Tue, 2 Jun 2026 01:06:21 +0300 Subject: [PATCH] Added phone app icon materials --- Content/UI/Art/AppIcons/camera-icon.uasset | 3 +++ Content/UI/Art/AppIcons/forum-icon.uasset | 3 +++ Content/UI/Art/AppIcons/gallery-icon.uasset | 3 +++ .../UI/Art/Materials/MI_AppIcon_Camera.uasset | 3 +++ Content/UI/Art/Materials/MI_AppIcon_Forum.uasset | 3 +++ .../UI/Art/Materials/MI_AppIcon_Gallery.uasset | 3 +++ Content/UI/Art/Materials/M_AppIconButton.uasset | 3 +++ Content/UI/Phone/WBP_PhoneAppIcon.uasset | 4 ++-- Content/UI/Phone/WBP_PhoneHome.uasset | 4 ++-- .../NakedDesire/UI/Phone/PhoneAppIconWidget.cpp | 16 ++++++---------- Source/NakedDesire/UI/Phone/PhoneAppIconWidget.h | 9 ++++++--- .../UI/Phone/PhoneHomeScreenWidget.cpp | 2 +- .../NakedDesire/UI/Phone/PhoneHomeScreenWidget.h | 3 +++ 13 files changed, 41 insertions(+), 18 deletions(-) create mode 100644 Content/UI/Art/AppIcons/camera-icon.uasset create mode 100644 Content/UI/Art/AppIcons/forum-icon.uasset create mode 100644 Content/UI/Art/AppIcons/gallery-icon.uasset create mode 100644 Content/UI/Art/Materials/MI_AppIcon_Camera.uasset create mode 100644 Content/UI/Art/Materials/MI_AppIcon_Forum.uasset create mode 100644 Content/UI/Art/Materials/MI_AppIcon_Gallery.uasset create mode 100644 Content/UI/Art/Materials/M_AppIconButton.uasset diff --git a/Content/UI/Art/AppIcons/camera-icon.uasset b/Content/UI/Art/AppIcons/camera-icon.uasset new file mode 100644 index 00000000..a56c017b --- /dev/null +++ b/Content/UI/Art/AppIcons/camera-icon.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c6615fca604ac09586c31c626b66d6d5c5c77659cf8f54b4d13ab4183247aab +size 11030 diff --git a/Content/UI/Art/AppIcons/forum-icon.uasset b/Content/UI/Art/AppIcons/forum-icon.uasset new file mode 100644 index 00000000..2744b862 --- /dev/null +++ b/Content/UI/Art/AppIcons/forum-icon.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42663e14ad77502812e1846df79ef2ad07ff6871b241b233ddc08f59fddfb877 +size 10747 diff --git a/Content/UI/Art/AppIcons/gallery-icon.uasset b/Content/UI/Art/AppIcons/gallery-icon.uasset new file mode 100644 index 00000000..904ee90b --- /dev/null +++ b/Content/UI/Art/AppIcons/gallery-icon.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0eabc128fadaa6a08ff40ff948df1eb19a83ba240a543c6dd923d6f74f5fc85a +size 10903 diff --git a/Content/UI/Art/Materials/MI_AppIcon_Camera.uasset b/Content/UI/Art/Materials/MI_AppIcon_Camera.uasset new file mode 100644 index 00000000..5b05d792 --- /dev/null +++ b/Content/UI/Art/Materials/MI_AppIcon_Camera.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4696bb315dabec0d0d612c7d6a33eb56354231843e48c6a324333ba5111af81d +size 8051 diff --git a/Content/UI/Art/Materials/MI_AppIcon_Forum.uasset b/Content/UI/Art/Materials/MI_AppIcon_Forum.uasset new file mode 100644 index 00000000..fc6d7476 --- /dev/null +++ b/Content/UI/Art/Materials/MI_AppIcon_Forum.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04837ca26aa50a0bd2def2469feca1e2fc8d34da236f9103f31c7163efff179c +size 8199 diff --git a/Content/UI/Art/Materials/MI_AppIcon_Gallery.uasset b/Content/UI/Art/Materials/MI_AppIcon_Gallery.uasset new file mode 100644 index 00000000..17ff8031 --- /dev/null +++ b/Content/UI/Art/Materials/MI_AppIcon_Gallery.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecc2fc8fa2972a49aa72e37c96c20c89d4b32e33806c26f4b0174cbc78ecb34b +size 8152 diff --git a/Content/UI/Art/Materials/M_AppIconButton.uasset b/Content/UI/Art/Materials/M_AppIconButton.uasset new file mode 100644 index 00000000..836ac435 --- /dev/null +++ b/Content/UI/Art/Materials/M_AppIconButton.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e96f2287aa5131ace53548a9750d2eb6d91437a4c4e2ef7e6fe179230b3ee738 +size 20150 diff --git a/Content/UI/Phone/WBP_PhoneAppIcon.uasset b/Content/UI/Phone/WBP_PhoneAppIcon.uasset index 3ef6fd23..fd80ddf7 100644 --- a/Content/UI/Phone/WBP_PhoneAppIcon.uasset +++ b/Content/UI/Phone/WBP_PhoneAppIcon.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:925bcebad19eddef69b4e1266ecb47df827d79641e09d2cc273a4b4b39dfdcdb -size 29656 +oid sha256:fec144904122e88aae6e0391f8245f00a58d15b5d927d7a5f487bda9838eac9a +size 33095 diff --git a/Content/UI/Phone/WBP_PhoneHome.uasset b/Content/UI/Phone/WBP_PhoneHome.uasset index fa19f03a..56fff0d6 100644 --- a/Content/UI/Phone/WBP_PhoneHome.uasset +++ b/Content/UI/Phone/WBP_PhoneHome.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18b8b23b9ad79325f5d674ab84c49c8785806fdd5a5dba456feb92566e6324cd -size 26874 +oid sha256:8ff648dd92b722ed1fb98cccda4b0c80ddece383beb27ac1224ea0071261062d +size 27934 diff --git a/Source/NakedDesire/UI/Phone/PhoneAppIconWidget.cpp b/Source/NakedDesire/UI/Phone/PhoneAppIconWidget.cpp index 12b5c27e..e25d634c 100644 --- a/Source/NakedDesire/UI/Phone/PhoneAppIconWidget.cpp +++ b/Source/NakedDesire/UI/Phone/PhoneAppIconWidget.cpp @@ -6,20 +6,16 @@ #include "Components/Image.h" #include "CommonTextBlock.h" -void UPhoneAppIconWidget::Init(const FText& InName, UTexture2D* InIcon, TSubclassOf InAppClass) +void UPhoneAppIconWidget::Init(const FText& InName, UTexture2D* InIcon, UMaterialInterface* InBgMaterial, TSubclassOf InAppClass) { AppClass = InAppClass; - if (NameText) - { - NameText->SetText(InName); - } + NameText->SetText(InName); - if (IconImage) - { - IconImage->SetBrushFromTexture(InIcon); - IconImage->SetVisibility(InIcon ? ESlateVisibility::HitTestInvisible : ESlateVisibility::Collapsed); - } + IconImage->SetBrushFromTexture(InIcon); + IconImage->SetVisibility(InIcon ? ESlateVisibility::HitTestInvisible : ESlateVisibility::Collapsed); + + BackgroundImage->SetBrushFromMaterial(InBgMaterial); IconButton->OnClicked.AddUniqueDynamic(this, &UPhoneAppIconWidget::HandleClicked); } diff --git a/Source/NakedDesire/UI/Phone/PhoneAppIconWidget.h b/Source/NakedDesire/UI/Phone/PhoneAppIconWidget.h index 63f9b3c8..c53c456e 100644 --- a/Source/NakedDesire/UI/Phone/PhoneAppIconWidget.h +++ b/Source/NakedDesire/UI/Phone/PhoneAppIconWidget.h @@ -20,19 +20,22 @@ class NAKEDDESIRE_API UPhoneAppIconWidget : public UCommonUserWidget GENERATED_BODY() public: - void Init(const FText& InName, UTexture2D* InIcon, TSubclassOf InAppClass); + void Init(const FText& InName, UTexture2D* InIcon, UMaterialInterface* InBgMaterial, TSubclassOf InAppClass); DECLARE_DELEGATE_OneParam(FOnAppIconClicked, TSubclassOf); FOnAppIconClicked OnClicked; private: + UPROPERTY(meta = (BindWidget)) + TObjectPtr BackgroundImage; + UPROPERTY(meta = (BindWidget)) TObjectPtr IconButton; - UPROPERTY(meta = (BindWidgetOptional)) + UPROPERTY(meta = (BindWidget)) TObjectPtr IconImage; - UPROPERTY(meta = (BindWidgetOptional)) + UPROPERTY(meta = (BindWidget)) TObjectPtr NameText; UPROPERTY() diff --git a/Source/NakedDesire/UI/Phone/PhoneHomeScreenWidget.cpp b/Source/NakedDesire/UI/Phone/PhoneHomeScreenWidget.cpp index 11b97cdb..8e7acd28 100644 --- a/Source/NakedDesire/UI/Phone/PhoneHomeScreenWidget.cpp +++ b/Source/NakedDesire/UI/Phone/PhoneHomeScreenWidget.cpp @@ -24,7 +24,7 @@ void UPhoneHomeScreenWidget::NativeConstruct() } UPhoneAppIconWidget* Icon = CreateWidget(this, AppIconWidgetClass); - Icon->Init(Entry.AppName, Entry.AppIcon, Entry.AppClass); + Icon->Init(Entry.AppName, Entry.AppIcon, Entry.BackgroundMaterial, Entry.AppClass); Icon->OnClicked.BindUObject(this, &UPhoneHomeScreenWidget::HandleAppIconClicked); AppContainer->AddChild(Icon); } diff --git a/Source/NakedDesire/UI/Phone/PhoneHomeScreenWidget.h b/Source/NakedDesire/UI/Phone/PhoneHomeScreenWidget.h index cf40de43..0786d9de 100644 --- a/Source/NakedDesire/UI/Phone/PhoneHomeScreenWidget.h +++ b/Source/NakedDesire/UI/Phone/PhoneHomeScreenWidget.h @@ -25,6 +25,9 @@ struct FPhoneAppEntry UPROPERTY(EditDefaultsOnly, Category = "Phone App") TSubclassOf AppClass; + + UPROPERTY(EditDefaultsOnly, Category = "Phone App") + TObjectPtr BackgroundMaterial; }; // The phone home screen — the base of the app stack. Builds a grid of app icons from AppEntries and