From 90ed878b6de9712180a8ccad2ec9f29bc3c8cc10 Mon Sep 17 00:00:00 2001 From: Oleg Petruny Date: Mon, 6 Jan 2025 18:48:53 +0100 Subject: [PATCH] shorten widgets names --- .../Lost_Edge/Private/Widgets/AutohideWidget.h | 4 ++-- .../Lost_Edge/Private/Widgets/CutsceneSkipWidget.h | 4 ++-- .../Lost_Edge/Private/Widgets/DialogueRowWidget.h | 4 ++-- .../Lost_Edge/Private/Widgets/DialogueSkipWidget.h | 4 ++-- .../Private/Widgets/InteractableHintWidget.h | 4 ++-- .../Lost_Edge/Private/Widgets/JournalWidget.h | 2 +- .../Private/Widgets/MainMenu/MainMenuWidget.h | 2 +- .../Private/Widgets/QuickTimeEventWidget.h | 4 ++-- .../Private/Widgets/QuickTimeEventWidgetManager.h | 4 ++-- ...erWidget.cpp => ResolutionResponsiveWidget.cpp} | 14 +++++++------- ...veUserWidget.h => ResolutionResponsiveWidget.h} | 4 ++-- ...idget.cpp => WorldDilationResponsiveWidget.cpp} | 14 +++++++------- ...serWidget.h => WorldDilationResponsiveWidget.h} | 4 ++-- 13 files changed, 34 insertions(+), 34 deletions(-) rename UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/{ResolutionResponsiveUserWidget.cpp => ResolutionResponsiveWidget.cpp} (56%) rename UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/{ResolutionResponsiveUserWidget.h => ResolutionResponsiveWidget.h} (87%) rename UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/{WorldDilationResponsiveUserWidget.cpp => WorldDilationResponsiveWidget.cpp} (80%) rename UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/{WorldDilationResponsiveUserWidget.h => WorldDilationResponsiveWidget.h} (80%) diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/AutohideWidget.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/AutohideWidget.h index 1cdc664..332a500 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/AutohideWidget.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/AutohideWidget.h @@ -2,7 +2,7 @@ #pragma once -#include "ResolutionResponsiveUserWidget.h" +#include "ResolutionResponsiveWidget.h" #include "AutohideWidget.generated.h" @@ -10,7 +10,7 @@ * Automatically hides itself after some period */ UCLASS() -class UAutohideWidget : public UResolutionResponsiveUserWidget +class UAutohideWidget : public UResolutionResponsiveWidget { GENERATED_BODY() diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/CutsceneSkipWidget.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/CutsceneSkipWidget.h index f903e74..5fe62cc 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/CutsceneSkipWidget.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/CutsceneSkipWidget.h @@ -3,14 +3,14 @@ #pragma once #include "InputAnimatedWidgetInterface.h" -#include "ResolutionResponsiveUserWidget.h" +#include "ResolutionResponsiveWidget.h" #include "CutsceneSkipWidget.generated.h" DECLARE_DYNAMIC_DELEGATE(FSkipCutsceneDelegate); UCLASS(Blueprintable, Abstract) -class UCutsceneSkipWidget : public UResolutionResponsiveUserWidget, public IInputAnimatedWidgetInterface +class UCutsceneSkipWidget : public UResolutionResponsiveWidget, public IInputAnimatedWidgetInterface { GENERATED_BODY() diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/DialogueRowWidget.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/DialogueRowWidget.h index 6241e72..7ac8ed8 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/DialogueRowWidget.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/DialogueRowWidget.h @@ -2,14 +2,14 @@ #pragma once -#include "ResolutionResponsiveUserWidget.h" +#include "ResolutionResponsiveWidget.h" #include "DialogueRowWidget.generated.h" enum class EDialogueWaveType : uint8; UCLASS(Blueprintable, Abstract) -class UDialogueRowWidget : public UResolutionResponsiveUserWidget +class UDialogueRowWidget : public UResolutionResponsiveWidget { GENERATED_BODY() diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/DialogueSkipWidget.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/DialogueSkipWidget.h index 92e2deb..05bb62d 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/DialogueSkipWidget.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/DialogueSkipWidget.h @@ -3,14 +3,14 @@ #pragma once #include "InputAnimatedWidgetInterface.h" -#include "ResolutionResponsiveUserWidget.h" +#include "ResolutionResponsiveWidget.h" #include "DialogueSkipWidget.generated.h" DECLARE_DYNAMIC_DELEGATE(FDialogueSkipDelegate); UCLASS(Blueprintable, Abstract) -class UDialogueSkipWidget : public UResolutionResponsiveUserWidget, public IInputAnimatedWidgetInterface +class UDialogueSkipWidget : public UResolutionResponsiveWidget, public IInputAnimatedWidgetInterface { GENERATED_BODY() diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/InteractableHintWidget.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/InteractableHintWidget.h index 1002430..7d9bbdf 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/InteractableHintWidget.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/InteractableHintWidget.h @@ -3,12 +3,12 @@ #pragma once #include "InputAnimatedWidgetInterface.h" -#include "ResolutionResponsiveUserWidget.h" +#include "ResolutionResponsiveWidget.h" #include "InteractableHintWidget.generated.h" UCLASS(Blueprintable, Abstract) -class UInteractableHintWidget : public UResolutionResponsiveUserWidget, public IInputAnimatedWidgetInterface +class UInteractableHintWidget : public UResolutionResponsiveWidget, public IInputAnimatedWidgetInterface { GENERATED_BODY() diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/JournalWidget.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/JournalWidget.h index 089036d..a49652b 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/JournalWidget.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/JournalWidget.h @@ -3,7 +3,7 @@ #pragma once #include "AutohideWidget.h" -#include "ResolutionResponsiveUserWidget.h" +#include "ResolutionResponsiveWidget.h" #include "JournalWidget.generated.h" diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/MainMenu/MainMenuWidget.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/MainMenu/MainMenuWidget.h index a3678c5..a5bccff 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/MainMenu/MainMenuWidget.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/MainMenu/MainMenuWidget.h @@ -2,7 +2,7 @@ #pragma once -#include "Widgets/ResolutionResponsiveUserWidget.h" +#include "Widgets/ResolutionResponsiveWidget.h" #include "MainMenuWidget.generated.h" diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/QuickTimeEventWidget.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/QuickTimeEventWidget.h index 680fa15..4b6a291 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/QuickTimeEventWidget.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/QuickTimeEventWidget.h @@ -3,14 +3,14 @@ #pragma once #include "QuickTimeEvent.h" // forward declaration of EQuickTimeEventResult is somehow insufficient on some machines -#include "Widgets/ResolutionResponsiveUserWidget.h" +#include "Widgets/ResolutionResponsiveWidget.h" #include "QuickTimeEventWidget.generated.h" enum class EQuickTimeEventResult : uint8; UCLASS(Blueprintable, Abstract) -class UQuickTimeEventWidget : public UResolutionResponsiveUserWidget +class UQuickTimeEventWidget : public UResolutionResponsiveWidget { GENERATED_BODY() diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/QuickTimeEventWidgetManager.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/QuickTimeEventWidgetManager.h index ded4f4a..f13c8ae 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/QuickTimeEventWidgetManager.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/QuickTimeEventWidgetManager.h @@ -2,7 +2,7 @@ #pragma once -#include "Widgets/WorldDilationResponsiveUserWidget.h" +#include "Widgets/WorldDilationResponsiveWidget.h" #include "QuickTimeEventWidgetManager.generated.h" @@ -12,7 +12,7 @@ enum class EQuickTimeEventResult : uint8; class UQuickTimeEventWidget; UCLASS(Blueprintable, Abstract) -class UQuickTimeEventWidgetManager : public UWorldDilationResponsiveUserWidget +class UQuickTimeEventWidgetManager : public UWorldDilationResponsiveWidget { GENERATED_BODY() diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveUserWidget.cpp b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveWidget.cpp similarity index 56% rename from UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveUserWidget.cpp rename to UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveWidget.cpp index fbfedde..2c4298a 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveUserWidget.cpp +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveWidget.cpp @@ -1,18 +1,18 @@ // Oleg Petruny proprietary. -#include "ResolutionResponsiveUserWidget.h" +#include "ResolutionResponsiveWidget.h" #include "Components/PanelSlot.h" #include "UnrealClient.h" -bool UResolutionResponsiveUserWidget::Initialize() +bool UResolutionResponsiveWidget::Initialize() { - _viewportResizedEventHandle = FViewport::ViewportResizedEvent.AddUObject(this, &UResolutionResponsiveUserWidget::Rescale); + _viewportResizedEventHandle = FViewport::ViewportResizedEvent.AddUObject(this, &UResolutionResponsiveWidget::Rescale); return UUserWidget::Initialize(); } -void UResolutionResponsiveUserWidget::BeginDestroy() +void UResolutionResponsiveWidget::BeginDestroy() { if(_viewportResizedEventHandle.IsValid()) { @@ -22,18 +22,18 @@ void UResolutionResponsiveUserWidget::BeginDestroy() UUserWidget::BeginDestroy(); } -void UResolutionResponsiveUserWidget::Rescale(FViewport* ViewPort, uint32 val) +void UResolutionResponsiveWidget::Rescale(FViewport* ViewPort, uint32 val) { _scale = (float)defaultResolution / ViewPort->GetSizeXY().GetMin(); Rescale(); } -void UResolutionResponsiveUserWidget::Rescale_Implementation() +void UResolutionResponsiveWidget::Rescale_Implementation() { SetRenderScale(FVector2D{ _scale }); } -float UResolutionResponsiveUserWidget::GetScale() const +float UResolutionResponsiveWidget::GetScale() const { return _scale; } \ No newline at end of file diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveUserWidget.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveWidget.h similarity index 87% rename from UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveUserWidget.h rename to UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveWidget.h index 159a5d4..5e6300d 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveUserWidget.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/ResolutionResponsiveWidget.h @@ -4,13 +4,13 @@ #include "Blueprint/UserWidget.h" -#include "ResolutionResponsiveUserWidget.generated.h" +#include "ResolutionResponsiveWidget.generated.h" /** * Automatically scale itself for current resolution to keep UI sizes universal. */ UCLASS() -class UResolutionResponsiveUserWidget : public UUserWidget +class UResolutionResponsiveWidget : public UUserWidget { GENERATED_BODY() diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveUserWidget.cpp b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveWidget.cpp similarity index 80% rename from UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveUserWidget.cpp rename to UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveWidget.cpp index e427bd5..e6b64f0 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveUserWidget.cpp +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveWidget.cpp @@ -1,6 +1,6 @@ // Oleg Petruny proprietary. -#include "WorldDilationResponsiveUserWidget.h" +#include "WorldDilationResponsiveWidget.h" #include "Animation/UMGSequencePlayer.h" #include "Animation/WidgetAnimation.h" @@ -8,21 +8,21 @@ #include "CommonFunctions.h" -bool UWorldDilationResponsiveUserWidget::Initialize() +bool UWorldDilationResponsiveWidget::Initialize() { - UCommonFunctions::GetWorldDilationChangedDelegate().AddDynamic(this, &UWorldDilationResponsiveUserWidget::UpdateAnimations); + UCommonFunctions::GetWorldDilationChangedDelegate().AddDynamic(this, &UWorldDilationResponsiveWidget::UpdateAnimations); return UUserWidget::Initialize(); } -void UWorldDilationResponsiveUserWidget::BeginDestroy() +void UWorldDilationResponsiveWidget::BeginDestroy() { - UCommonFunctions::GetWorldDilationChangedDelegate().RemoveDynamic(this, &UWorldDilationResponsiveUserWidget::UpdateAnimations); + UCommonFunctions::GetWorldDilationChangedDelegate().RemoveDynamic(this, &UWorldDilationResponsiveWidget::UpdateAnimations); UUserWidget::BeginDestroy(); } -void UWorldDilationResponsiveUserWidget::UpdateAnimations(float newSpeed) +void UWorldDilationResponsiveWidget::UpdateAnimations(float newSpeed) { UpdateAnimation(GetRootWidget(), newSpeed); @@ -70,7 +70,7 @@ void UWorldDilationResponsiveUserWidget::UpdateAnimations(float newSpeed) } } -void UWorldDilationResponsiveUserWidget::UpdateAnimation(UWidget* widget, float newSpeed) +void UWorldDilationResponsiveWidget::UpdateAnimation(UWidget* widget, float newSpeed) { if(auto userWidget = Cast(widget)) { diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveUserWidget.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveWidget.h similarity index 80% rename from UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveUserWidget.h rename to UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveWidget.h index c6535bc..e221496 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveUserWidget.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WorldDilationResponsiveWidget.h @@ -4,13 +4,13 @@ #include "Blueprint/UserWidget.h" -#include "WorldDilationResponsiveUserWidget.generated.h" +#include "WorldDilationResponsiveWidget.generated.h" /** * Automatically update animations speed to sync with world time dilation */ UCLASS() -class UWorldDilationResponsiveUserWidget : public UUserWidget +class UWorldDilationResponsiveWidget : public UUserWidget { GENERATED_BODY()