Fixed the editor view
This commit is contained in:
@ -1,20 +1,18 @@
|
|||||||
{
|
{
|
||||||
"FileVersion": 3,
|
"FileVersion": 3,
|
||||||
"Version": 1,
|
"Version": 1,
|
||||||
"VersionName": "1.0",
|
"VersionName": "0.1.0",
|
||||||
"FriendlyName": "CommonTime",
|
"FriendlyName": "CommonTime",
|
||||||
"Description": "",
|
"Description": "Provides an editor view for editing DateTime and Timespan values.",
|
||||||
"Category": "Editor",
|
"Category": "Editor",
|
||||||
"CreatedBy": "MrRobinOfficial",
|
"CreatedBy": "MrRobinOfficial",
|
||||||
"CreatedByURL": "https://github.com/MrRobinOfficial",
|
"CreatedByURL": "https://github.com/MrRobinOfficial",
|
||||||
"DocsURL": "",
|
"DocsURL": "https://github.com/MrRobinOfficial/Unreal-CommonTime",
|
||||||
"MarketplaceURL": "",
|
"MarketplaceURL": "",
|
||||||
"SupportURL": "",
|
"SupportURL": "https://github.com/MrRobinOfficial/Unreal-CommonTime/issues",
|
||||||
"EnabledByDefault": true,
|
"EngineVersion": "5.3.0",
|
||||||
"CanContainContent": true,
|
"CanContainContent": true,
|
||||||
"IsBetaVersion": false,
|
"Installed": true,
|
||||||
"IsExperimentalVersion": false,
|
|
||||||
"Installed": false,
|
|
||||||
"Modules": [
|
"Modules": [
|
||||||
{
|
{
|
||||||
"Name": "CommonTime",
|
"Name": "CommonTime",
|
||||||
|
|||||||
8
Config/FilterPlugin.ini
Normal file
8
Config/FilterPlugin.ini
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[FilterPlugin]
|
||||||
|
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
|
||||||
|
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
|
||||||
|
;
|
||||||
|
; Examples:
|
||||||
|
; /README.txt
|
||||||
|
; /Extras/...
|
||||||
|
; /Binaries/ThirdParty/*.dll
|
||||||
43
README.md
43
README.md
@ -1 +1,42 @@
|
|||||||
# Unreal-CommonTime
|
<!-- markdownlint-disable-next-line -->
|
||||||
|
<p align="center">
|
||||||
|
<a href="#" rel="noopener" target="_blank"><img width="150" src="/Resources/Icon128.png" alt="CommonTime logo"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h1 align="center">CommonTime [Unreal Engine]</h1>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
*Provides an editor view for editing DateTime and Timespan values.*
|
||||||
|
|
||||||
|
[](https://github.com/mrrobinofficial/unreal-commontime/blob/HEAD/LICENSE.txt)
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
## ⚙️ Supported Platforms
|
||||||
|
This plug-in was last built against Unreal Engine 5.3.
|
||||||
|
|
||||||
|
## ⚒️ Installation
|
||||||
|
|
||||||
|
You can install from the <a href="https://github.com/MrRobinOfficial/Unreal-CommonTime/releases/latest">release section</a>.
|
||||||
|
|
||||||
|
Alternatively, you can install this plugin via terminal with [*git*](https://git-scm.com/). **Here is the command for installing it**.
|
||||||
|
|
||||||
|
```console
|
||||||
|
git clone git@github.com:MrRobinOfficial/Unreal-CommonTime.git CommonTime
|
||||||
|
```
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
<details open>
|
||||||
|
<summary><h2>🖼️ Screenshots</h2></summary>
|
||||||
|
</details>
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
## 🆘 Support
|
||||||
|
If you have any questions or issue, just write either to my [YouTube channel](https://www.youtube.com/@mrrobinofficial), [Email](mailto:mrrobin123mail@gmail.com) or [Twitter DM](https://twitter.com/MrRobinOfficial).
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.8 KiB |
@ -18,9 +18,13 @@
|
|||||||
#include "Widgets/DeclarativeSyntaxSupport.h"
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
||||||
|
|
||||||
#include "DetailLayoutBuilder.h"
|
#include "DetailLayoutBuilder.h"
|
||||||
|
|
||||||
#include "Widgets/Input/SNumericEntryBox.h"
|
#include "Widgets/Input/SNumericEntryBox.h"
|
||||||
#include "Widgets/Input/SVectorInputBox.h"
|
#include "Widgets/Input/SVectorInputBox.h"
|
||||||
|
#include "Widgets/Input/NumericTypeInterface.h"
|
||||||
|
#include "Widgets/Input/NumericUnitTypeInterface.inl"
|
||||||
|
#include "Math/UnitConversion.h"
|
||||||
|
|
||||||
|
// SExpanderArrow
|
||||||
|
|
||||||
#define LOCTEXT_NAMESPACE "MyDateTimeDetailCustomization"
|
#define LOCTEXT_NAMESPACE "MyDateTimeDetailCustomization"
|
||||||
|
|
||||||
@ -36,30 +40,7 @@ void FMyDateTimeDetailCustomization::CustomizeHeader(TSharedRef<IPropertyHandle>
|
|||||||
{
|
{
|
||||||
PropertyHandle = StructPropertyHandle;
|
PropertyHandle = StructPropertyHandle;
|
||||||
|
|
||||||
const FSlateColor FgColor = FSlateColor(FColor::Yellow);
|
SAssignNew(YearEntryBox, SNumericEntryBox<int32>)
|
||||||
const FSlateColor BgColor = FSlateColor(FColor::Blue);
|
|
||||||
|
|
||||||
HeaderRow
|
|
||||||
.NameContent()
|
|
||||||
[
|
|
||||||
StructPropertyHandle->CreatePropertyNameWidget()
|
|
||||||
]
|
|
||||||
.ValueContent()
|
|
||||||
.MaxDesiredWidth(0.f)
|
|
||||||
.MinDesiredWidth(125.0f * 3.0f)
|
|
||||||
//.HAlign(HAlign_Fill)
|
|
||||||
[
|
|
||||||
SNew(SVerticalBox)
|
|
||||||
+ SVerticalBox::Slot()
|
|
||||||
.HAlign(HAlign_Fill)
|
|
||||||
.AutoHeight()
|
|
||||||
.Padding(0.0f, 1.0f)
|
|
||||||
[
|
|
||||||
SNew(SHorizontalBox)
|
|
||||||
+ SHorizontalBox::Slot()
|
|
||||||
.Padding(0.0f, 2.0f)
|
|
||||||
[
|
|
||||||
SNew(SNumericEntryBox<int32>)
|
|
||||||
.AllowSpin(true)
|
.AllowSpin(true)
|
||||||
.MinValue(1)
|
.MinValue(1)
|
||||||
.MaxValue(9999)
|
.MaxValue(9999)
|
||||||
@ -71,35 +52,10 @@ void FMyDateTimeDetailCustomization::CustomizeHeader(TSharedRef<IPropertyHandle>
|
|||||||
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 3)
|
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 3)
|
||||||
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
||||||
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
||||||
.ToolTipText(this, &FMyDateTimeDetailCustomization::GetValueAsText, 3)
|
.TypeInterface(MakeShareable(new TNumericUnitTypeInterface<int32>(EUnit::Years)))
|
||||||
//.ToolTipText(MakeAttributeLambda([Value, TooltipText]
|
.LinearDeltaSensitivity(1);
|
||||||
//{
|
|
||||||
// if (Value.Get().IsSet())
|
SAssignNew(MonthEntryBox, SNumericEntryBox<int32>)
|
||||||
// {
|
|
||||||
// return FText::Format(TooltipText, Value.Get().GetValue());
|
|
||||||
// }
|
|
||||||
// return NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values");
|
|
||||||
//}))
|
|
||||||
//.UndeterminedString(NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values"))
|
|
||||||
//.ContextMenuExtender(OnContextMenuExtenderComponent)
|
|
||||||
//.TypeInterface(InArgs._TypeInterface)
|
|
||||||
//.MinValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinVector))
|
|
||||||
//.MaxValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxVector))
|
|
||||||
//.MinSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinSliderVector))
|
|
||||||
//.MaxSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxSliderVector))
|
|
||||||
.LinearDeltaSensitivity(1)
|
|
||||||
/*.Delta(InArgs._SpinDelta)*/
|
|
||||||
/*.OnBeginSliderMovement(CreatePerComponentSliderMovementEvent(InArgs._OnBeginSliderMovement, OnComponentBeginSliderMovement))*/
|
|
||||||
/*.OnEndSliderMovement(CreatePerComponentSliderMovementEvent<FOnNumericValueChanged, NumericType>(InArgs._OnEndSliderMovement, OnComponentEndSliderMovement))*/
|
|
||||||
/*.DisplayToggle(InArgs._DisplayToggle)
|
|
||||||
.TogglePadding(InArgs._TogglePadding)
|
|
||||||
.ToggleChecked(ToggleChecked)
|
|
||||||
.OnToggleChanged(OnToggleChanged)*/
|
|
||||||
]
|
|
||||||
+ SHorizontalBox::Slot()
|
|
||||||
.Padding(3.75f, 2.0f)
|
|
||||||
[
|
|
||||||
SNew(SNumericEntryBox<int32>)
|
|
||||||
.AllowSpin(true)
|
.AllowSpin(true)
|
||||||
.MinValue(1)
|
.MinValue(1)
|
||||||
.MaxValue(12)
|
.MaxValue(12)
|
||||||
@ -111,37 +67,10 @@ void FMyDateTimeDetailCustomization::CustomizeHeader(TSharedRef<IPropertyHandle>
|
|||||||
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 4)
|
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 4)
|
||||||
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
||||||
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
||||||
.ToolTipText(this, &FMyDateTimeDetailCustomization::GetValueAsText, 4)
|
.TypeInterface(MakeShareable(new TNumericUnitTypeInterface<int32>(EUnit::Months)))
|
||||||
//.OnValueChanged(CreatePerComponentChanged(ComponentIndex, OnComponentChanged, InArgs._ConstrainVector))
|
.LinearDeltaSensitivity(1);
|
||||||
//.OnValueCommitted(CreatePerComponentCommitted(ComponentIndex, OnComponentCommitted, InArgs._ConstrainVector))
|
|
||||||
//.ToolTipText(MakeAttributeLambda([Value, TooltipText]
|
SAssignNew(DayEntryBox, SNumericEntryBox<int32>)
|
||||||
//{
|
|
||||||
// if (Value.Get().IsSet())
|
|
||||||
// {
|
|
||||||
// return FText::Format(TooltipText, Value.Get().GetValue());
|
|
||||||
// }
|
|
||||||
// return NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values");
|
|
||||||
//}))
|
|
||||||
//.UndeterminedString(NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values"))
|
|
||||||
//.ContextMenuExtender(OnContextMenuExtenderComponent)
|
|
||||||
//.TypeInterface(InArgs._TypeInterface)
|
|
||||||
//.MinValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinVector))
|
|
||||||
//.MaxValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxVector))
|
|
||||||
//.MinSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinSliderVector))
|
|
||||||
//.MaxSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxSliderVector))
|
|
||||||
.LinearDeltaSensitivity(1)
|
|
||||||
/*.Delta(InArgs._SpinDelta)*/
|
|
||||||
/*.OnBeginSliderMovement(CreatePerComponentSliderMovementEvent(InArgs._OnBeginSliderMovement, OnComponentBeginSliderMovement))*/
|
|
||||||
/*.OnEndSliderMovement(CreatePerComponentSliderMovementEvent<FOnNumericValueChanged, NumericType>(InArgs._OnEndSliderMovement, OnComponentEndSliderMovement))*/
|
|
||||||
/*.DisplayToggle(InArgs._DisplayToggle)
|
|
||||||
.TogglePadding(InArgs._TogglePadding)
|
|
||||||
.ToggleChecked(ToggleChecked)
|
|
||||||
.OnToggleChanged(OnToggleChanged)*/
|
|
||||||
]
|
|
||||||
+ SHorizontalBox::Slot()
|
|
||||||
.Padding(0.0f, 2.0f)
|
|
||||||
[
|
|
||||||
SNew(SNumericEntryBox<int32>)
|
|
||||||
.AllowSpin(true)
|
.AllowSpin(true)
|
||||||
.MinValue(1)
|
.MinValue(1)
|
||||||
.MaxValue(31)
|
.MaxValue(31)
|
||||||
@ -153,44 +82,10 @@ void FMyDateTimeDetailCustomization::CustomizeHeader(TSharedRef<IPropertyHandle>
|
|||||||
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 5)
|
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 5)
|
||||||
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
||||||
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
||||||
.ToolTipText(this, &FMyDateTimeDetailCustomization::GetValueAsText, 5)
|
.TypeInterface(MakeShareable(new TNumericUnitTypeInterface<int32>(EUnit::Days)))
|
||||||
//.OnValueChanged(CreatePerComponentChanged(ComponentIndex, OnComponentChanged, InArgs._ConstrainVector))
|
.LinearDeltaSensitivity(1);
|
||||||
//.OnValueCommitted(CreatePerComponentCommitted(ComponentIndex, OnComponentCommitted, InArgs._ConstrainVector))
|
|
||||||
//.ToolTipText(MakeAttributeLambda([Value, TooltipText]
|
SAssignNew(HourEntryBox, SNumericEntryBox<int32>)
|
||||||
//{
|
|
||||||
// if (Value.Get().IsSet())
|
|
||||||
// {
|
|
||||||
// return FText::Format(TooltipText, Value.Get().GetValue());
|
|
||||||
// }
|
|
||||||
// return NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values");
|
|
||||||
//}))
|
|
||||||
//.UndeterminedString(NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values"))
|
|
||||||
//.ContextMenuExtender(OnContextMenuExtenderComponent)
|
|
||||||
//.TypeInterface(InArgs._TypeInterface)
|
|
||||||
//.MinValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinVector))
|
|
||||||
//.MaxValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxVector))
|
|
||||||
//.MinSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinSliderVector))
|
|
||||||
//.MaxSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxSliderVector))
|
|
||||||
.LinearDeltaSensitivity(1)
|
|
||||||
/*.Delta(InArgs._SpinDelta)*/
|
|
||||||
/*.OnBeginSliderMovement(CreatePerComponentSliderMovementEvent(InArgs._OnBeginSliderMovement, OnComponentBeginSliderMovement))*/
|
|
||||||
/*.OnEndSliderMovement(CreatePerComponentSliderMovementEvent<FOnNumericValueChanged, NumericType>(InArgs._OnEndSliderMovement, OnComponentEndSliderMovement))*/
|
|
||||||
/*.DisplayToggle(InArgs._DisplayToggle)
|
|
||||||
.TogglePadding(InArgs._TogglePadding)
|
|
||||||
.ToggleChecked(ToggleChecked)
|
|
||||||
.OnToggleChanged(OnToggleChanged)*/
|
|
||||||
]
|
|
||||||
]
|
|
||||||
+ SVerticalBox::Slot()
|
|
||||||
.HAlign(HAlign_Fill)
|
|
||||||
.AutoHeight()
|
|
||||||
.Padding(0.0f, 1.0f)
|
|
||||||
[
|
|
||||||
SNew(SHorizontalBox)
|
|
||||||
+ SHorizontalBox::Slot()
|
|
||||||
.Padding(0.0f, 2.0f)
|
|
||||||
[
|
|
||||||
SNew(SNumericEntryBox<int32>)
|
|
||||||
.AllowSpin(true)
|
.AllowSpin(true)
|
||||||
.MinValue(0)
|
.MinValue(0)
|
||||||
.MaxValue(23)
|
.MaxValue(23)
|
||||||
@ -202,37 +97,10 @@ void FMyDateTimeDetailCustomization::CustomizeHeader(TSharedRef<IPropertyHandle>
|
|||||||
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 0)
|
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 0)
|
||||||
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
||||||
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
||||||
.ToolTipText(this, &FMyDateTimeDetailCustomization::GetValueAsText, 0)
|
.TypeInterface(MakeShareable(new TNumericUnitTypeInterface<int32>(EUnit::Hours)))
|
||||||
//.OnValueChanged(CreatePerComponentChanged(ComponentIndex, OnComponentChanged, InArgs._ConstrainVector))
|
.LinearDeltaSensitivity(1);
|
||||||
//.OnValueCommitted(CreatePerComponentCommitted(ComponentIndex, OnComponentCommitted, InArgs._ConstrainVector))
|
|
||||||
//.ToolTipText(MakeAttributeLambda([Value, TooltipText]
|
SAssignNew(MinuteEntryBox, SNumericEntryBox<int32>)
|
||||||
//{
|
|
||||||
// if (Value.Get().IsSet())
|
|
||||||
// {
|
|
||||||
// return FText::Format(TooltipText, Value.Get().GetValue());
|
|
||||||
// }
|
|
||||||
// return NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values");
|
|
||||||
//}))
|
|
||||||
//.UndeterminedString(NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values"))
|
|
||||||
//.ContextMenuExtender(OnContextMenuExtenderComponent)
|
|
||||||
//.TypeInterface(InArgs._TypeInterface)
|
|
||||||
//.MinValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinVector))
|
|
||||||
//.MaxValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxVector))
|
|
||||||
//.MinSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinSliderVector))
|
|
||||||
//.MaxSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxSliderVector))
|
|
||||||
.LinearDeltaSensitivity(1)
|
|
||||||
/*.Delta(InArgs._SpinDelta)*/
|
|
||||||
/*.OnBeginSliderMovement(CreatePerComponentSliderMovementEvent(InArgs._OnBeginSliderMovement, OnComponentBeginSliderMovement))*/
|
|
||||||
/*.OnEndSliderMovement(CreatePerComponentSliderMovementEvent<FOnNumericValueChanged, NumericType>(InArgs._OnEndSliderMovement, OnComponentEndSliderMovement))*/
|
|
||||||
/*.DisplayToggle(InArgs._DisplayToggle)
|
|
||||||
.TogglePadding(InArgs._TogglePadding)
|
|
||||||
.ToggleChecked(ToggleChecked)
|
|
||||||
.OnToggleChanged(OnToggleChanged)*/
|
|
||||||
]
|
|
||||||
+ SHorizontalBox::Slot()
|
|
||||||
.Padding(3.75f, 2.0f)
|
|
||||||
[
|
|
||||||
SNew(SNumericEntryBox<int32>)
|
|
||||||
.AllowSpin(true)
|
.AllowSpin(true)
|
||||||
.MinValue(0)
|
.MinValue(0)
|
||||||
.MaxValue(59)
|
.MaxValue(59)
|
||||||
@ -244,37 +112,10 @@ void FMyDateTimeDetailCustomization::CustomizeHeader(TSharedRef<IPropertyHandle>
|
|||||||
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 1)
|
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 1)
|
||||||
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
||||||
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
||||||
.ToolTipText(this, &FMyDateTimeDetailCustomization::GetValueAsText, 1)
|
.TypeInterface(MakeShareable(new TNumericUnitTypeInterface<int32>(EUnit::Minutes)))
|
||||||
//.OnValueChanged(CreatePerComponentChanged(ComponentIndex, OnComponentChanged, InArgs._ConstrainVector))
|
.LinearDeltaSensitivity(1);
|
||||||
//.OnValueCommitted(CreatePerComponentCommitted(ComponentIndex, OnComponentCommitted, InArgs._ConstrainVector))
|
|
||||||
//.ToolTipText(MakeAttributeLambda([Value, TooltipText]
|
SAssignNew(SecondEntryBox, SNumericEntryBox<int32>)
|
||||||
//{
|
|
||||||
// if (Value.Get().IsSet())
|
|
||||||
// {
|
|
||||||
// return FText::Format(TooltipText, Value.Get().GetValue());
|
|
||||||
// }
|
|
||||||
// return NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values");
|
|
||||||
//}))
|
|
||||||
//.UndeterminedString(NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values"))
|
|
||||||
//.ContextMenuExtender(OnContextMenuExtenderComponent)
|
|
||||||
//.TypeInterface(InArgs._TypeInterface)
|
|
||||||
//.MinValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinVector))
|
|
||||||
//.MaxValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxVector))
|
|
||||||
//.MinSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinSliderVector))
|
|
||||||
//.MaxSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxSliderVector))
|
|
||||||
.LinearDeltaSensitivity(1)
|
|
||||||
/*.Delta(InArgs._SpinDelta)*/
|
|
||||||
/*.OnBeginSliderMovement(CreatePerComponentSliderMovementEvent(InArgs._OnBeginSliderMovement, OnComponentBeginSliderMovement))*/
|
|
||||||
/*.OnEndSliderMovement(CreatePerComponentSliderMovementEvent<FOnNumericValueChanged, NumericType>(InArgs._OnEndSliderMovement, OnComponentEndSliderMovement))*/
|
|
||||||
/*.DisplayToggle(InArgs._DisplayToggle)
|
|
||||||
.TogglePadding(InArgs._TogglePadding)
|
|
||||||
.ToggleChecked(ToggleChecked)
|
|
||||||
.OnToggleChanged(OnToggleChanged)*/
|
|
||||||
]
|
|
||||||
+ SHorizontalBox::Slot()
|
|
||||||
.Padding(0.0f, 2.0f)
|
|
||||||
[
|
|
||||||
SNew(SNumericEntryBox<int32>)
|
|
||||||
.AllowSpin(true)
|
.AllowSpin(true)
|
||||||
.MinValue(0)
|
.MinValue(0)
|
||||||
.MaxValue(59)
|
.MaxValue(59)
|
||||||
@ -286,32 +127,63 @@ void FMyDateTimeDetailCustomization::CustomizeHeader(TSharedRef<IPropertyHandle>
|
|||||||
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 2)
|
.OnValueCommitted(this, &FMyDateTimeDetailCustomization::OnValueCommitted, 2)
|
||||||
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
.OnBeginSliderMovement(this, &FMyDateTimeDetailCustomization::OnBeginSliderMovement)
|
||||||
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
.OnEndSliderMovement(this, &FMyDateTimeDetailCustomization::OnEndSliderMovement)
|
||||||
.ToolTipText(this, &FMyDateTimeDetailCustomization::GetValueAsText, 2)
|
.TypeInterface(MakeShareable(new TNumericUnitTypeInterface<int32>(EUnit::Seconds)))
|
||||||
//.OnValueChanged(CreatePerComponentChanged(ComponentIndex, OnComponentChanged, InArgs._ConstrainVector))
|
.LinearDeltaSensitivity(1);
|
||||||
//.OnValueCommitted(CreatePerComponentCommitted(ComponentIndex, OnComponentCommitted, InArgs._ConstrainVector))
|
|
||||||
//.ToolTipText(MakeAttributeLambda([Value, TooltipText]
|
HeaderRow
|
||||||
//{
|
.NameContent()
|
||||||
// if (Value.Get().IsSet())
|
[
|
||||||
// {
|
StructPropertyHandle->CreatePropertyNameWidget()
|
||||||
// return FText::Format(TooltipText, Value.Get().GetValue());
|
]
|
||||||
// }
|
.ValueContent()
|
||||||
// return NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values");
|
.MinDesiredWidth(125.0f * 3.0f)
|
||||||
//}))
|
.MaxDesiredWidth(125.0f * 3.0f)
|
||||||
//.UndeterminedString(NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values"))
|
[
|
||||||
//.ContextMenuExtender(OnContextMenuExtenderComponent)
|
SNew(SVerticalBox)
|
||||||
//.TypeInterface(InArgs._TypeInterface)
|
+ SVerticalBox::Slot()
|
||||||
//.MinValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinVector))
|
.AutoHeight()
|
||||||
//.MaxValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxVector))
|
[
|
||||||
//.MinSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinSliderVector))
|
SNew(SHorizontalBox)
|
||||||
//.MaxSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxSliderVector))
|
+ SHorizontalBox::Slot()
|
||||||
.LinearDeltaSensitivity(1)
|
.Padding(0.0f, 0.0f, 2.0f, 0.0f)
|
||||||
/*.Delta(InArgs._SpinDelta)*/
|
[
|
||||||
/*.OnBeginSliderMovement(CreatePerComponentSliderMovementEvent(InArgs._OnBeginSliderMovement, OnComponentBeginSliderMovement))*/
|
YearEntryBox.ToSharedRef()
|
||||||
/*.OnEndSliderMovement(CreatePerComponentSliderMovementEvent<FOnNumericValueChanged, NumericType>(InArgs._OnEndSliderMovement, OnComponentEndSliderMovement))*/
|
]
|
||||||
/*.DisplayToggle(InArgs._DisplayToggle)
|
+ SHorizontalBox::Slot()
|
||||||
.TogglePadding(InArgs._TogglePadding)
|
.Padding(2.0f, 0.0f)
|
||||||
.ToggleChecked(ToggleChecked)
|
[
|
||||||
.OnToggleChanged(OnToggleChanged)*/
|
MonthEntryBox.ToSharedRef()
|
||||||
|
]
|
||||||
|
+ SHorizontalBox::Slot()
|
||||||
|
.Padding(2.0f, 0.0f, 0.0f, 0.0f)
|
||||||
|
[
|
||||||
|
DayEntryBox.ToSharedRef()
|
||||||
|
]
|
||||||
|
]
|
||||||
|
+ SVerticalBox::Slot()
|
||||||
|
.AutoHeight()
|
||||||
|
[
|
||||||
|
SNew(SSpacer)
|
||||||
|
.Size(FVector2D(8.0f))
|
||||||
|
]
|
||||||
|
+ SVerticalBox::Slot()
|
||||||
|
.AutoHeight()
|
||||||
|
[
|
||||||
|
SNew(SHorizontalBox)
|
||||||
|
+ SHorizontalBox::Slot()
|
||||||
|
.Padding(0.0f, 0.0f, 2.0f, 0.0f)
|
||||||
|
[
|
||||||
|
HourEntryBox.ToSharedRef()
|
||||||
|
]
|
||||||
|
+ SHorizontalBox::Slot()
|
||||||
|
.Padding(2.0f, 0.0f)
|
||||||
|
[
|
||||||
|
MinuteEntryBox.ToSharedRef()
|
||||||
|
]
|
||||||
|
+ SHorizontalBox::Slot()
|
||||||
|
.Padding(2.0f, 0.0f, 0.0f, 0.0f)
|
||||||
|
[
|
||||||
|
SecondEntryBox.ToSharedRef()
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
@ -359,55 +231,6 @@ TOptional<int32> FMyDateTimeDetailCustomization::OnGetValue(int32 Index) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FText FMyDateTimeDetailCustomization::GetValueAsText(int32 Index) const
|
|
||||||
{
|
|
||||||
const TOptional<int32>& Value = OnGetValue(Index);
|
|
||||||
|
|
||||||
FFormatNamedArguments Args;
|
|
||||||
|
|
||||||
switch (Index)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
Args.Add(TEXT("Key"), INVTEXT("Hour"));
|
|
||||||
Args.Add(TEXT("Desc"), INVTEXT("A hour between 0-23"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
Args.Add(TEXT("Key"), INVTEXT("Minute"));
|
|
||||||
Args.Add(TEXT("Desc"), INVTEXT("A minute between 0-59"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
Args.Add(TEXT("Key"), INVTEXT("Second"));
|
|
||||||
Args.Add(TEXT("Desc"), INVTEXT("A second between 0-59"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
Args.Add(TEXT("Key"), INVTEXT("Year"));
|
|
||||||
Args.Add(TEXT("Desc"), INVTEXT("A year between 1-9999"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 4:
|
|
||||||
Args.Add(TEXT("Key"), INVTEXT("Month"));
|
|
||||||
Args.Add(TEXT("Desc"), INVTEXT("A month between 1-12"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 5:
|
|
||||||
Args.Add(TEXT("Key"), INVTEXT("Day"));
|
|
||||||
Args.Add(TEXT("Desc"), INVTEXT("A day between 1-31"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (Value.IsSet() == true)
|
|
||||||
{
|
|
||||||
Args.Add(TEXT("Value"), Value.GetValue());
|
|
||||||
return FText::Format(LOCTEXT("DateTime", "{Key}: {Value} - {Desc}"), Args);
|
|
||||||
}
|
|
||||||
|
|
||||||
return FText::Format(LOCTEXT("DateTime", "{Key} - {Desc}"), Args);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FMyDateTimeDetailCustomization::OnBeginSliderMovement()
|
void FMyDateTimeDetailCustomization::OnBeginSliderMovement()
|
||||||
{
|
{
|
||||||
bIsUsingSlider = true;
|
bIsUsingSlider = true;
|
||||||
|
|||||||
@ -19,6 +19,10 @@
|
|||||||
|
|
||||||
#include "DetailLayoutBuilder.h"
|
#include "DetailLayoutBuilder.h"
|
||||||
#include "Widgets/Input/SNumericEntryBox.h"
|
#include "Widgets/Input/SNumericEntryBox.h"
|
||||||
|
#include "Widgets/Input/SVectorInputBox.h"
|
||||||
|
#include "Widgets/Input/NumericTypeInterface.h"
|
||||||
|
#include "Widgets/Input/NumericUnitTypeInterface.inl"
|
||||||
|
#include "Math/UnitConversion.h"
|
||||||
|
|
||||||
#define LOCTEXT_NAMESPACE "MyTimespanDetailCustomization"
|
#define LOCTEXT_NAMESPACE "MyTimespanDetailCustomization"
|
||||||
|
|
||||||
@ -40,21 +44,7 @@ void FMyTimespanDetailCustomization::CustomizeHeader(
|
|||||||
{
|
{
|
||||||
PropertyHandle = StructPropertyHandle;
|
PropertyHandle = StructPropertyHandle;
|
||||||
|
|
||||||
HeaderRow
|
SAssignNew(HourEntryBox, SNumericEntryBox<int32>)
|
||||||
.NameContent()
|
|
||||||
[
|
|
||||||
StructPropertyHandle->CreatePropertyNameWidget()
|
|
||||||
]
|
|
||||||
.ValueContent()
|
|
||||||
.MaxDesiredWidth(0.f)
|
|
||||||
.MinDesiredWidth(125.0f * 3.0f)
|
|
||||||
//.HAlign(HAlign_Fill)
|
|
||||||
[
|
|
||||||
SNew(SHorizontalBox)
|
|
||||||
+ SHorizontalBox::Slot()
|
|
||||||
.Padding(0.0f, 2.0f)
|
|
||||||
[
|
|
||||||
SNew(SNumericEntryBox<int32>)
|
|
||||||
.AllowSpin(true)
|
.AllowSpin(true)
|
||||||
.MinValue(0)
|
.MinValue(0)
|
||||||
.MaxValue(23)
|
.MaxValue(23)
|
||||||
@ -66,52 +56,10 @@ void FMyTimespanDetailCustomization::CustomizeHeader(
|
|||||||
.OnValueCommitted(this, &FMyTimespanDetailCustomization::OnValueCommitted, 0)
|
.OnValueCommitted(this, &FMyTimespanDetailCustomization::OnValueCommitted, 0)
|
||||||
.OnBeginSliderMovement(this, &FMyTimespanDetailCustomization::OnBeginSliderMovement)
|
.OnBeginSliderMovement(this, &FMyTimespanDetailCustomization::OnBeginSliderMovement)
|
||||||
.OnEndSliderMovement(this, &FMyTimespanDetailCustomization::OnEndSliderMovement)
|
.OnEndSliderMovement(this, &FMyTimespanDetailCustomization::OnEndSliderMovement)
|
||||||
//.OnValueChanged(CreatePerComponentChanged(ComponentIndex, OnComponentChanged, InArgs._ConstrainVector))
|
.TypeInterface(MakeShareable(new TNumericUnitTypeInterface<int32>(EUnit::Hours)))
|
||||||
//.OnValueCommitted(CreatePerComponentCommitted(ComponentIndex, OnComponentCommitted, InArgs._ConstrainVector))
|
.LinearDeltaSensitivity(1);
|
||||||
//.ToolTipText(MakeAttributeLambda([Value, TooltipText]
|
|
||||||
//{
|
|
||||||
// if (Value.Get().IsSet())
|
|
||||||
// {
|
|
||||||
// return FText::Format(TooltipText, Value.Get().GetValue());
|
|
||||||
// }
|
|
||||||
// return NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values");
|
|
||||||
//}))
|
|
||||||
//.UndeterminedString(NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values"))
|
|
||||||
//.ContextMenuExtender(OnContextMenuExtenderComponent)
|
|
||||||
//.TypeInterface(InArgs._TypeInterface)
|
|
||||||
//.MinValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinVector))
|
|
||||||
//.MaxValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxVector))
|
|
||||||
//.MinSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinSliderVector))
|
|
||||||
//.MaxSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxSliderVector))
|
|
||||||
.LinearDeltaSensitivity(1)
|
|
||||||
/*.Delta(InArgs._SpinDelta)*/
|
|
||||||
/*.OnBeginSliderMovement(CreatePerComponentSliderMovementEvent(InArgs._OnBeginSliderMovement, OnComponentBeginSliderMovement))*/
|
|
||||||
/*.OnEndSliderMovement(CreatePerComponentSliderMovementEvent<FOnNumericValueChanged, NumericType>(InArgs._OnEndSliderMovement, OnComponentEndSliderMovement))*/
|
|
||||||
/*.DisplayToggle(InArgs._DisplayToggle)
|
|
||||||
.TogglePadding(InArgs._TogglePadding)
|
|
||||||
.ToggleChecked(ToggleChecked)
|
|
||||||
.OnToggleChanged(OnToggleChanged)*/
|
|
||||||
|
|
||||||
//SNew(SNumericEntryBox<int32>)
|
SAssignNew(MinuteEntryBox, SNumericEntryBox<int32>)
|
||||||
// .AllowSpin(true)
|
|
||||||
// .Font(IDetailLayoutBuilder::GetDetailFont())
|
|
||||||
// .Value(this, &FMyTimespanDetailCustomization::OnGetValue, 0)
|
|
||||||
// .MinValue(0)
|
|
||||||
// .MaxValue(23)
|
|
||||||
// .MinSliderValue(0)
|
|
||||||
// .MaxSliderValue(23)
|
|
||||||
// .LabelPadding(FMargin(3.f))
|
|
||||||
// .LabelLocation(SNumericEntryBox<int32>::ELabelLocation::Inside)
|
|
||||||
// .UndeterminedString(NSLOCTEXT("PropertyEditor", "MultipleValues", "Multiple Values"))
|
|
||||||
// .OnValueCommitted(const_cast<FMyTimespanDetailCustomization*>(this),&FMyTimespanDetailCustomization::OnValueCommitted, 0)
|
|
||||||
// .OnValueChanged(const_cast<FMyTimespanDetailCustomization*>(this),&FMyTimespanDetailCustomization::OnValueChanged, 0)
|
|
||||||
// .OnBeginSliderMovement(const_cast<FMyTimespanDetailCustomization*>(this), &FMyTimespanDetailCustomization::OnBeginSliderMovement)
|
|
||||||
// .OnEndSliderMovement(const_cast<FMyTimespanDetailCustomization*>(this), &FMyTimespanDetailCustomization::OnEndSliderMovement)
|
|
||||||
]
|
|
||||||
+ SHorizontalBox::Slot()
|
|
||||||
.Padding(3.75f, 2.0f)
|
|
||||||
[
|
|
||||||
SNew(SNumericEntryBox<int32>)
|
|
||||||
.AllowSpin(true)
|
.AllowSpin(true)
|
||||||
.MinValue(0)
|
.MinValue(0)
|
||||||
.MaxValue(59)
|
.MaxValue(59)
|
||||||
@ -123,36 +71,10 @@ void FMyTimespanDetailCustomization::CustomizeHeader(
|
|||||||
.OnValueCommitted(this, &FMyTimespanDetailCustomization::OnValueCommitted, 1)
|
.OnValueCommitted(this, &FMyTimespanDetailCustomization::OnValueCommitted, 1)
|
||||||
.OnBeginSliderMovement(this, &FMyTimespanDetailCustomization::OnBeginSliderMovement)
|
.OnBeginSliderMovement(this, &FMyTimespanDetailCustomization::OnBeginSliderMovement)
|
||||||
.OnEndSliderMovement(this, &FMyTimespanDetailCustomization::OnEndSliderMovement)
|
.OnEndSliderMovement(this, &FMyTimespanDetailCustomization::OnEndSliderMovement)
|
||||||
//.OnValueChanged(CreatePerComponentChanged(ComponentIndex, OnComponentChanged, InArgs._ConstrainVector))
|
.TypeInterface(MakeShareable(new TNumericUnitTypeInterface<int32>(EUnit::Minutes)))
|
||||||
//.OnValueCommitted(CreatePerComponentCommitted(ComponentIndex, OnComponentCommitted, InArgs._ConstrainVector))
|
.LinearDeltaSensitivity(1);
|
||||||
//.ToolTipText(MakeAttributeLambda([Value, TooltipText]
|
|
||||||
//{
|
SAssignNew(SecondEntryBox, SNumericEntryBox<int32>)
|
||||||
// if (Value.Get().IsSet())
|
|
||||||
// {
|
|
||||||
// return FText::Format(TooltipText, Value.Get().GetValue());
|
|
||||||
// }
|
|
||||||
// return NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values");
|
|
||||||
//}))
|
|
||||||
//.UndeterminedString(NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values"))
|
|
||||||
//.ContextMenuExtender(OnContextMenuExtenderComponent)
|
|
||||||
//.TypeInterface(InArgs._TypeInterface)
|
|
||||||
//.MinValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinVector))
|
|
||||||
//.MaxValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxVector))
|
|
||||||
//.MinSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinSliderVector))
|
|
||||||
//.MaxSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxSliderVector))
|
|
||||||
.LinearDeltaSensitivity(1)
|
|
||||||
/*.Delta(InArgs._SpinDelta)*/
|
|
||||||
/*.OnBeginSliderMovement(CreatePerComponentSliderMovementEvent(InArgs._OnBeginSliderMovement, OnComponentBeginSliderMovement))*/
|
|
||||||
/*.OnEndSliderMovement(CreatePerComponentSliderMovementEvent<FOnNumericValueChanged, NumericType>(InArgs._OnEndSliderMovement, OnComponentEndSliderMovement))*/
|
|
||||||
/*.DisplayToggle(InArgs._DisplayToggle)
|
|
||||||
.TogglePadding(InArgs._TogglePadding)
|
|
||||||
.ToggleChecked(ToggleChecked)
|
|
||||||
.OnToggleChanged(OnToggleChanged)*/
|
|
||||||
]
|
|
||||||
+ SHorizontalBox::Slot()
|
|
||||||
.Padding(0.0f, 2.0f)
|
|
||||||
[
|
|
||||||
SNew(SNumericEntryBox<int32>)
|
|
||||||
.AllowSpin(true)
|
.AllowSpin(true)
|
||||||
.MinValue(0)
|
.MinValue(0)
|
||||||
.MaxValue(59)
|
.MaxValue(59)
|
||||||
@ -164,31 +86,33 @@ void FMyTimespanDetailCustomization::CustomizeHeader(
|
|||||||
.OnValueCommitted(this, &FMyTimespanDetailCustomization::OnValueCommitted, 2)
|
.OnValueCommitted(this, &FMyTimespanDetailCustomization::OnValueCommitted, 2)
|
||||||
.OnBeginSliderMovement(this, &FMyTimespanDetailCustomization::OnBeginSliderMovement)
|
.OnBeginSliderMovement(this, &FMyTimespanDetailCustomization::OnBeginSliderMovement)
|
||||||
.OnEndSliderMovement(this, &FMyTimespanDetailCustomization::OnEndSliderMovement)
|
.OnEndSliderMovement(this, &FMyTimespanDetailCustomization::OnEndSliderMovement)
|
||||||
//.OnValueChanged(CreatePerComponentChanged(ComponentIndex, OnComponentChanged, InArgs._ConstrainVector))
|
.TypeInterface(MakeShareable(new TNumericUnitTypeInterface<int32>(EUnit::Seconds)))
|
||||||
//.OnValueCommitted(CreatePerComponentCommitted(ComponentIndex, OnComponentCommitted, InArgs._ConstrainVector))
|
.LinearDeltaSensitivity(1);
|
||||||
//.ToolTipText(MakeAttributeLambda([Value, TooltipText]
|
|
||||||
//{
|
HeaderRow
|
||||||
// if (Value.Get().IsSet())
|
.NameContent()
|
||||||
// {
|
[
|
||||||
// return FText::Format(TooltipText, Value.Get().GetValue());
|
StructPropertyHandle->CreatePropertyNameWidget()
|
||||||
// }
|
]
|
||||||
// return NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values");
|
.ValueContent()
|
||||||
//}))
|
.MinDesiredWidth(125.0f * 3.0f)
|
||||||
//.UndeterminedString(NSLOCTEXT("SVectorInputBox", "MultipleValues", "Multiple Values"))
|
.MaxDesiredWidth(125.0f * 3.0f)
|
||||||
//.ContextMenuExtender(OnContextMenuExtenderComponent)
|
[
|
||||||
//.TypeInterface(InArgs._TypeInterface)
|
SNew(SHorizontalBox)
|
||||||
//.MinValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinVector))
|
+ SHorizontalBox::Slot()
|
||||||
//.MaxValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxVector))
|
.Padding(0.0f)
|
||||||
//.MinSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MinSliderVector))
|
[
|
||||||
//.MaxSliderValue(CreatePerComponentGetter(ComponentIndex, TOptional<int32>(), InArgs._MaxSliderVector))
|
HourEntryBox.ToSharedRef()
|
||||||
.LinearDeltaSensitivity(1)
|
]
|
||||||
/*.Delta(InArgs._SpinDelta)*/
|
+ SHorizontalBox::Slot()
|
||||||
/*.OnBeginSliderMovement(CreatePerComponentSliderMovementEvent(InArgs._OnBeginSliderMovement, OnComponentBeginSliderMovement))*/
|
.Padding(2.5f, 0.0f)
|
||||||
/*.OnEndSliderMovement(CreatePerComponentSliderMovementEvent<FOnNumericValueChanged, NumericType>(InArgs._OnEndSliderMovement, OnComponentEndSliderMovement))*/
|
[
|
||||||
/*.DisplayToggle(InArgs._DisplayToggle)
|
MinuteEntryBox.ToSharedRef()
|
||||||
.TogglePadding(InArgs._TogglePadding)
|
]
|
||||||
.ToggleChecked(ToggleChecked)
|
+ SHorizontalBox::Slot()
|
||||||
.OnToggleChanged(OnToggleChanged)*/
|
.Padding(0.0f)
|
||||||
|
[
|
||||||
|
SecondEntryBox.ToSharedRef()
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class IPropertyHandle;
|
|||||||
class SEditableTextBox;
|
class SEditableTextBox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements a details view customization for the FTimespan structure.
|
* Implements a details view customization for the FDateTime structure.
|
||||||
*/
|
*/
|
||||||
class FMyDateTimeDetailCustomization
|
class FMyDateTimeDetailCustomization
|
||||||
: public IPropertyTypeCustomization
|
: public IPropertyTypeCustomization
|
||||||
@ -37,8 +37,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
TOptional<int32> OnGetValue(int32 Index) const;
|
TOptional<int32> OnGetValue(int32 Index) const;
|
||||||
/** @return the value being observed by the Numeric Entry Box as a FText */
|
|
||||||
FText GetValueAsText(int32 Index) const;
|
|
||||||
void OnValueCommitted(int32 NewValue, ETextCommit::Type CommitType, int32 Index);
|
void OnValueCommitted(int32 NewValue, ETextCommit::Type CommitType, int32 Index);
|
||||||
void OnValueChanged(int32 NewValue, int32 Index);
|
void OnValueChanged(int32 NewValue, int32 Index);
|
||||||
void OnBeginSliderMovement();
|
void OnBeginSliderMovement();
|
||||||
@ -50,4 +48,11 @@ private:
|
|||||||
|
|
||||||
/** True if a value is being changed by dragging a slider */
|
/** True if a value is being changed by dragging a slider */
|
||||||
bool bIsUsingSlider;
|
bool bIsUsingSlider;
|
||||||
|
|
||||||
|
TSharedPtr<SWidget> YearEntryBox;
|
||||||
|
TSharedPtr<SWidget> MonthEntryBox;
|
||||||
|
TSharedPtr<SWidget> DayEntryBox;
|
||||||
|
TSharedPtr<SWidget> HourEntryBox;
|
||||||
|
TSharedPtr<SWidget> MinuteEntryBox;
|
||||||
|
TSharedPtr<SWidget> SecondEntryBox;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -47,4 +47,8 @@ private:
|
|||||||
|
|
||||||
/** True if a value is being changed by dragging a slider */
|
/** True if a value is being changed by dragging a slider */
|
||||||
bool bIsUsingSlider;
|
bool bIsUsingSlider;
|
||||||
|
|
||||||
|
TSharedPtr<SWidget> HourEntryBox;
|
||||||
|
TSharedPtr<SWidget> MinuteEntryBox;
|
||||||
|
TSharedPtr<SWidget> SecondEntryBox;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user