Files
UnrealEngineUWP/Engine/Source/Runtime/Slate/Private/Framework/Text/RunUtils.cpp

31 lines
970 B
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
Merging //UE4/Release-4.11 to //UE4/Main (up to CL#2835147) ========================== MAJOR FEATURES + CHANGES ========================== Change 2817214 on 2016/01/06 by mason.seay Adjusted Walkable Slope Override for mesh #jira UE-24473 Change 2817384 on 2016/01/06 by Michael.Schoell Crash fix when selecting a variable node for a variable that is not owned by a Blueprint. #jira UE-24958 - Crash when getting the sequence player in level blueprint Change 2817438 on 2016/01/06 by Max.Chen Sequencer: Add option to specify position of material name from the movie scene capture interface. For example, MovieCapture_{material}_{width}x{height}.{frame} will create files like this: MovieCapture_FinalImage_1920x1080.0010.exr #rb Andrew.Rodham #jira UE-24926 Change 2817459 on 2016/01/06 by Marc.Audy PR #1679: Move MinRespawnDelay to virtual method AController::GetMinRespawnDelay() (Contributed by bozaro) #jira UE-22309 Change 2817472 on 2016/01/06 by Ben.Marsh Always run UHT in unattended mode from UBT; we don't want it opening any dialogs. Match3 is currently missing a plugin, and it's causing builds to time out. Change 2817473 on 2016/01/06 by Marc.Audy PR #1644: Improve "SpawnActor failed because the spawned actor IsPendingKill" error message (Contributed by slonopotamus) #jira UE-21911 Change 2817533 on 2016/01/06 by Lauren.Ridge Fixing Match3 not compiling in Debug (removed two checks on TileLibrary) #jira UE-25004 Change 2817625 on 2016/01/06 by Taizyd.Korambayil #jira UE-19659 Reimported Template Animations with Proper Skeletons Change 2817647 on 2016/01/06 by Lukasz.Furman replaced ensure during initialization of blackboard based behavior tree task with log warning #ue4 #jira UE-24448 #rb Mieszko.Zielinski Change 2817648 on 2016/01/06 by Lukasz.Furman fixed broken rendering component of navmesh actor after delete-undo operation #ue4 #jira UE-24446 #rb Mieszko.Zielinski Change 2817688 on 2016/01/06 by Taizyd.Korambayil #jira UE-22347 Fixed Message Warnings on Startup Change 2817815 on 2016/01/06 by Jamie.Dale Multiple fixes when editing right-to-left text - Text is now shaped over the entire line to allow rich-text and selected text to be shaped correctly across block boundaries. - Text layout highlights are now able to correctly handle bi-directional and right-to-left text. - Text picking can now handle bi-directional and right-to-left text. - Text picking can now pick the individual characters that make up a ligature glyph. - The caret now draws on the logical (rather than visual) side of the glyph (to handle right-to-left text). - Glyph clusters (multiple glyphs produced from a single character) are now treated as a single logical glyph. - Optimized some of the FShapedGlyphSequence to allow an early out once they've found and processed the start and end glyphs. #jira UE-25013 Change 2817828 on 2016/01/06 by Nick.Darnell Editor - Fixing the OpenLauncher call to be take a structure to allow us to customize it more, and to properly handle the silent command the way we're planning to handle it in the launcher. #jira UE-24563 Change 2818052 on 2016/01/06 by Nick.Darnell Editor - Adding another application check for the launcher to catch the current app name on mac. #jira UE-24563 Change 2818149 on 2016/01/06 by Taizyd.Korambayil #jira UE-19097 Adjusted FirstPerson Pawn, so that Camera doesnt clip the Arm Mesh Change 2818360 on 2016/01/06 by Chris.Babcock Fix reading from ini sections not cached after build system changes for 4.11 #jira UE-25027 #ue4 #android Change 2818369 on 2016/01/06 by Ryan.Vance #jira UE-24976 Adding tessellation support to instanced stereo Change 2818999 on 2016/01/07 by Robert.Manuszewski UHT will no longer try to load game-only plugins. #jira UE-25032 - Changed module type RuntimeNoProgram to RuntimeAndProgram so that bu default Runtime plugin modules won't be loaded by programs - Added better error message when UHT's PreInit fails Change 2819064 on 2016/01/07 by Richard.Hinckley #jira UE-24694 Fixing array usage in 4.11 stream. Change 2819067 on 2016/01/07 by Ori.Cohen When editor tries to spawn a physics asset we automatically load the needed skeletal mesh #rb Matt.K #JIRA UE-24165
2016-01-22 08:13:18 -05: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 "Framework/Text/RunUtils.h"
#include "Framework/Text/TextHitPoint.h"
Merging //UE4/Release-4.11 to //UE4/Main (up to CL#2835147) ========================== MAJOR FEATURES + CHANGES ========================== Change 2817214 on 2016/01/06 by mason.seay Adjusted Walkable Slope Override for mesh #jira UE-24473 Change 2817384 on 2016/01/06 by Michael.Schoell Crash fix when selecting a variable node for a variable that is not owned by a Blueprint. #jira UE-24958 - Crash when getting the sequence player in level blueprint Change 2817438 on 2016/01/06 by Max.Chen Sequencer: Add option to specify position of material name from the movie scene capture interface. For example, MovieCapture_{material}_{width}x{height}.{frame} will create files like this: MovieCapture_FinalImage_1920x1080.0010.exr #rb Andrew.Rodham #jira UE-24926 Change 2817459 on 2016/01/06 by Marc.Audy PR #1679: Move MinRespawnDelay to virtual method AController::GetMinRespawnDelay() (Contributed by bozaro) #jira UE-22309 Change 2817472 on 2016/01/06 by Ben.Marsh Always run UHT in unattended mode from UBT; we don't want it opening any dialogs. Match3 is currently missing a plugin, and it's causing builds to time out. Change 2817473 on 2016/01/06 by Marc.Audy PR #1644: Improve "SpawnActor failed because the spawned actor IsPendingKill" error message (Contributed by slonopotamus) #jira UE-21911 Change 2817533 on 2016/01/06 by Lauren.Ridge Fixing Match3 not compiling in Debug (removed two checks on TileLibrary) #jira UE-25004 Change 2817625 on 2016/01/06 by Taizyd.Korambayil #jira UE-19659 Reimported Template Animations with Proper Skeletons Change 2817647 on 2016/01/06 by Lukasz.Furman replaced ensure during initialization of blackboard based behavior tree task with log warning #ue4 #jira UE-24448 #rb Mieszko.Zielinski Change 2817648 on 2016/01/06 by Lukasz.Furman fixed broken rendering component of navmesh actor after delete-undo operation #ue4 #jira UE-24446 #rb Mieszko.Zielinski Change 2817688 on 2016/01/06 by Taizyd.Korambayil #jira UE-22347 Fixed Message Warnings on Startup Change 2817815 on 2016/01/06 by Jamie.Dale Multiple fixes when editing right-to-left text - Text is now shaped over the entire line to allow rich-text and selected text to be shaped correctly across block boundaries. - Text layout highlights are now able to correctly handle bi-directional and right-to-left text. - Text picking can now handle bi-directional and right-to-left text. - Text picking can now pick the individual characters that make up a ligature glyph. - The caret now draws on the logical (rather than visual) side of the glyph (to handle right-to-left text). - Glyph clusters (multiple glyphs produced from a single character) are now treated as a single logical glyph. - Optimized some of the FShapedGlyphSequence to allow an early out once they've found and processed the start and end glyphs. #jira UE-25013 Change 2817828 on 2016/01/06 by Nick.Darnell Editor - Fixing the OpenLauncher call to be take a structure to allow us to customize it more, and to properly handle the silent command the way we're planning to handle it in the launcher. #jira UE-24563 Change 2818052 on 2016/01/06 by Nick.Darnell Editor - Adding another application check for the launcher to catch the current app name on mac. #jira UE-24563 Change 2818149 on 2016/01/06 by Taizyd.Korambayil #jira UE-19097 Adjusted FirstPerson Pawn, so that Camera doesnt clip the Arm Mesh Change 2818360 on 2016/01/06 by Chris.Babcock Fix reading from ini sections not cached after build system changes for 4.11 #jira UE-25027 #ue4 #android Change 2818369 on 2016/01/06 by Ryan.Vance #jira UE-24976 Adding tessellation support to instanced stereo Change 2818999 on 2016/01/07 by Robert.Manuszewski UHT will no longer try to load game-only plugins. #jira UE-25032 - Changed module type RuntimeNoProgram to RuntimeAndProgram so that bu default Runtime plugin modules won't be loaded by programs - Added better error message when UHT's PreInit fails Change 2819064 on 2016/01/07 by Richard.Hinckley #jira UE-24694 Fixing array usage in 4.11 stream. Change 2819067 on 2016/01/07 by Ori.Cohen When editor tries to spawn a physics asset we automatically load the needed skeletal mesh #rb Matt.K #JIRA UE-24165
2016-01-22 08:13:18 -05:00
ETextHitPoint RunUtils::CalculateTextHitPoint(const int32 InIndex, const FTextRange& InTextRange, const TextBiDi::ETextDirection InTextDirection)
{
//if (InTextDirection == TextBiDi::ETextDirection::LeftToRight)
{
return (InIndex == InTextRange.EndIndex) ? ETextHitPoint::RightGutter : ETextHitPoint::WithinText;
}
/*
else
{
return (InIndex == InTextRange.BeginIndex) ? ETextHitPoint::RightGutter : ETextHitPoint::WithinText;
}
*/
}
FTextRange RunUtils::CalculateOffsetMeasureRange(const int32 InOffset, const FTextRange& InTextRange, const TextBiDi::ETextDirection InTextDirection)
{
if (InTextDirection == TextBiDi::ETextDirection::LeftToRight)
{
return FTextRange(InTextRange.BeginIndex, InTextRange.BeginIndex + InOffset);
}
else
{
return FTextRange(InTextRange.BeginIndex + InOffset, InTextRange.EndIndex);
}
}