Commit Graph

57 Commits

Author SHA1 Message Date
Joe Conley
f73acb7852 Translation Picker:
- Improve picking of text in slate widgets that are hittest invisible by searching recursively all children of the deepest widget returned by the hittest.
- Added scrolling support to accomodate the large number of texts this may return as a result in some cases.
- Changes in the layout to make fields easier to read.

[CL 2518631 by Joe Conley in Main branch]
2015-04-20 21:16:03 -04:00
Saul Abreu
901042c9ac Massive cleanup of text localization code and its uses. REVIEW API CHANGES FOR RELEASE NOTES.
[CL 2514827 by Saul Abreu in Main branch]
2015-04-16 15:39:05 -04:00
PaulEremeeff
c9a246101e PR #1013: Fixing PVS-Studio warnings. (Contributed by PaulEremeeff)
Some files have been omitted and will be submitted with modified corrections

[CL 2505544 by Dan Oconnor in Main branch]
2015-04-08 14:46:25 -04:00
Joe Conley
3f5ee6d36a FText: Method to retrieve source FTexts from FText::Format history. Used in the translation picker currently.
TranslationPicker: Improving layout to be more useful for multi-line text, and to show text with no localization information in a more concise fashion.

[CL 2500946 by Joe Conley in Main branch]
2015-04-03 05:06:51 -04:00
Mike Fricker
114458bf0f Clang warning fixes: Fixed missing 'override' specifiers
- Also removed some unreferenced functions that adding 'override' revealed

PR #1002 -- Thank you, Omar007!

[CL 2498415 by Mike Fricker in Main branch]
2015-04-01 07:20:55 -04:00
Joe Conley
d9adeb10e4 Translation Editor:
- When saving, if source control is disabled, try write the file anyway.
- Remove the blank icons from the tabs, at least until we get proper icons.

[CL 2482858 by Joe Conley in Main branch]
2015-03-18 06:03:00 -04:00
Marc Audy
a425eba9ed Unify Slate's FInputGesture and Engine's FInputChord as FInputChord defined in Slate
[CL 2481648 by Marc Audy in Main branch]
2015-03-17 11:36:28 -04:00
Jaroslaw Palczynski
28fc7695a0 Missing chages for 2481343.
Some P4V problem with backing out large changelist missed some files.

#codereview Robert.Manuszewski

[CL 2481366 by Jaroslaw Palczynski in Main branch]
2015-03-17 06:17:32 -04:00
Jaroslaw Palczynski
f23f29257b Back out changelist 2481333
Rob asked me to back out GENERATED_*_BODY -> GENERATED_BODY change for now until the "_Validate and _Implementation auto-generation" discussion is over.

#codereview Robert.Manuszewski

[CL 2481343 by Jaroslaw Palczynski in Main branch]
2015-03-17 05:38:32 -04:00
Jaroslaw Palczynski
fa31560e2d Enabled UHT to digest GENERATED_BODY instead of GENERATED_UCLASS_BODY, GENERATED_USTRUCT_BODY, GENERATED_UINTERFACE_BODY or GENERATED_IINTERFACE_BODY, changed every occurence to the new syntax and fixed every warning that have fallen out of this change.
#codereview Robert.Manuszewski

[CL 2481333 by Jaroslaw Palczynski in Main branch]
2015-03-17 05:19:11 -04:00
Marc Audy
79f610442c Fix shadowed variables
[CL 2467803 by Marc Audy in Main branch]
2015-03-03 12:30:55 -05:00
Joe Conley
735785d0ed Translation Picker improvements:
- Make the floating preview not overlap tooltips by putting it on the left side of the cursor
- Implemented "save all" button
- Other small fixes

[CL 2452981 by Joe Conley in Main branch]
2015-02-20 04:41:22 -05:00
Joe Conley
ef4922e537 Translation Picker improvements:
- Can now start the translation picker from the main Window menu in the editor
- Disable "save" button for text that we can't find the manifest/archive data for
- Hover window now presents the information about an FText in a more readable format
- Fixed issue where the same FText info was not displayed twice in certain cases

[CL 2452676 by Joe Conley in Main branch]
2015-02-19 20:53:05 -05:00
Jamie Dale
bbb0624bff Fixed code relying on SLATE_TEXT_ATTRIBUTE for tooltips.
UETOOL-213 - Minimize Slate FString -> FText conversion (remove SLATE_TEXT_ATTRIBUTE)

This fixes any editor/engine specific code that was passing text to Slate as FString rather than FText.

[CL 2401019 by Jamie Dale in Main branch]
2015-01-08 11:35:01 -05:00
Dan Hertzka
c042ddcb94 ---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.

While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
    1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
        - Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
    2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.

- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
    - Examples include animation, async operations that update periodically, progress updates, loading bars, etc.

- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.

- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
    - There are THREE ways to unregister an active tick:
        1. Return EActiveTickReturnType::StopTicking from the active tick function
        2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
        3. Destroy the widget responsible for the active tick

- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
    - The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)

- The FCurveSequence API has been updated to work with the active tick system
    - Playing a curve sequence now requires that you pass the widget being animated by the sequence
    - The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
    - GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.

[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
Joe Conley
f668e94179 Translation Editor: Keep track of open translation editors and prevent the accidental simultaneous edit of the same archive in multiple editors.
[CL 2390882 by Joe Conley in Main branch]
2014-12-17 02:55:20 -05:00
Nick Darnell
90e793745c Slate - ESlateCheckBoxState has been renamed to ECheckBoxState.
[CL 2384008 by Nick Darnell in Main branch]
2014-12-10 14:24:09 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Ben Marsh
959cfa782d Add missing copyright notices to source files.
[CL 2379212 by Ben Marsh in Main branch]
2014-12-06 19:14:20 -05:00
Joe Conley
fe95a6969b Translation Editor changes:
- Translation picker mode that allows you to click on text in the Editor UI and translate it in place
- No longer loads history on startup, can press the "Get History" button in the History tab to retrieve history on demand

[CL 2363086 by Joe Conley in Main branch]
2014-11-18 03:20:09 -05:00
Chris Gagnon
0e6d657c3d Refactor to unify keyboard and controller input and focus.
Native controller navigation support.

[CL 2345039 by Chris Gagnon in Main branch]
2014-10-30 12:29:36 -04:00
Jamie Dale
f7430ac704 Initial support for composite fonts for Slate, UMG, and Canvas
Slate now has the concept of composite fonts and font families (via FCompositeFont and FTypeface). A composite font is a font that contains a default font family, as well as any number of sub-font families which should be used for a given set of character ranges. This change will greatly improve the localization support for fonts.

UFont assets can now use two forms of caching "offline" (which is the way they have always worked historically), and "runtime" (which utilizes the Slate font cache to cache glyphs on demand). These runtime cached UFont assets are now the only way to specify which font to use for a UMG widget, and address the previous issues about ensuring that the required font files were staged for your game.

The Slate font cache now works on FFontData instances, rather than filenames. This allows the UFont asset to embed a blob of TTF or OTF font data inside it, rather than require the fonts be loaded from files on disk.

The Canvas text renderer has been updated to support runtime cached UFont assets. This gives our legacy Canvas based tools the same improved font localization support as the rest of the Slate-based editor UI.

UFont asset creation has been changed to use runtime caching by default, and additionally, you can now import a TTF or OTF file via the Content Browser and it will automatically create a UFont asset. If you still want an offline cached UFont asset, you can just change the cache type in the font editor, and the usual font picker dialog will appear and allow you to generate a font texture atlas.

[CL 2342203 by Jamie Dale in Main branch]
2014-10-28 09:02:03 -04:00
Dan Hertzka
2ab1556645 Adjusted access to the LocalWorkspaceMenuRoot within FTabManager - GetLocalWorkspaceRoot() now returns a const and provides methods to expose adding a category and clearing categories
#codereview nick.atamas

[CL 2338925 by Dan Hertzka in Main branch]
2014-10-23 15:11:28 -04:00
Joe Conley
5198266199 Translation Editor: Initial work for a "Translation picker." In current state when enabled, hover over FText in the editor and it will show you the information about that text and any tooltips. Shows Key, Namespace, Source, Translation and Table Name. Works for many strings, some still fail to be looked up in the Localization tables, will continue investigating.
[CL 2336834 by Joe Conley in Main branch]
2014-10-22 00:21:55 -04:00
Wes Hunt
31e2bb00ac Removed a bunch of stuff from Slate standard include, created SlateBasics.h
* Moved Slate.h into SlateBasics.h and began shifting less commonly used headers into SlateExtras.h.
* Slate.h now simply includes SlateBasics.h and SlateExtras.h.
* Slate.h includes a deprecated warning now to indicate that SlateBasics.h + specific includes should be used instead.
* Moved dozens of inlined functions using Slate widgets into .cpp files to avoid header dependencies.
* All code samples now include SlateBasics.h and SlateExtras.h so future shifts will not break most those projects, but not trigger the deprecation warning of including Slate.h.
#BUN

[CL 2329610 by Wes Hunt in Main branch]
2014-10-14 22:50:06 -04:00