You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
994 B
42 lines
994 B
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Widgets/SCompoundWidget.h"
|
|
#include "Widgets/Layout/SWidgetSwitcher.h"
|
|
#include "SLogWidget.h"
|
|
#include "SLogWidgetState.h"
|
|
|
|
/**
|
|
* SLogWidgetSwitcher
|
|
* switches between Vertical and Horizontal SLogWidgets
|
|
*/
|
|
class BLOGGER_API SLogWidgetSwitcher : public SCompoundWidget
|
|
{
|
|
public:
|
|
SLATE_BEGIN_ARGS(SLogWidgetSwitcher)
|
|
{}
|
|
SLATE_ARGUMENT(bool, IsVertical)
|
|
SLATE_ARGUMENT(FBLoggerStyleSet*, StyleSet)
|
|
SLATE_END_ARGS()
|
|
|
|
int32 CurrentWidgetIndex;
|
|
|
|
void Construct(const FArguments& InArgs);
|
|
int32 GetCurrentWidgetIndex() const;
|
|
|
|
/**
|
|
* Chooses which widget to display depending on verticality
|
|
* @param IsVertical
|
|
*/
|
|
void ChooseWidgetIndex(bool IsVertical);
|
|
|
|
virtual ~SLogWidgetSwitcher() override;
|
|
|
|
protected:
|
|
void InitializeLogWidgetData();
|
|
TSharedPtr<SWidgetSwitcher> WidgetSwitcher;
|
|
LogWidgetState LogWidgetData;
|
|
FBLoggerStyleSet* StyleSet;
|
|
};
|
|
|