You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902 #ROBOMERGE-BOT: (v613-10869866) [CL 10870584 by ryan durand in Main branch]
72 lines
1.5 KiB
C++
72 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Layout/Visibility.h"
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
#include "Widgets/SCompoundWidget.h"
|
|
#include "Widgets/SBoxPanel.h"
|
|
#include "Widgets/Text/STextBlock.h"
|
|
#include "Widgets/Images/SImage.h"
|
|
#include "EditorStyleSet.h"
|
|
|
|
/**
|
|
* Implements a widget for form input field labels with optional validation errors.
|
|
*/
|
|
class SProjectLauncherFormLabel
|
|
: public SCompoundWidget
|
|
{
|
|
public:
|
|
|
|
SLATE_BEGIN_ARGS(SProjectLauncherFormLabel)
|
|
: _ErrorToolTipText()
|
|
, _ErrorVisibility(EVisibility::Hidden)
|
|
, _LabelText()
|
|
{ }
|
|
|
|
/** The tool tip text for the validation error icon. */
|
|
SLATE_ATTRIBUTE(FText, ErrorToolTipText)
|
|
|
|
/** The visibility of the validation error icon. */
|
|
SLATE_ATTRIBUTE(EVisibility, ErrorVisibility)
|
|
|
|
/** The text of the form label. */
|
|
SLATE_ATTRIBUTE(FText, LabelText)
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
public:
|
|
|
|
/**
|
|
* Constructs the widget.
|
|
*
|
|
* @param InArgs The Slate argument list.
|
|
*/
|
|
void Construct( const FArguments& InArgs )
|
|
{
|
|
ChildSlot
|
|
[
|
|
SNew(SHorizontalBox)
|
|
|
|
+ SHorizontalBox::Slot()
|
|
.FillWidth(1.0f)
|
|
.VAlign(VAlign_Center)
|
|
[
|
|
SNew(STextBlock)
|
|
.Text(InArgs._LabelText)
|
|
]
|
|
|
|
+ SHorizontalBox::Slot()
|
|
.AutoWidth()
|
|
.VAlign(VAlign_Center)
|
|
[
|
|
SNew(SImage)
|
|
.Image(FEditorStyle::GetBrush(TEXT("Icons.Error")))
|
|
.ToolTipText(InArgs._ErrorToolTipText)
|
|
.Visibility(InArgs._ErrorVisibility)
|
|
]
|
|
];
|
|
}
|
|
};
|