Space Plunder
Loading...
Searching...
No Matches
CommonWidgetBase.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Blueprint/UserWidget.h"
7#include "CommonWidgetBase.generated.h"
8
9
10//@TODO Make more Base Widgets, Create Parent to these with Base Fucntinos, Visibility Change Event, etc.
11
12DECLARE_LOG_CATEGORY_CLASS(LogCommonBaseWidget, Display, All);
13
14
18UCLASS()
19class COMMONUISTYLE_API UCommonWidgetBase : public UUserWidget
20{
21 GENERATED_BODY()
22
23public:
24
25 UFUNCTION(BlueprintCallable, Category="Widgets")
26 void PlaySlateSound(const FSlateSound& SlateSound) const;
27
28protected:
29 virtual void NativePreConstruct() override;
30 virtual void NativeConstruct() override;
31
32 virtual void Setup();
33
34
35 void LogDebugError(const FString& Message) const;
36 void LogDebugError(const FString& Message, const int32 Value) const;
37 void LogDebugError(const FString& Message, const float Value) const;
38 void LogDebugWarning(const FString& Message) const;
39 void LogDebugWarning(const FString& Message, const int32 Value) const;
40 void LogDebugWarning(const FString& Message, const float Value) const;
41
42 void LogDebugMessage(const FString& Message, const bool bWarning = false, const bool bError = false) const;
43 void LogDebugMessage(const FString& Message, const int32 Value, const bool bWarning = false, const bool bError = false) const;
44 void LogDebugMessage(const FString& Message, const float Value, const bool bWarning = false, const bool bError = false) const;
45 void LogDebugMessage(const FString& Message, const bool bValue, const bool bWarning, const bool bError) const;
46 void LogOnScreenMessage(const int32 Key, const FString& Message, FColor Color = FColor::Green) const;
47
48 void SetCategoryName(const FLogCategoryBase& Category){CategoryName = Category.GetCategoryName();};
49
50
51 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Common|Debugging")
52 bool bDebuggingMode = false;
53
54private:
55 FLogCategoryName CategoryName = LogCommonBaseWidget.GetCategoryName();
56
57
58
59};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
DECLARE_LOG_CATEGORY_CLASS(LogCommonBaseWidget, Display, All)
Definition CommonWidgetBase.h:20
void SetCategoryName(const FLogCategoryBase &Category)
Definition CommonWidgetBase.h:48