You've already forked LuckyWorld
Optimize some WB_GameWidget codes and Gameinstance codes
This commit is contained in:
5
Source/Luckyrobots/Private/CaptureSettingsUserWidget.cpp
Normal file
5
Source/Luckyrobots/Private/CaptureSettingsUserWidget.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "CaptureSettingsUserWidget.h"
|
||||
|
@ -14,14 +14,14 @@ void ULuckyRobotsGameInstance::DoSendMessage(FString SendValue)
|
||||
LuckyRobotsGameState->DoSendMessage(SendValue);
|
||||
}
|
||||
|
||||
DoLogItemAdd("Receive", SendValue, 0, ELogItemType::Debug);
|
||||
DoLogItemAdd("Receive", SendValue, ELogItemType::Debug);
|
||||
}
|
||||
|
||||
void ULuckyRobotsGameInstance::DoLogItemAdd(FString Topic, FString MsgText, int Type, ELogItemType LogItemType)
|
||||
void ULuckyRobotsGameInstance::DoLogItemAdd(FString Topic, FString MsgText, ELogItemType LogItemType)
|
||||
{
|
||||
if (GameUserWidget)
|
||||
{
|
||||
GameUserWidget->DoLogItemAdd(Topic, MsgText, Type, LogItemType);
|
||||
GameUserWidget->DoLogItemAdd(Topic, MsgText, LogItemType);
|
||||
}
|
||||
}
|
||||
|
||||
|
17
Source/Luckyrobots/Public/CaptureSettingsUserWidget.h
Normal file
17
Source/Luckyrobots/Public/CaptureSettingsUserWidget.h
Normal file
@ -0,0 +1,17 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Blueprint/UserWidget.h"
|
||||
#include "CaptureSettingsUserWidget.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class LUCKYROBOTS_API UCaptureSettingsUserWidget : public UUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
};
|
@ -20,7 +20,7 @@ protected:
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void DoLogItemAdd(const FString& Topic, const FString& MsgText,int Type, ELogItemType LogItemType);
|
||||
void DoLogItemAdd(const FString& Topic, const FString& MsgText, ELogItemType LogItemType);
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void DoRefreshListView();
|
||||
|
@ -24,6 +24,41 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config")
|
||||
UDataTable* LevelDataTable;
|
||||
|
||||
//public:
|
||||
// bool bIsFirstOpenGame;
|
||||
//
|
||||
// bool bIsDebug;
|
||||
// bool bIsWidgetTestMode;
|
||||
// bool bIsShowPath;
|
||||
//
|
||||
//public:
|
||||
// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
||||
// bool bIsCapture;
|
||||
//
|
||||
// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
||||
// bool bIsCaptureHand;
|
||||
//
|
||||
// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
||||
// bool bIsCaptureHead;
|
||||
//
|
||||
// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
||||
// bool bScenarioCapture;
|
||||
//
|
||||
// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
||||
// bool bIsMouseOpen;
|
||||
//
|
||||
// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
||||
// bool bIschange;
|
||||
//
|
||||
// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
||||
// int PerSecond;
|
||||
//
|
||||
// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
||||
// FTransform TargetPosition;
|
||||
//
|
||||
// UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture")
|
||||
// FCaptureSettingsData CaptureSettingsData;
|
||||
//
|
||||
public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
ERobotsName CurrentSelectRobot = ERobotsName::None;
|
||||
@ -51,7 +86,7 @@ public:
|
||||
void DoSendMessage(FString SendValue);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void DoLogItemAdd(FString Topic, FString MsgText, int Type, ELogItemType LogItemType);
|
||||
void DoLogItemAdd(FString Topic, FString MsgText, ELogItemType LogItemType);
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void SwitchGamePaused();
|
||||
|
@ -269,7 +269,6 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FText WritesPerSec = FText::FromString("1");
|
||||
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
bool IsScenario;
|
||||
|
||||
|
Reference in New Issue
Block a user