Commit Graph

1531 Commits

Author SHA1 Message Date
yohann dossantos
a6a87046e9 Fix regression on flow direction inheritence when using cvar GSlateFlowDirectionShouldFollowCultureByDefault (was ignored), introduced when fixing another flow issue in CL 23445460
#jira UE-191009
#test Did repro steps from the associated UDN, and from the UDN associated to the CL that introduced the regression. Both are fixed.

[CL 26571478 by yohann dossantos in 5.3 branch]
2023-07-25 09:28:12 -04:00
evgenii babinets
d4aab061e0 Fixed SlateTextureAtlas creating free nodes in the empty slot list that have dimensions smaller than what we feasibly expect can be used by glyphs.
The code presently creates two nodes as long as one of them exceeds the minimum dimension, which in practice this has resulted in us eventually having to iterate over 94+ useless elements every time we're adding a glyph. We should only create the smaller node if it exceeds the minimum.

[CL 26414944 by evgenii babinets in 5.3 branch]
2023-07-17 15:30:29 -04:00
jamie dale
02b747b262 Added a category type that can be used with FMessageDialog to control the icon used by the in-editor dialog
Note: This doesn't impact any OS specific dialogs

Breaking: FCoreDelegates::ModalErrorMessage is now called FCoreDelegates::ModalMessageDialog and takes an extra EAppMsgCategory argument

#jira
#rb Dave.Belanger

[CL 26322797 by jamie dale in 5.3 branch]
2023-06-29 14:55:10 -04:00
daren cheng
1246b391da Avoid Text Style copies occuring each frame, expensive due to atomics.
#rb Vincent.Gauthier

[CL 26301850 by daren cheng in 5.3 branch]
2023-06-28 18:50:16 -04:00
daren cheng
8e0108e213 Avoid element stats on empty sets.
#rb trivial

[CL 26301849 by daren cheng in 5.3 branch]
2023-06-28 18:50:11 -04:00
daren cheng
8c3a2784f8 Remove inline breaking nonunity on android
#rb trivial
#jira UE-186900

[CL 26199881 by daren cheng in 5.3 branch]
2023-06-22 19:52:41 -04:00
daren cheng
3a0c22a772 Remove payload indirection on slate elements.
Yields better cache coherency and measured better performance

#jira UE-186900
#rb patrick.boutot

[CL 26191750 by daren cheng in 5.3 branch]
2023-06-22 15:50:25 -04:00
steve robb
4651bc9ba7 Added move semantics to TSlotBase::operator[] declarative syntax.
Removed a reference counting workaround that was added in CL# 3718295 for an issue that was fixed in CL# 3718782.
Removed unnecessary reference count churn from TDecl, and thus every SNew call.

#rb partick.boutot

[CL 26088858 by steve robb in 5.3 branch]
2023-06-19 09:36:43 -04:00
yohann dossantos
ba41f5abfb - Added a per project Font display DPI setting, in order to allow using (but not being limited to) the standard 72 DPI used by most creation software (Photoshop, Figma,...). Slate will still work at 96DPI.
- Converted the font size to float, to allow specifying more precise size, and support the sizes that would be wanted at (for instance) 72 DPI, without losing information (ie rounding to the closest 96DPI int).
- Change various font caches behavior (glyph, advance, kerning...) to match behavior of Freetype, and ensure that a given size in Freetype will be stored only once in the font caches.
- Added cvar commands:
    - Slate.DumpFontCacheStats: will display the list of all font combinations used, with the number of glyphs for each combination.
    - Slate.FlushFontCache: will clear the font caches as well as the font atlases, then will invalidate all the widgets to force the cache to be refilled.
- Fixed the combo box for font typeface selection not disabled when necessary.

#tests:
- changed the Font display settings between various values and customDPI, validatet that everything was save correctly, and that the display was reacting to the value change.
- tested all the tooltips, simple, extended (ctrl + alt), and dynamic (display of the current DPI setting next to the font size).
- validated that the font atlas/cache was containing not more than one time each glyph rendered by Freetype.
- validated that the edition of the font size was still fully functionnal (spinbox, undo/redo, support of disable state,...).
- tested default value for a new project (72DPI).
- compiled Slate/SlateCore/UMG with UnsafeTypeCastWarningLevel = WarningLevel.Warning to fix warnings related to the change.
- tested in a game with latest changes from BP team (CL 26034633), ensuring that there are no regression related to the change of type (int to float) from the Font size.
- running with it in a game and UE branch for months.

#jira UE-152161
#rb patrick.boutot

[CL 26074535 by yohann dossantos in 5.3 branch]
2023-06-16 18:36:14 -04:00
paul chipchase
0d2babbfa7 Fix copy/paste error in code comment documentation.
#rb trivial
#rnx

[CL 25973563 by paul chipchase in ue5-main branch]
2023-06-14 06:09:22 -04:00
henrik karlsson
910b3bf6de [SlateCore]
* Moved dll export from types to methods/staticvar

#rb none

[CL 25914085 by henrik karlsson in ue5-main branch]
2023-06-11 02:21:28 -04:00
henrik karlsson
f4c1a0307c [Slate]
* Moved dll export from types to methods/staticvar

#rb none

[CL 25910637 by henrik karlsson in ue5-main branch]
2023-06-10 08:59:07 -04:00
henrik karlsson
541c9938bd [Engine]
* Moved dll export from type to methods/static variables. This is changelist is produced by a script and contains 900+ files.

#rb none

[CL 25898513 by henrik karlsson in ue5-main branch]
2023-06-09 13:36:39 -04:00
mickael gilabert
2172436e4b Avoid useless copy of FSlateRenderBatchParams in GenerateIndexedVertexBatches
[REVIEW] [at]daren.chang
#rnx

[CL 25857279 by mickael gilabert in ue5-main branch]
2023-06-07 16:39:04 -04:00
daren cheng
aedd9488cf Fix Asan regression slate element generation
#jira UE-188021
#rb trivial
[FYI] [at]editor-ui-systems

[CL 25833535 by daren cheng in ue5-main branch]
2023-06-06 20:17:23 -04:00
yohann dossantos
eb0b979b8c Add support for ascent/descent override in Font.
Bonus: added the ability to scale the fonts in the preview from the font editor, for clearer preview.

#jira UE-184155 Expose Ascent/Descent overides
#rb vincent.gauthier
#tests Using the font provided in the jira and the new settable values, ensured that I was able to get result similar to a 'standard' font, on single line text, multi line text, rich text combining the problematic font and another one, as well as using a composite font mixing the fonts. Tested with different size. Validated that modifying the new font settings was refreshing the font displayed. Replaced in a game project the font "burbank" by the new font and got it properly vertically aligned using new settings.
#preflight 647a377ed4596f242c113c75

[CL 25790038 by yohann dossantos in ue5-main branch]
2023-06-05 08:26:48 -04:00
daren cheng
5d0a57fecf Re-submit 25720195 with arg struct definition moved for non-debug builds.
-----------------------------------------------------------------
Slate batching improvements for large element sets
---
Group similar elements at compile time using tuples instead of maps (Also preps for slate payload removal).
Merge similar renderbatches in same-typed element buckets (Currently for box and lines only).
Reserve verticies / elements in a batch before using them
Add some comments to invalidation.

#rb Patrick.Boutot
#preflight 646ff8505b484acfee7cc9fa
#jira UE-173455

[CL 25738553 by daren cheng in ue5-main branch]
2023-06-01 15:57:14 -04:00
daren cheng
d7d121f724 [Backout] - CL25717383
[FYI] daren.cheng
Original CL Desc
-----------------------------------------------------------------
Re-submit 25712585 with manual tuple expansion to prevent use before define.
-----------------------------------------------------------------
Slate batching improvements for large element sets
---
Group similar elements at compile time using tuples instead of maps
Merge similar renderbatches in same-typed element buckets (Currently for box and lines only).
Reserve verticies / elements in a batch before using them
Add some comments to invalidation.

#rb Patrick.Boutot
#preflight 646ff8505b484acfee7cc9fa
#jira UE-173455

[CL 25720199 by daren cheng in ue5-main branch]
2023-05-31 23:37:20 -04:00
daren cheng
30e7727aaf Re-submit 25712585 with manual tuple expansion to prevent use before define.
-----------------------------------------------------------------
Slate batching improvements for large element sets
---
Group similar elements at compile time using tuples instead of maps
Merge similar renderbatches in same-typed element buckets (Currently for box and lines only).
Reserve verticies / elements in a batch before using them
Add some comments to invalidation.

#rb Patrick.Boutot
#preflight 646ff8505b484acfee7cc9fa
#jira UE-173455

[CL 25717402 by daren cheng in ue5-main branch]
2023-05-31 18:57:56 -04:00
daren cheng
7622b67782 [Backout] - CL25712585
[FYI] daren.cheng
Original CL Desc
-----------------------------------------------------------------
Slate batching improvements for large element sets
---
Group similar elements at compile time using tuples instead of maps
Merge similar renderbatches in same-typed element buckets (Currently for box and lines only).
Reserve verticies / elements in a batch before using them
Add some comments to invalidation.

#rb Patrick.Boutot
#preflight 646ff8505b484acfee7cc9fa
#jira UE-173455

[CL 25716613 by daren cheng in ue5-main branch]
2023-05-31 18:20:34 -04:00
daren cheng
6165a76847 Slate batching improvements for large element sets
---
Group similar elements at compile time using tuples instead of maps
Merge similar renderbatches in same-typed element buckets (Currently for box and lines only).
Reserve verticies / elements in a batch before using them
Add some comments to invalidation.

#rb Patrick.Boutot
#preflight 646ff8505b484acfee7cc9fa
#jira UE-173455

[CL 25712708 by daren cheng in ue5-main branch]
2023-05-31 16:20:47 -04:00
daren cheng
16c16051ca Inline slate element iteration
#rb Patrick.Boutot
#preflight 646ff8505b484acfee7cc9fa
#jira UE-173455

[CL 25712588 by daren cheng in ue5-main branch]
2023-05-31 16:18:44 -04:00
ben hoffman
90ed12e1e5 This is two changelists, re-submitting of 25473883 (which was backed out with 25495316) and also a cherry pick of 25507685 to fix an ensure the original CL caused.
#preflight 647773ab0d55081f5494ab67
#jira none

--------------------------------------------------
Add ability to add a widget inside the global window overlay

#rb Patrick.Boutot

#ushell-cherrypick of 25473883 by kristof.morva1

----------------------------------------------
Fix ensure when hiding mouse capture label after exiting PIE

#rb Vincent.Gauthier

#ushell-cherrypick of 25507685 by kristof.morva1

[CL 25709904 by ben hoffman in ue5-main branch]
2023-05-31 14:56:43 -04:00
kirill zorin
b6ee3a6c64 Fix UE_LOG callsites that have format string-related UB
#rb trivial
#preflight 647107780a6634dbb236a0a6

[CL 25651638 by kirill zorin in ue5-main branch]
2023-05-26 15:52:39 -04:00
yohann dossantos
b3a67f9854 [Backout] - CL25531508
[FYI] yohann.dossantos
Original CL Desc
-----------------------------------------------------------------
Fix incorrectly displayed text. In Slate, wrapping text needs 2 draws to be displayed properly, otherwise some incorrect value are used. In the case of this bug, the text was offseted with a value based on the text width without wrapping (as if it was single line)  instead of the correct width with wrapping applied. An invalidation of the widget was called, but as the invalidation was not supported in this code path (WidgetComponent + WidgetRendere::DrawWindow), it was ignored.

Now the WidgetRenderer::DrawWindow support Invalidation Root, and the WidgetComponent enabled the Invalidation on the VirtualWindow it uses, and do only the necessary amount of Tick.

#jira UE-FORT-594200
#rb patrick.boutot
#tests Repro steps from the jira, no longer occurs. Tested that hit testing was still working properly by using a widget with buttons in the widgetcomponent. Tested with and without the new setting bIsInvalidationEnabled activated.
#preflight 646664b7a133ca477bc93c69

[CL 25545951 by yohann dossantos in ue5-main branch]
2023-05-19 12:01:41 -04:00