29. Globe progress bar
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Project/Content/UI/Globes/MI_HealthGlobe.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Project/Content/UI/Globes/MI_HealthGlobe.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Project/Content/UI/Globes/MI_ManaGlobe.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Project/Content/UI/Globes/MI_ManaGlobe.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Project/Content/UI/Globes/M_FlowingGlobe.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Project/Content/UI/Globes/M_FlowingGlobe.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Project/Content/UI/UI_GlobeProgressBar.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Project/Content/UI/UI_GlobeProgressBar.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -143,8 +143,7 @@ public: | |||||||
|  |  | ||||||
| #pragma region UObject | #pragma region UObject | ||||||
|  |  | ||||||
| 	void GetLifetimeReplicatedProps( TArray< FLifetimeProperty >& OutLifetimeProps ) const override = 0; | 	void GetLifetimeReplicatedProps( TArray< FLifetimeProperty >& OutLifetimeProps ) const override; | ||||||
| 	; |  | ||||||
| #pragma endregion UObject | #pragma endregion UObject | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -32,7 +32,7 @@ public: | |||||||
| 	FORCEINLINE UAbilitySystemComponent* GetAbilitySystemComponent() const override { return AbilitySystem; } | 	FORCEINLINE UAbilitySystemComponent* GetAbilitySystemComponent() const override { return AbilitySystem; } | ||||||
| #pragma endregion IAbilitySystem | #pragma endregion IAbilitySystem | ||||||
|  |  | ||||||
| #pragma region | // #pragma region | ||||||
| 	 | // 	 | ||||||
| #pragma endregion  | // #pragma endregion  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -32,6 +32,7 @@ public class Gasa : ModuleRules | |||||||
|             "InputCore",  |             "InputCore",  | ||||||
|             "NetCore", |             "NetCore", | ||||||
|             "Niagara", |             "Niagara", | ||||||
|  |             "SlateCore", | ||||||
|             "UMG", |             "UMG", | ||||||
|         }); |         }); | ||||||
|     #endregion Engine |     #endregion Engine | ||||||
|   | |||||||
| @@ -44,6 +44,10 @@ class AGasaPlayerController; | |||||||
| class UGasaAbilitySystemComp; | class UGasaAbilitySystemComp; | ||||||
| class UGasaAttributeSet; | class UGasaAttributeSet; | ||||||
| class UGasaDevOptions; | class UGasaDevOptions; | ||||||
|  | class UGasaImage; | ||||||
|  | class UGasaOverlay; | ||||||
|  | class UGasaProgressBar; | ||||||
|  | class UGasaSizeBox; | ||||||
| #pragma endregion Forwards | #pragma endregion Forwards | ||||||
|  |  | ||||||
| #pragma region Logging | #pragma region Logging | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								Project/Source/Gasa/UI/GasaImage.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Project/Source/Gasa/UI/GasaImage.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | #pragma once | ||||||
|  |  | ||||||
|  | #include "Components/Image.h" | ||||||
|  |  | ||||||
|  | #include "GasaImage.generated.h" | ||||||
|  |  | ||||||
|  | UCLASS() | ||||||
|  | class UGasaImage : public UImage | ||||||
|  | { | ||||||
|  | 	GENERATED_BODY() | ||||||
|  | public: | ||||||
|  | }; | ||||||
							
								
								
									
										12
									
								
								Project/Source/Gasa/UI/GasaOverlay.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Project/Source/Gasa/UI/GasaOverlay.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | #pragma once | ||||||
|  | #include "Components/Overlay.h" | ||||||
|  |  | ||||||
|  | #include "GasaOverlay.generated.h" | ||||||
|  |  | ||||||
|  | UCLASS() | ||||||
|  | class GASA_API UGasaOverlay : public UOverlay | ||||||
|  | { | ||||||
|  | 	GENERATED_BODY() | ||||||
|  | public: | ||||||
|  | 	 | ||||||
|  | }; | ||||||
							
								
								
									
										13
									
								
								Project/Source/Gasa/UI/GasaProgressBar.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								Project/Source/Gasa/UI/GasaProgressBar.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | |||||||
|  | #pragma once | ||||||
|  |  | ||||||
|  | #include "Components/ProgressBar.h" | ||||||
|  |  | ||||||
|  | #include "GasaProgressBar.generated.h" | ||||||
|  |  | ||||||
|  | UCLASS() | ||||||
|  | class GASA_API UGasaProgressBar : public UProgressBar | ||||||
|  | { | ||||||
|  | 	GENERATED_BODY() | ||||||
|  | public: | ||||||
|  |  | ||||||
|  | }; | ||||||
							
								
								
									
										0
									
								
								Project/Source/Gasa/UI/GasaSizeBox.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								Project/Source/Gasa/UI/GasaSizeBox.cpp
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										16
									
								
								Project/Source/Gasa/UI/GasaSizeBox.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								Project/Source/Gasa/UI/GasaSizeBox.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  | #pragma once | ||||||
|  | #include "Components/SizeBox.h" | ||||||
|  |  | ||||||
|  | #include "GasaCommon.h" | ||||||
|  |  | ||||||
|  | #include "GasaSizeBox.generated.h" | ||||||
|  |  | ||||||
|  |  | ||||||
|  | UCLASS() | ||||||
|  | class GASA_API UGasaSizeBox : public USizeBox | ||||||
|  | { | ||||||
|  | 	GENERATED_BODY() | ||||||
|  | 	 | ||||||
|  | public: | ||||||
|  | 	 | ||||||
|  | }; | ||||||
							
								
								
									
										61
									
								
								Project/Source/Gasa/UI/GlobeProgressBar.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								Project/Source/Gasa/UI/GlobeProgressBar.cpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | |||||||
|  | #include "GlobeProgressBar.h" | ||||||
|  |  | ||||||
|  | #include "GasaImage.h" | ||||||
|  | #include "GasaProgressBar.h" | ||||||
|  | #include "GasaSizeBox.h" | ||||||
|  | #include "Components/OverlaySlot.h" | ||||||
|  |  | ||||||
|  | // UGlobeProgressBar::UGlobeProgressBar(FObjectInitializer const& ObjectInitializer) | ||||||
|  | // { | ||||||
|  | // } | ||||||
|  |  | ||||||
|  | void UGlobeProgressBar::SetBackgroundStyle(FSlateBrush brush) | ||||||
|  | { | ||||||
|  | 	BG->SetBrush( brush ); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void UGlobeProgressBar::SetBarPadding(FMargin margin ) | ||||||
|  | { | ||||||
|  | 	UOverlaySlot* BarSlot = CastChecked<UOverlaySlot>(Bar->Slot); | ||||||
|  | 	BarSlot->SetPadding( margin ); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void UGlobeProgressBar::SetBarStyle(FProgressBarStyle style) | ||||||
|  | { | ||||||
|  | 	Bar->SetWidgetStyle( style ); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void UGlobeProgressBar::SetGlassPadding(FMargin margin) | ||||||
|  | { | ||||||
|  | 	UOverlaySlot* GlassSlot = CastChecked<UOverlaySlot>(Glass->Slot); | ||||||
|  | 	GlassSlot->SetPadding(margin); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void UGlobeProgressBar::SetGlassStyle(FSlateBrush brush) | ||||||
|  | { | ||||||
|  | 	Glass->SetBrush(brush); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void UGlobeProgressBar::SetSize(float width, float height) | ||||||
|  | { | ||||||
|  | 	SizeBox_Root->SetWidthOverride(  width ); | ||||||
|  | 	SizeBox_Root->SetHeightOverride( height ); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | #if 0 | ||||||
|  | void UGlobeProgressBar::UpdateSize() | ||||||
|  | { | ||||||
|  | 	 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void UGlobeProgressBar::UpdateBackground() | ||||||
|  | { | ||||||
|  | } | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | #pragma region UserWidget | ||||||
|  | void UGlobeProgressBar::NativePreConstruct() | ||||||
|  | { | ||||||
|  | 	Super::NativePreConstruct(); | ||||||
|  | } | ||||||
|  | #pragma endregion UserWidget | ||||||
							
								
								
									
										60
									
								
								Project/Source/Gasa/UI/GlobeProgressBar.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								Project/Source/Gasa/UI/GlobeProgressBar.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | |||||||
|  | #pragma once | ||||||
|  |  | ||||||
|  | #include "GasaCommon.h" | ||||||
|  | #include "GasaUserWidget.h" | ||||||
|  |  | ||||||
|  | #include "GlobeProgressBar.generated.h" | ||||||
|  |  | ||||||
|  | UCLASS() | ||||||
|  | class GASA_API UGlobeProgressBar : public UGasaUserWidget | ||||||
|  | { | ||||||
|  | 	GENERATED_BODY() | ||||||
|  | 	 | ||||||
|  | public: | ||||||
|  | 	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidget), Category="Globe") | ||||||
|  | 	UGasaSizeBox* SizeBox_Root; | ||||||
|  |  | ||||||
|  | 	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidget), Category="Globe") | ||||||
|  | 	UGasaOverlay* Overlay_Root; | ||||||
|  | 	 | ||||||
|  | 	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidget), Category="Globe") | ||||||
|  | 	UGasaImage* Glass; | ||||||
|  | 	 | ||||||
|  | 	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidget), Category="Globe") | ||||||
|  | 	UGasaImage* BG; | ||||||
|  | 	 | ||||||
|  | 	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidget), Category="Globe") | ||||||
|  | 	UGasaProgressBar* Bar; | ||||||
|  | 	 | ||||||
|  | 	// UGlobeProgressBar(FObjectInitializer const& ObjectInitializer); | ||||||
|  |  | ||||||
|  | 	UFUNCTION(BlueprintCallable, Category="Globe") | ||||||
|  | 	void SetBackgroundStyle(FSlateBrush brush); | ||||||
|  |  | ||||||
|  | 	UFUNCTION(BlueprintCallable, Category="Globe") | ||||||
|  | 	void SetBarPadding( FMargin margin ); | ||||||
|  | 	 | ||||||
|  | 	UFUNCTION(BlueprintCallable, Category="Globe") | ||||||
|  | 	void SetBarStyle(FProgressBarStyle style); | ||||||
|  |  | ||||||
|  | 	UFUNCTION(BlueprintCallable, Category="Globe") | ||||||
|  | 	void SetGlassPadding( FMargin margin ); | ||||||
|  | 	 | ||||||
|  | 	UFUNCTION(BlueprintCallable, Category="Globe") | ||||||
|  | 	void SetGlassStyle(FSlateBrush brush); | ||||||
|  | 	 | ||||||
|  | 	UFUNCTION(BlueprintCallable, Category="Globe") | ||||||
|  | 	void SetSize(float width, float height); | ||||||
|  |  | ||||||
|  | #if 0 | ||||||
|  | 	UFUNCTION(BlueprintCallable, Category="Globe") | ||||||
|  | 	void UpdateSize(); | ||||||
|  | 	 | ||||||
|  | 	UFUNCTION(BlueprintCallable, Category="Globe") | ||||||
|  | 	void UpdateBackground(); | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | #pragma region UserWidget | ||||||
|  | 	void NativePreConstruct() override; | ||||||
|  | #pragma endregion UserWidget | ||||||
|  | }; | ||||||
| @@ -1,9 +0,0 @@ | |||||||
| #pragma once |  | ||||||
| #include "Components/ProgressBar.h" |  | ||||||
|  |  | ||||||
|  |  | ||||||
| UCLASS() |  | ||||||
| class GASA_API UProgressIndicator : public UProgressBar |  | ||||||
| { |  | ||||||
| 	 |  | ||||||
| }; |  | ||||||
| @@ -11,8 +11,8 @@ public class GasaEditorTarget : TargetRules | |||||||
|          |          | ||||||
|         DefaultBuildSettings = BuildSettingsVersion.Latest; |         DefaultBuildSettings = BuildSettingsVersion.Latest; | ||||||
|          |          | ||||||
|         bUseUnityBuild = false; |         // bUseUnityBuild = false; | ||||||
|         bUseXGEController = false; |         // bUseXGEController = false; | ||||||
|          |          | ||||||
| 		ExtraModuleNames.Add("Gasa"); | 		ExtraModuleNames.Add("Gasa"); | ||||||
| 		ExtraModuleNames.Add("GasaEditor"); | 		ExtraModuleNames.Add("GasaEditor"); | ||||||
|   | |||||||
| @@ -63,10 +63,13 @@ void gen_UGasaAttributeSet() | |||||||
| 					body.append( fmt_newline ); | 					body.append( fmt_newline ); | ||||||
|  |  | ||||||
| 					body.append( def_pragma( txt("region UObject"))); | 					body.append( def_pragma( txt("region UObject"))); | ||||||
| 					body.append( parse_function( code( | 					CodeFn GetLifetimeOfReplicatedProps = parse_function( code( | ||||||
| 						void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override; | 						void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override; | ||||||
| 					))); | 					)); | ||||||
|  | 					body.append( GetLifetimeOfReplicatedProps ); | ||||||
| 					body.append( def_pragma( txt("endregion UObject"))); | 					body.append( def_pragma( txt("endregion UObject"))); | ||||||
|  |  | ||||||
|  | 					String test = GetLifetimeOfReplicatedProps.to_string(); | ||||||
| 				} | 				} | ||||||
| 				GasaAttributeSet = def_class( class_name, body | 				GasaAttributeSet = def_class( class_name, body | ||||||
| 					, type_UAttributeSet, AccessSpec::Public | 					, type_UAttributeSet, AccessSpec::Public | ||||||
|   | |||||||
| @@ -2033,7 +2033,7 @@ void CodeFn::to_string_fwd( String& result ) | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	if ( ast->Specs.has( ESpecifier::Pure ) ) | 	if ( ast->Specs.has( ESpecifier::Pure ) >= 0 ) | ||||||
| 		result.append( " = 0;" ); | 		result.append( " = 0;" ); | ||||||
| 	else if (ast->Body) | 	else if (ast->Body) | ||||||
| 		result.append_fmt( " = %S;", ast->Body.to_string() ); | 		result.append_fmt( " = %S;", ast->Body.to_string() ); | ||||||
|   | |||||||
| @@ -1161,7 +1161,7 @@ struct CodeSpecifiers | |||||||
| 	{ | 	{ | ||||||
| 		for ( s32 idx = 0; idx < raw()->NumEntries; idx++ ) | 		for ( s32 idx = 0; idx < raw()->NumEntries; idx++ ) | ||||||
| 		{ | 		{ | ||||||
| 			if ( raw()->ArrSpecs[ raw()->NumEntries ] == spec ) | 			if ( raw()->ArrSpecs[ idx ] == spec ) | ||||||
| 				return idx; | 				return idx; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user