2016-12-08 08:52:44 -05:00
|
|
|
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
2014-04-25 00:27:08 -04:00
|
|
|
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
#include "Components/EditableText.h"
|
|
|
|
|
#include "UObject/ConstructorHelpers.h"
|
|
|
|
|
#include "Engine/Font.h"
|
|
|
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
|
|
|
#include "Widgets/Input/SEditableText.h"
|
|
|
|
|
#include "Slate/SlateBrushAsset.h"
|
2014-04-25 00:27:08 -04:00
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "UMG"
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////
|
|
|
|
|
// UEditableText
|
|
|
|
|
|
2014-10-14 10:29:11 -04:00
|
|
|
UEditableText::UEditableText(const FObjectInitializer& ObjectInitializer)
|
|
|
|
|
: Super(ObjectInitializer)
|
2014-04-25 00:27:08 -04:00
|
|
|
{
|
2014-09-10 17:24:30 -04:00
|
|
|
SEditableText::FArguments Defaults;
|
2014-09-11 09:13:48 -04:00
|
|
|
WidgetStyle = *Defaults._Style;
|
2014-09-10 17:24:30 -04:00
|
|
|
|
2015-06-16 07:21:32 -04:00
|
|
|
ColorAndOpacity_DEPRECATED = FLinearColor::Black;
|
2014-04-25 00:27:08 -04:00
|
|
|
|
Copying //UE4/Fortnite-Staging to //UE4/Main
#lockdown nick.penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2806454 on 2015/12/16 by Bob.Tellez
#UE4 Getting crash reporting working again on linux servers. Since -Unattended is now being passed BEFORE the target folder, the cmd line parsing code was failing so now it parses tokens and switches in a more general way. Also, diagnostics.txt had the incorrect case, since the d is supposed to be capitolized and the crash report processor is case sensitive.
#rb Ben.Zeigler
#codereview Dmitry.Rekman
Change 2805502 on 2015/12/16 by Ben.Zeigler
#UE4 Move ValidateEnumProperties into ValidateGeneratedClass, it was happening too early in the generation process so was being called at an invalid time.
As a result of this ValidateEnumProperties will not be called correctly for compile on load blueprints, that issue is covered in UE-24569
#codereview mike.beach, bob.tellez
Change 2805288 on 2015/12/16 by David.Nikdel
#HTTP #HttpRetry
- Add new Failed_ConnectionError code to EHttpRequestStatus to distinguish between connection errors and protocol errors.
- Changed HTTP retry logic a little bit
* If a response was received, retry on service-specific explicit HTTP codes (defaults to empty)
* If a response was not received and we did not send a full request, automatically retry
* If a response was not received and a request may have been sent, retry if the verb is GET or HEAD (should be idempotent)
- Adjusted Curl/IOS/Mac/PS4/WinInet to try and distinguish Failed_ConnectionError where possible
* Other systems will default to Failed which is ok (ConnectionError is an opportunistic categorization)
* Opened a PS4 ticket to try to improve detection, but unfortunately there's no way (currently) to distinguish between send timeout, connection timeout, and receive timeout, the latter being the problematic case.
- Removed the concept of global/default HTTP retry status codes. No system has enough knowledge to set those globally.
* Individual requests still specify explicit "retryable" codes and McpServiceBase sets that on each request on a per-service basis
#RB: Sam.Zamani
#CodeReview: Sam.Zamani, Josh.Markiewicz, Alex.Fennell, Dmitry.Rekman, Sam.Spiro
#Fixes: FORT-17804
Change 2803864 on 2015/12/15 by Bob.Tellez
#UE4 Changed usage of !UE_SERVER to !IsRunningDedicatedServer in cases where we are preventing load attempts on UFonts. This is so running an editor build with -server works the same as running a cooked server.
#rb Dmitry.Rekman
#codereview Nick.Darnell
Change 2803677 on 2015/12/15 by Billy.Bramer
- Expose equality and inequality operators for gameplay attributes
#rb Todd.Eckert
Change 2802881 on 2015/12/14 by Bob.Tellez
#UE4 InheritableComponentHandler no longer keeps records for components that we are no longer inheriting.
#rb Phillip.Kavan, Maciej.Mroz
#codereview Phillip.Kavan, Maciej.Mroz
Change 2801636 on 2015/12/14 by Bob.Tellez
#UE4 Returning package insert order for non-imports back to being after those of matching priorities unconditionally since this is what you want even when you are not using the asset registry to preload packages.
#codereview Graeme.Thornton
Change 2800400 on 2015/12/11 by Jonathan.Lindquist
Submitting a new Pivot Painter Edition
- now renders to textures
- improved workflow
- greater capabilities
Change 2799579 on 2015/12/11 by John.Abercrombie
[AUTOMERGE]
Fixed EQS BP query wrappers getting GCed before wrapped query finishes #UE4
Fixes FORT-18649 - Patrols don't spawn consistently
- The patrol blueprint was waiting (endlessly) for an EQS query to finish but because the wrapper could be GC-ed while the EQS query was running the delegate would never fire
#rb me (this code was written by MieszkoZ)
(removed code review for integration of Mieszko.Zielinski, Phil.Cole, Dominic.Barile)
--------
Integrated using branch UE4-Fortnite-To-UE4-FortniteReleases/0.10 (reversed) of change#2799575 by John.Abercrombie on 2015/12/11 09:55:11.
Change 2799018 on 2015/12/10 by Bob.Tellez
#UE4 The asset registry tags stripped from cooked builds is now a blacklist by default that includes only the FiB tag. You can opt-in to using the whitelist by flipping the bUseAssetRegistryTagsWhitelistInsteadOfBlacklist flag.
#rb Fred.Kimberley
#codereview Peter.Knepley
Change 2798926 on 2015/12/10 by Bob.Tellez
#UE4 Removed some showflags from the list of "Fixed" showflags since they were actually in use at runtime in Fortnite in a scene capture.
#jira FORT-18514
#codereview Martin.Mittring
Change 2797758 on 2015/12/10 by Mark.Satterthwaite
Defer calls to AUGraphUpdate into FCoreAudioDevice::UpdateHardware - this call will synchronise the calling thread with the CoreAudio thread/run-loop so that the CoreAudio graph is safe to modify and this may incur a significant stall. This means it is far more efficient to amortise the cost of all changes to the graph with a single call. To ensure correctness the audio format conversion components are cached and disposed of after the call to AUGraphUpdate so that any existing operations on the CoreAudio thread are completed prior to disposal.
Change 2781204 on 2015/11/25 by Dmitry.Rekman
Linux: use jemalloc by default if available.
- Alleviates one of the reasons for player disconnect (FORT-18048), which was machines running OOM.
#rb Bob.Tellez
#codereview Bob.Tellez, Ben.Zeigler
Change 2779398 on 2015/11/24 by Mark.Satterthwaite
Switch the default graphics API on Mac back to OpenGL, but allow Metal to run with -metal (or -metalsm5 for experimental SM5 support).
2016-01-08 19:10:43 -05:00
|
|
|
if (!IsRunningDedicatedServer())
|
2015-10-06 15:59:09 -04:00
|
|
|
{
|
|
|
|
|
static ConstructorHelpers::FObjectFinder<UFont> RobotoFontObj(TEXT("/Engine/EngineFonts/Roboto"));
|
|
|
|
|
Font_DEPRECATED = FSlateFontInfo(RobotoFontObj.Object, 12, FName("Bold"));
|
|
|
|
|
}
|
2014-04-25 00:27:08 -04:00
|
|
|
|
|
|
|
|
// Grab other defaults from slate arguments.
|
|
|
|
|
IsReadOnly = Defaults._IsReadOnly.Get();
|
2015-04-02 16:32:47 -04:00
|
|
|
IsPassword = Defaults._IsPassword.Get();
|
2014-04-25 00:27:08 -04:00
|
|
|
MinimumDesiredWidth = Defaults._MinDesiredWidth.Get();
|
|
|
|
|
IsCaretMovedWhenGainFocus = Defaults._IsCaretMovedWhenGainFocus.Get();
|
|
|
|
|
SelectAllTextWhenFocused = Defaults._SelectAllTextWhenFocused.Get();
|
|
|
|
|
RevertTextOnEscape = Defaults._RevertTextOnEscape.Get();
|
|
|
|
|
ClearKeyboardFocusOnCommit = Defaults._ClearKeyboardFocusOnCommit.Get();
|
|
|
|
|
SelectAllTextOnCommit = Defaults._SelectAllTextOnCommit.Get();
|
Copying //UE4/Dev-Editor to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2756103 on 2015/11/05 by Jamie.Dale
Implemented UFont::GetResourceSize to work correctly with the Size Map tool
Change 2756104 on 2015/11/05 by Jamie.Dale
Changed the font used when a font is missing or invalid to be the last resort font, rather than the localized fallback font
The localized fallback font could cause different results based on your culture, and the last resort font makes it clearer that something is set-up incorrectly as it just draws invalid glyph markers for all of the text.
Change 2756105 on 2015/11/05 by Jamie.Dale
Fixed a crash when using an empty FKey property with a Data Table
FKeyStructCustomization was asserting because there were no objects being edited, due to a newly added Data Table containing zero rows.
I've removed this assert, and also updated SKeySelector to no longer require a separate argument to say whether multiple keys with different values are selected (this is now calculated from the call to get the current key, which will return an empty TOptional for multiple values).
#jira UE-22897
Change 2757015 on 2015/11/06 by Joe.Tidmarsh
SSProgressBar marquee tint. Accounts for widget color and opacity.
PR #1698
Change 2757156 on 2015/11/06 by Joe.Tidmarsh
Implemented "Go to Variable" functionality for widgets in Widget Blueprint Editor.
When we switch modes in UMG from Designer to Graph. We select the variable (In "My Blueprint"), if one exists, for the currently selected widget. Additionally we update the details panel.
* Added SelectGraphActionItemByName to FBlueprintEditor. This selects an item in My Blueprint and also displays it in the details panel of graph mode. SMyBlueprint is not available to FWidgetBlueprintEditor in UMGEditor module as it's privately implemented within Kismet.
#rb Ben.Cosh
#jira UE-20170
Change 2757181 on 2015/11/06 by Jamie.Dale
Cleaned up some duplication in UMG text widgets, and exposed the text shaping options
The common properties used by all text widgets that are text layout based have been moved into a UTextLayoutWidget base class, and all text layout based widgets now derive from this.
The options needed to control the text shaping method used by a text based widget have been exposed via the FShapedTextOptions struct. This contains a way to manage these optional (and advanced) overrides. You typically wouldn't change these from the default unless you knew exactly what you were doing (eg, you have a text block containing only numbers).
This change also updates SRichTextBlock to work with an invalidation panel in the same way that STextBlock does
Change 2757734 on 2015/11/06 by David.Nikdel
#UE4 #Editor
- Added support for meta=(TitleProperty="StructPropertyNameHere") on properties of type TArray<FSomeStruct>.
- This changes the editor rolled-up display of these values from "{0} members" to a stringified version of the specified property (if found).
#CodeReview: Matt.Kuhlenschmidt
Change 2758786 on 2015/11/09 by Joe.Tidmarsh
Border widget now correctly synchronizes padding property
#jira UE-23070
Change 2758791 on 2015/11/09 by Joe.Tidmarsh
Shadow of FCanvasTextItem should be drawn before the outline color. Consulted with Bruce.N who believes this is not the intended behavior and was an oversight when refactoring FCanvas (CL 1695138)
#jira UE-21623
#1608
#rb Simon.Tovey, Bruce.Nesbit
Change 2758813 on 2015/11/09 by Joe.Tidmarsh
UMG: Attempting to parent multiple widgets (in Hierarchy tree) to a widget that can't have multiple children will notify the user and ignore the operation.
[UE-22921] [CrashReport] Parenting multiple actors under border crashes editor
#jira UE-22921
Change 2759234 on 2015/11/09 by Nick.Darnell
Slate - Improving the way we track references to materials in slate to better keep things alive until they're no longer needed for rendering. Additionally, making it so the we use the material and texture free list when possible when cleaning up things as to not allocate new memory if not required. Concidentually this can help with problems with corrupted memory on destruct as well, because it means the memory isn't really going to become garbage any more.
#codereview Matt.Kuhlenschmidt, Bob.Tellez
Change 2760954 on 2015/11/10 by Nick.Darnell
Slate - A bug in the introduction of custom rendered elements accidentally broke filling out the texture coordinates for standard material usage. Materials should once again tile correctly just like images do.
#jira UE-23118
Change 2761129 on 2015/11/10 by Nick.Darnell
Slate - Removing the Pre-Multiply alpha path the way it was added, introducing it in a way that doesn't require changes inside the shader. Continuing to improve the SRetainerWidget to no longer have a frame delay between resizes and painting, also working on getting it handle clipping correctly but still not there yet.
Change 2761391 on 2015/11/10 by Alexis.Matte
jira UE-20281 and UE-22259
Fbx scene Re-import workflow
- First draft of the reimport workflow using a reimport asset in the content browser
#codereview nick.darnell
Change 2762323 on 2015/11/11 by Alexis.Matte
fix build compilation
Change 2762407 on 2015/11/11 by Jamie.Dale
UDataTable::SaveStructData now writes out dummy data when RowStruct is null
This didn't used to happen, which would cause a miss-match between what UDataTable::LoadStructData was expecting, and would result in a Data Table that could never be loaded again.
This change also improves the error message when editing a Data Table with a null row struct, and adds the editor-only RowStructName property to cache the name of the last used struct (for error reporting).
#jira UE-22789
Change 2762508 on 2015/11/11 by Nick.Darnell
UMG - Making it more obvious what keys do special stuff with anchors in UMG. Fixing the way snapping to anchors works with Control, it now only zeros out the side you're dragging instead of the entire widget, which was silly. Enhancing the designer message system to no longer be based on an enum and instead let arbitrary systems push and pop FText messages. Fixing animations in the anchor drop down to properly animate, broke when we introduced active timers.
Change 2763241 on 2015/11/11 by Nick.Darnell
Slate - We no longer allow popup windows to be larger than the primary display window for windows where max width/height is unspecified. This is to prevent accidential creation of tooltip windows that are larger than the driver allows causing crashes.
#jira UE-20336
2015-12-12 08:54:23 -05:00
|
|
|
AllowContextMenu = Defaults._AllowContextMenu.Get();
|
2014-04-25 00:27:08 -04:00
|
|
|
}
|
|
|
|
|
|
2014-09-22 15:09:37 -04:00
|
|
|
void UEditableText::ReleaseSlateResources(bool bReleaseChildren)
|
2014-07-18 16:14:03 -04:00
|
|
|
{
|
2014-09-22 15:09:37 -04:00
|
|
|
Super::ReleaseSlateResources(bReleaseChildren);
|
2014-07-18 16:14:03 -04:00
|
|
|
|
|
|
|
|
MyEditableText.Reset();
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-25 00:27:08 -04:00
|
|
|
TSharedRef<SWidget> UEditableText::RebuildWidget()
|
|
|
|
|
{
|
2015-08-29 18:25:26 -04:00
|
|
|
MyEditableText = SNew( SEditableText )
|
|
|
|
|
.Style( &WidgetStyle )
|
|
|
|
|
.MinDesiredWidth( MinimumDesiredWidth )
|
|
|
|
|
.IsCaretMovedWhenGainFocus( IsCaretMovedWhenGainFocus )
|
|
|
|
|
.SelectAllTextWhenFocused( SelectAllTextWhenFocused )
|
|
|
|
|
.RevertTextOnEscape( RevertTextOnEscape )
|
|
|
|
|
.ClearKeyboardFocusOnCommit( ClearKeyboardFocusOnCommit )
|
|
|
|
|
.SelectAllTextOnCommit( SelectAllTextOnCommit )
|
|
|
|
|
.OnTextChanged( BIND_UOBJECT_DELEGATE( FOnTextChanged, HandleOnTextChanged ) )
|
|
|
|
|
.OnTextCommitted( BIND_UOBJECT_DELEGATE( FOnTextCommitted, HandleOnTextCommitted ) )
|
|
|
|
|
.VirtualKeyboardType( EVirtualKeyboardType::AsKeyboardType( KeyboardType.GetValue() ) );
|
2014-06-15 15:40:45 -04:00
|
|
|
|
2014-06-19 09:32:13 -04:00
|
|
|
return BuildDesignTimeWidget( MyEditableText.ToSharedRef() );
|
2014-04-30 20:35:16 -04:00
|
|
|
}
|
|
|
|
|
|
2014-08-13 17:04:49 -04:00
|
|
|
void UEditableText::SynchronizeProperties()
|
2014-06-15 15:40:45 -04:00
|
|
|
{
|
2014-08-13 17:04:49 -04:00
|
|
|
Super::SynchronizeProperties();
|
2014-06-17 18:07:17 -04:00
|
|
|
|
2014-08-11 17:26:34 -04:00
|
|
|
TAttribute<FText> TextBinding = OPTIONAL_BINDING(FText, Text);
|
|
|
|
|
TAttribute<FText> HintTextBinding = OPTIONAL_BINDING(FText, HintText);
|
|
|
|
|
|
|
|
|
|
MyEditableText->SetText(TextBinding);
|
|
|
|
|
MyEditableText->SetHintText(HintTextBinding);
|
2014-06-15 15:40:45 -04:00
|
|
|
MyEditableText->SetIsReadOnly(IsReadOnly);
|
|
|
|
|
MyEditableText->SetIsPassword(IsPassword);
|
Copying //UE4/Dev-Editor to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2756103 on 2015/11/05 by Jamie.Dale
Implemented UFont::GetResourceSize to work correctly with the Size Map tool
Change 2756104 on 2015/11/05 by Jamie.Dale
Changed the font used when a font is missing or invalid to be the last resort font, rather than the localized fallback font
The localized fallback font could cause different results based on your culture, and the last resort font makes it clearer that something is set-up incorrectly as it just draws invalid glyph markers for all of the text.
Change 2756105 on 2015/11/05 by Jamie.Dale
Fixed a crash when using an empty FKey property with a Data Table
FKeyStructCustomization was asserting because there were no objects being edited, due to a newly added Data Table containing zero rows.
I've removed this assert, and also updated SKeySelector to no longer require a separate argument to say whether multiple keys with different values are selected (this is now calculated from the call to get the current key, which will return an empty TOptional for multiple values).
#jira UE-22897
Change 2757015 on 2015/11/06 by Joe.Tidmarsh
SSProgressBar marquee tint. Accounts for widget color and opacity.
PR #1698
Change 2757156 on 2015/11/06 by Joe.Tidmarsh
Implemented "Go to Variable" functionality for widgets in Widget Blueprint Editor.
When we switch modes in UMG from Designer to Graph. We select the variable (In "My Blueprint"), if one exists, for the currently selected widget. Additionally we update the details panel.
* Added SelectGraphActionItemByName to FBlueprintEditor. This selects an item in My Blueprint and also displays it in the details panel of graph mode. SMyBlueprint is not available to FWidgetBlueprintEditor in UMGEditor module as it's privately implemented within Kismet.
#rb Ben.Cosh
#jira UE-20170
Change 2757181 on 2015/11/06 by Jamie.Dale
Cleaned up some duplication in UMG text widgets, and exposed the text shaping options
The common properties used by all text widgets that are text layout based have been moved into a UTextLayoutWidget base class, and all text layout based widgets now derive from this.
The options needed to control the text shaping method used by a text based widget have been exposed via the FShapedTextOptions struct. This contains a way to manage these optional (and advanced) overrides. You typically wouldn't change these from the default unless you knew exactly what you were doing (eg, you have a text block containing only numbers).
This change also updates SRichTextBlock to work with an invalidation panel in the same way that STextBlock does
Change 2757734 on 2015/11/06 by David.Nikdel
#UE4 #Editor
- Added support for meta=(TitleProperty="StructPropertyNameHere") on properties of type TArray<FSomeStruct>.
- This changes the editor rolled-up display of these values from "{0} members" to a stringified version of the specified property (if found).
#CodeReview: Matt.Kuhlenschmidt
Change 2758786 on 2015/11/09 by Joe.Tidmarsh
Border widget now correctly synchronizes padding property
#jira UE-23070
Change 2758791 on 2015/11/09 by Joe.Tidmarsh
Shadow of FCanvasTextItem should be drawn before the outline color. Consulted with Bruce.N who believes this is not the intended behavior and was an oversight when refactoring FCanvas (CL 1695138)
#jira UE-21623
#1608
#rb Simon.Tovey, Bruce.Nesbit
Change 2758813 on 2015/11/09 by Joe.Tidmarsh
UMG: Attempting to parent multiple widgets (in Hierarchy tree) to a widget that can't have multiple children will notify the user and ignore the operation.
[UE-22921] [CrashReport] Parenting multiple actors under border crashes editor
#jira UE-22921
Change 2759234 on 2015/11/09 by Nick.Darnell
Slate - Improving the way we track references to materials in slate to better keep things alive until they're no longer needed for rendering. Additionally, making it so the we use the material and texture free list when possible when cleaning up things as to not allocate new memory if not required. Concidentually this can help with problems with corrupted memory on destruct as well, because it means the memory isn't really going to become garbage any more.
#codereview Matt.Kuhlenschmidt, Bob.Tellez
Change 2760954 on 2015/11/10 by Nick.Darnell
Slate - A bug in the introduction of custom rendered elements accidentally broke filling out the texture coordinates for standard material usage. Materials should once again tile correctly just like images do.
#jira UE-23118
Change 2761129 on 2015/11/10 by Nick.Darnell
Slate - Removing the Pre-Multiply alpha path the way it was added, introducing it in a way that doesn't require changes inside the shader. Continuing to improve the SRetainerWidget to no longer have a frame delay between resizes and painting, also working on getting it handle clipping correctly but still not there yet.
Change 2761391 on 2015/11/10 by Alexis.Matte
jira UE-20281 and UE-22259
Fbx scene Re-import workflow
- First draft of the reimport workflow using a reimport asset in the content browser
#codereview nick.darnell
Change 2762323 on 2015/11/11 by Alexis.Matte
fix build compilation
Change 2762407 on 2015/11/11 by Jamie.Dale
UDataTable::SaveStructData now writes out dummy data when RowStruct is null
This didn't used to happen, which would cause a miss-match between what UDataTable::LoadStructData was expecting, and would result in a Data Table that could never be loaded again.
This change also improves the error message when editing a Data Table with a null row struct, and adds the editor-only RowStructName property to cache the name of the last used struct (for error reporting).
#jira UE-22789
Change 2762508 on 2015/11/11 by Nick.Darnell
UMG - Making it more obvious what keys do special stuff with anchors in UMG. Fixing the way snapping to anchors works with Control, it now only zeros out the side you're dragging instead of the entire widget, which was silly. Enhancing the designer message system to no longer be based on an enum and instead let arbitrary systems push and pop FText messages. Fixing animations in the anchor drop down to properly animate, broke when we introduced active timers.
Change 2763241 on 2015/11/11 by Nick.Darnell
Slate - We no longer allow popup windows to be larger than the primary display window for windows where max width/height is unspecified. This is to prevent accidential creation of tooltip windows that are larger than the driver allows causing crashes.
#jira UE-20336
2015-12-12 08:54:23 -05:00
|
|
|
MyEditableText->SetAllowContextMenu(AllowContextMenu);
|
2014-06-16 11:45:50 -04:00
|
|
|
// TODO UMG Complete making all properties settable on SEditableText
|
Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2888098 on 3/1/2016 by Nick.Darnell
Adding back the SetWidgetToFocusOnActivate call and deprecating it. Will need to also do this in 4.11.
#lockdown Nick.Penwarden
Change 2851669 on 2016/02/01 by Alexis.Matte
#jira UE-25928
Skeletal mesh import now support _skinXX that are not sequential.
Static mesh was already supporting non sequential _skinxx ordering
#codereview nick.darnell
Change 2851672 on 2016/02/01 by Alexis.Matte
#jira UE-25971
The proxy camera mesh is now properly reset to zero
#codereview nick.darnell
Change 2851675 on 2016/02/01 by Alexis.Matte
#jira UE-25525
Update the tooltips
#codereview nick.darnell
Change 2851764 on 2016/02/01 by Alexis.Matte
#jira UE-25595
The fbx plus and minus icons are now brighter
#codereview nick.darnell
Change 2852116 on 2016/02/01 by Bob.Tellez
#UE4 Submitting pull request 2013 from GitHub (Pull request 2013). Thanks for the fix hoelzl!
Fix file selection when reimporting curve from moved CSV file
When reimporting a data curve after moving the CSV file from which it was generated, the file selection dialog does not present an option to select CVS files. This patch fixes the issue by assigning the correct 'SupportedClass' value for `UReimportCurveFactory` instances.
#codereview Nick.Darnell
#JIRA UE-26247
#2013
Change 2852375 on 2016/02/02 by Richard.TalbotWatkin
Spline component improvements: added facility to not restore component instance cache after the construction script has run, so the points can act as inputs to the construction script. Created a new property bInputSplinePointsToConstructionScript for that. Added SetUpVectorAtSplinePoint, and corrected some bugs.
#jira UE-24931 - Set Location at Spline Point doesn't do anything
Change 2852726 on 2016/02/02 by Richard.TalbotWatkin
Fixed FPropertyChangedEvent::GetArrayIndex when called from PostEditChangeProperty.
#jira UE-25316 - PropertyChangedEvent.GetArrayIndex broken
#codereview Robert.Manuszewski
Change 2853152 on 2016/02/02 by Jamie.Dale
Fixed multi-line editable texts not updating their font when changed in UMG
Also made all the SetStyle functions use the default if they're passed null (to match SEditableTextBox), and tidied up some of the property panel layout when editing styles.
#codereview Chris.Wood
Change 2853220 on 2016/02/02 by Alexis.Matte
#jira UE-26303
We now apply the scene option transform to the vertex of meshes instead of the root node of the scene. This allow re-alignment of the mesh to go with animation.
#codereview nick.darnell
Change 2853282 on 2016/02/02 by Alexis.Matte
Back out changelist 2853220
Change 2854211 on 2016/02/03 by Nick.Darnell
Widget Reflector - Limit the minimum scale that can be applied to something more reasonable 50%, instead of 10%.
Change 2854216 on 2016/02/03 by Nick.Darnell
Scene Viewport - The scene viewport handles application scale better now, allowing click locations to be interepreted correctly and transformed into pixel hit location, rather than local space widget location, which may not match.
Change 2854220 on 2016/02/03 by Nick.Darnell
Slate - Allowing mousewheel or gesture to be routed directly for a widget path like has been done for other mouse events, this permits more kinds of mouse like actions in a VR environment onto widgets in the scene. (not actually hooked up to do it, but this now permits it at the slate level to be done correctly).
Change 2854449 on 2016/02/03 by Alexis.Matte
-Fix the fbx import options, for the scene transform value that was not apply correctly
-Add an inspector on the scene import option in the reimport dialog
Change 2855659 on 2016/02/04 by Alexis.Matte
-Fix the bake pivot when there is a hierarchy, we now accumulate the pivot effect in the hierarchy to place the object at the correct place.
#codereview nick.darnell
Change 2855922 on 2016/02/04 by Alexis.Matte
#jira UE-26303
The animation is now align with the imported skeletal mesh, the bakepivot is also supported
#codereview nick.darnell
Change 2856989 on 2016/02/05 by Jamie.Dale
Some improvements to the source code loc gatherer
* We now strip any comments out of any pre-processor tokens before we start handling them.
* Fixed a case where "#if defined" and "#elif defined" would parse incorrectly.
* Fixed a case where "#define LOCTEXT_NAMESPACE" and "#define LOC_DEFINE_REGION" may not be paired correctly with their corresponding "#undef".
[CL 2888106 by Nick Darnell in Main branch]
2016-03-01 15:17:24 -05:00
|
|
|
|
|
|
|
|
ShapedTextOptions.SynchronizeShapedTextProperties(*MyEditableText);
|
2014-06-15 15:40:45 -04:00
|
|
|
}
|
2014-04-30 20:35:16 -04:00
|
|
|
|
2014-06-17 18:07:17 -04:00
|
|
|
FText UEditableText::GetText() const
|
|
|
|
|
{
|
|
|
|
|
if ( MyEditableText.IsValid() )
|
|
|
|
|
{
|
|
|
|
|
return MyEditableText->GetText();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Text;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UEditableText::SetText(FText InText)
|
|
|
|
|
{
|
|
|
|
|
Text = InText;
|
|
|
|
|
if ( MyEditableText.IsValid() )
|
|
|
|
|
{
|
|
|
|
|
MyEditableText->SetText(Text);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-10 17:24:30 -04:00
|
|
|
void UEditableText::SetIsPassword(bool InbIsPassword)
|
|
|
|
|
{
|
|
|
|
|
IsPassword = InbIsPassword;
|
|
|
|
|
if ( MyEditableText.IsValid() )
|
|
|
|
|
{
|
|
|
|
|
MyEditableText->SetIsPassword(IsPassword);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UEditableText::SetHintText(FText InHintText)
|
|
|
|
|
{
|
|
|
|
|
HintText = InHintText;
|
|
|
|
|
if ( MyEditableText.IsValid() )
|
|
|
|
|
{
|
|
|
|
|
MyEditableText->SetHintText(HintText);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UEditableText::SetIsReadOnly(bool InbIsReadyOnly)
|
|
|
|
|
{
|
|
|
|
|
IsReadOnly = InbIsReadyOnly;
|
|
|
|
|
if ( MyEditableText.IsValid() )
|
|
|
|
|
{
|
|
|
|
|
MyEditableText->SetIsReadOnly(IsReadOnly);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-03-04 17:45:56 -05:00
|
|
|
void UEditableText::HandleOnTextChanged(const FText& InText)
|
2014-04-25 10:09:30 -04:00
|
|
|
{
|
2015-03-04 17:45:56 -05:00
|
|
|
OnTextChanged.Broadcast(InText);
|
2014-04-25 00:27:08 -04:00
|
|
|
}
|
|
|
|
|
|
2015-03-04 17:45:56 -05:00
|
|
|
void UEditableText::HandleOnTextCommitted(const FText& InText, ETextCommit::Type CommitMethod)
|
2014-04-30 20:35:16 -04:00
|
|
|
{
|
2015-03-04 17:45:56 -05:00
|
|
|
OnTextCommitted.Broadcast(InText, CommitMethod);
|
2014-04-30 20:35:16 -04:00
|
|
|
}
|
|
|
|
|
|
2014-09-10 17:24:30 -04:00
|
|
|
void UEditableText::PostLoad()
|
|
|
|
|
{
|
|
|
|
|
Super::PostLoad();
|
|
|
|
|
|
|
|
|
|
if ( GetLinkerUE4Version() < VER_UE4_DEPRECATE_UMG_STYLE_ASSETS )
|
|
|
|
|
{
|
|
|
|
|
if ( Style_DEPRECATED != nullptr )
|
|
|
|
|
{
|
|
|
|
|
const FEditableTextStyle* StylePtr = Style_DEPRECATED->GetStyle<FEditableTextStyle>();
|
|
|
|
|
if ( StylePtr != nullptr )
|
|
|
|
|
{
|
2014-09-11 09:13:48 -04:00
|
|
|
WidgetStyle = *StylePtr;
|
2014-09-10 17:24:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Style_DEPRECATED = nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( BackgroundImageSelected_DEPRECATED != nullptr )
|
|
|
|
|
{
|
2014-09-11 09:13:48 -04:00
|
|
|
WidgetStyle.BackgroundImageSelected = BackgroundImageSelected_DEPRECATED->Brush;
|
2014-09-10 17:24:30 -04:00
|
|
|
BackgroundImageSelected_DEPRECATED = nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( BackgroundImageComposing_DEPRECATED != nullptr )
|
|
|
|
|
{
|
2014-09-11 09:13:48 -04:00
|
|
|
WidgetStyle.BackgroundImageComposing = BackgroundImageComposing_DEPRECATED->Brush;
|
2014-09-10 17:24:30 -04:00
|
|
|
BackgroundImageComposing_DEPRECATED = nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( CaretImage_DEPRECATED != nullptr )
|
|
|
|
|
{
|
2014-09-11 09:13:48 -04:00
|
|
|
WidgetStyle.CaretImage = CaretImage_DEPRECATED->Brush;
|
2014-09-10 17:24:30 -04:00
|
|
|
CaretImage_DEPRECATED = nullptr;
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-06-16 07:21:32 -04:00
|
|
|
|
|
|
|
|
if (GetLinkerUE4Version() < VER_UE4_DEPRECATE_UMG_STYLE_OVERRIDES)
|
|
|
|
|
{
|
|
|
|
|
if (Font_DEPRECATED.HasValidFont())
|
|
|
|
|
{
|
|
|
|
|
WidgetStyle.Font = Font_DEPRECATED;
|
|
|
|
|
Font_DEPRECATED = FSlateFontInfo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ColorAndOpacity_DEPRECATED != FLinearColor::Black)
|
|
|
|
|
{
|
|
|
|
|
WidgetStyle.ColorAndOpacity = ColorAndOpacity_DEPRECATED;
|
|
|
|
|
ColorAndOpacity_DEPRECATED = FLinearColor::Black;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-09-10 17:24:30 -04:00
|
|
|
}
|
|
|
|
|
|
2014-06-19 11:42:48 -04:00
|
|
|
#if WITH_EDITOR
|
|
|
|
|
|
2014-09-15 11:21:09 -04:00
|
|
|
const FText UEditableText::GetPaletteCategory()
|
2014-09-03 12:32:27 -04:00
|
|
|
{
|
|
|
|
|
return LOCTEXT("Primitive", "Primitive");
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-19 11:42:48 -04:00
|
|
|
#endif
|
|
|
|
|
|
2014-04-25 00:27:08 -04:00
|
|
|
/////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|