Live Config
Loading...
Searching...
No Matches
SLiveConfigPropertyChip.h
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Widgets/SCompoundWidget.h"
7
11class SLiveConfigPropertyChip : public SCompoundWidget
12{
13 SLATE_DECLARE_WIDGET_API(SLiveConfigPropertyChip, SCompoundWidget, LIVECONFIGEDITOR_API);
14public:
16
17 DECLARE_DELEGATE_RetVal(FReply, FOnEditPressed);
18 DECLARE_DELEGATE_RetVal(FReply, FOnClearPressed);
19
20 SLATE_BEGIN_ARGS(SLiveConfigPropertyChip) {}
21 SLATE_ARGUMENT(bool, ReadOnly)
22 SLATE_ATTRIBUTE(FText, TooltipText)
23 SLATE_ATTRIBUTE(FText, Text)
24 SLATE_ATTRIBUTE(bool, IsSelected)
25 SLATE_ATTRIBUTE(bool, ShowClearButton)
26 SLATE_EVENT(FOnEditPressed, OnEditPressed)
27 SLATE_EVENT(FOnClearPressed, OnClearPressed)
28 SLATE_END_ARGS()
29
30
31 void Construct(const FArguments& InArgs);
32
33 TSharedPtr<SButton> ChipButton;
34 TSharedPtr<SButton> ClearButton;
35
36 TSlateAttribute<FText> ToolTipTextAttribute;
37 TSlateAttribute<FText> TextAttribute;
38 TSlateAttribute<bool> IsSelectedAttribute;
39 TSlateAttribute<bool> ShowClearButtonAttribute;
40 bool bLastHasIsSelected = false;
41
42 FOnEditPressed OnEditPressed;
43 FOnClearPressed OnClearPressed;
44protected:
45 void UpdatePillStyle();
46};
Definition SLiveConfigPropertyChip.h:12
void Construct(const FArguments &InArgs)
Definition LiveConfigPropertyChip.cpp:33