Space Plunder
Loading...
Searching...
No Matches
UBaseActivatableWidget Class Reference

#include <BaseActivatableWidget.h>

Inheritance diagram for UBaseActivatableWidget:
UBaseQuestWidget UInventoryWidget UMenuSystemWidget UQuestLogWidget UAudioOptionsWidget UInGameMenuSystemWidget ULevelSelectionWidget UMainMenuSystemWidget UModalMenuSystemWidget UOptionsMenuSystemWidget USingleMenuSystemWidget USingleMenuWithTabsWidget

Protected Member Functions

void LogDebugError (const FString &Message) const
 
void LogDebugError (const FString &Message, const int32 Value) const
 
void LogDebugError (const FString &Message, const float Value) const
 
void LogDebugWarning (const FString &Message) const
 
void LogDebugWarning (const FString &Message, const int32 Value) const
 
void LogDebugWarning (const FString &Message, const float Value) const
 
void LogDebugMessage (const FString &Message, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const int32 Value, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const float Value, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const bool bValue, const bool bWarning, const bool bError) const
 
void LogOnScreenMessage (const int32 Key, const FString &Message, FColor Color=FColor::Green) const
 
void SetCategoryName (const FLogCategoryBase &Category)
 

Protected Attributes

bool bDebuggingMode = false
 

Private Attributes

FLogCategoryName CategoryName = LogBaseWidget.GetCategoryName()
 

Member Function Documentation

◆ LogDebugError() [1/3]

void UBaseActivatableWidget::LogDebugError ( const FString & Message) const
protected
7{
8 LogDebugMessage(Message, true, true);
9}
void LogDebugMessage(const FString &Message, const bool bWarning=false, const bool bError=false) const
Definition BaseActivatableWidget.cpp:36

◆ LogDebugError() [2/3]

void UBaseActivatableWidget::LogDebugError ( const FString & Message,
const float Value ) const
protected
17{
18 LogDebugMessage(Message, Value, true, true);
19}

◆ LogDebugError() [3/3]

void UBaseActivatableWidget::LogDebugError ( const FString & Message,
const int32 Value ) const
protected
12{
13 LogDebugMessage(Message, Value, true, true);
14}

◆ LogDebugMessage() [1/4]

void UBaseActivatableWidget::LogDebugMessage ( const FString & Message,
const bool bValue,
const bool bWarning,
const bool bError ) const
protected
89{
90 LogDebugMessage(FString::Printf(TEXT("%s: %s"), *Message, bValue ? *FString("true") : *FString("false")), bWarning, bError);
91}

◆ LogDebugMessage() [2/4]

void UBaseActivatableWidget::LogDebugMessage ( const FString & Message,
const bool bWarning = false,
const bool bError = false ) const
protected
37{
38 if(bDebuggingMode == false && bError == false){return;}
39 FOutputDevice* OutputDevice = GWarn;
40 if(OutputDevice == nullptr){return;}
41 FString NetModeString;
42 switch(GetWorld()->GetNetMode())
43 {
44 case NM_Standalone:
45 NetModeString = FString("SDL");
46 break;
47 case NM_DedicatedServer:
48 NetModeString = FString("DServer");
49 break;
50 case NM_ListenServer:
51 NetModeString = FString("LServer");
52 break;
53 case NM_Client:
54 NetModeString = FString("Client");
55 break;
56 default:
57 NetModeString = FString("Unknown");
58 break;
59 }
60 const FString FullMessage = FString::Printf(TEXT("%s: %s::%s"), *NetModeString, *GetName(), *Message);
61 if(bError)
62 {
63 OutputDevice->Log(CategoryName, ELogVerbosity::Error, FullMessage);
64 }
65 else if(bWarning)
66 {
67 OutputDevice->Log(CategoryName, ELogVerbosity::Warning, FullMessage);
68 }
69 else
70 {
71 OutputDevice->Log(CategoryName, ELogVerbosity::Log, FullMessage);
72 }
73}
bool bDebuggingMode
Definition BaseActivatableWidget.h:39
FLogCategoryName CategoryName
Definition BaseActivatableWidget.h:42

◆ LogDebugMessage() [3/4]

void UBaseActivatableWidget::LogDebugMessage ( const FString & Message,
const float Value,
const bool bWarning = false,
const bool bError = false ) const
protected
83{
84 LogDebugMessage(FString::Printf(TEXT("%s: %f"), *Message, Value), bWarning, bError);
85}

◆ LogDebugMessage() [4/4]

void UBaseActivatableWidget::LogDebugMessage ( const FString & Message,
const int32 Value,
const bool bWarning = false,
const bool bError = false ) const
protected
77{
78 LogDebugMessage(FString::Printf(TEXT("%s: %i"), *Message, Value), bWarning, bError);
79}

◆ LogDebugWarning() [1/3]

void UBaseActivatableWidget::LogDebugWarning ( const FString & Message) const
protected
22{
23 LogDebugMessage(Message, true);
24}

◆ LogDebugWarning() [2/3]

void UBaseActivatableWidget::LogDebugWarning ( const FString & Message,
const float Value ) const
protected
32{
33 LogDebugMessage(Message, Value, true);
34}

◆ LogDebugWarning() [3/3]

void UBaseActivatableWidget::LogDebugWarning ( const FString & Message,
const int32 Value ) const
protected
27{
28 LogDebugMessage(Message, Value, true);
29}

◆ LogOnScreenMessage()

void UBaseActivatableWidget::LogOnScreenMessage ( const int32 Key,
const FString & Message,
FColor Color = FColor::Green ) const
protected
94{
95 if(GetOwningPlayer() == nullptr){return;}
97 {
98 GEngine->AddOnScreenDebugMessage(Key, 2.0f, Color,
99 FString::Printf(TEXT(" %s - in %s of %s"), ToCStr(Message), ToCStr(GetName()), ToCStr(GetOwningPlayer()->GetName())));
100 }
101}

◆ SetCategoryName()

void UBaseActivatableWidget::SetCategoryName ( const FLogCategoryBase & Category)
inlineprotected
35{CategoryName = Category.GetCategoryName();};

Member Data Documentation

◆ bDebuggingMode

bool UBaseActivatableWidget::bDebuggingMode = false
protected

◆ CategoryName

FLogCategoryName UBaseActivatableWidget::CategoryName = LogBaseWidget.GetCategoryName()
private

The documentation for this class was generated from the following files: