Adding Status and Last server response handled but not tested
This commit is contained in:
44
Source/DTFluxAPIStatus/Public/widgets/DTFluxStatusWidget.h
Normal file
44
Source/DTFluxAPIStatus/Public/widgets/DTFluxStatusWidget.h
Normal file
@ -0,0 +1,44 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Widgets/SCompoundWidget.h"
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class UDTFluxNetworkSubsystem;
|
||||
class SSuperListView;
|
||||
|
||||
class DTFLUXAPISTATUS_API SDTFluxStatusWidget : public SCompoundWidget
|
||||
{
|
||||
public:
|
||||
SLATE_BEGIN_ARGS(SDTFluxStatusWidget)
|
||||
{
|
||||
}
|
||||
|
||||
SLATE_END_ARGS()
|
||||
|
||||
void OnOpenSettingsClicked();
|
||||
FReply OnRaceDatasClicked();
|
||||
FReply OnTeamListClicked();
|
||||
/** Constructs this widget with InArgs */
|
||||
void Construct(const FArguments& InArgs);
|
||||
TAttribute<FText> ConnectionActionButtonText;
|
||||
FReply OnConnectionActionButtonClicked();
|
||||
|
||||
private:
|
||||
UDTFluxNetworkSubsystem* DTFlux = nullptr;
|
||||
// // TODO make a struct
|
||||
FText GetWebSocketStatusText() const;
|
||||
FText GetWebConnectActionButtonText() const;
|
||||
FSlateColor GetWebSocketStatusColor() const;
|
||||
FSlateColor GetWebConnectActionButtonColor() const;
|
||||
TSharedPtr<STextBlock> WsStatusText;
|
||||
TSharedPtr<SButton> ConnectionActionButton;
|
||||
|
||||
|
||||
|
||||
};
|
||||
@ -0,0 +1,35 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Styling/ISlateStyle.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class DTFLUXAPISTATUS_API FDTFluxStatusStyle
|
||||
{
|
||||
|
||||
public:
|
||||
static void RegisterStyle();
|
||||
static void UnregisterStyle();
|
||||
|
||||
static void ReloadTextures();
|
||||
|
||||
static const ISlateStyle& Get()
|
||||
{
|
||||
return *StyleSet;
|
||||
}
|
||||
|
||||
static const FName& GetStyleSetName()
|
||||
{
|
||||
return StyleSet->GetStyleSetName();
|
||||
}
|
||||
|
||||
private:
|
||||
static TSharedPtr<ISlateStyle> Create();
|
||||
static TSharedPtr<ISlateStyle> StyleSet;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user