From 6ab1663a1429591d0678bab1790e3e0b4a9628ca Mon Sep 17 00:00:00 2001
From: ExMatics HydrogenC <33123710+HydrogenC@users.noreply.github.com>
Date: Sun, 3 Dec 2023 15:18:27 +0800
Subject: [PATCH] Add missing xml annotations
---
Source/Engine/Core/Config/GraphicsSettings.h | 4 +--
Source/Engine/Render2D/Render2D.h | 26 ++++++++++++++++++++
Source/Engine/UI/GUI/Style.cs | 1 -
Source/Engine/UI/GUI/Tooltip.cs | 1 -
4 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/Source/Engine/Core/Config/GraphicsSettings.h b/Source/Engine/Core/Config/GraphicsSettings.h
index 7abfbb048..e109a55e4 100644
--- a/Source/Engine/Core/Config/GraphicsSettings.h
+++ b/Source/Engine/Core/Config/GraphicsSettings.h
@@ -121,13 +121,13 @@ public:
PostProcessSettings PostProcessSettings;
///
- ///
+ /// Whether to enable font fallbacking globally.
///
API_FIELD(Attributes = "EditorOrder(12000), EditorDisplay(\"Text Render Settings\", EditorDisplayAttribute.InlineStyle)")
bool EnableFontFallback = true;
///
- ///
+ /// The fallback fonts used for text rendering, ignored if null.
///
API_FIELD(Attributes = "EditorOrder(12005), EditorDisplay(\"Text Render Settings\", EditorDisplayAttribute.InlineStyle)")
FontFallbackList* FallbackFonts;
diff --git a/Source/Engine/Render2D/Render2D.h b/Source/Engine/Render2D/Render2D.h
index 5813d6f87..6657d8542 100644
--- a/Source/Engine/Render2D/Render2D.h
+++ b/Source/Engine/Render2D/Render2D.h
@@ -281,6 +281,15 @@ public:
}
}
+ ///
+ /// Draws a text, follows the fallback settings defined in .
+ ///
+ /// The font to use.
+ /// The text to render.
+ /// The input text range (substring range of the input text parameter).
+ /// The text color.
+ /// The text location.
+ /// The custom material for font characters rendering. It must contain texture parameter named Font used to sample font texture.
API_FUNCTION() FORCE_INLINE static void DrawText(Font* font, const StringView& text, API_PARAM(Ref) const TextRange& textRange, const Color& color, const Float2& location, MaterialBase* customMaterial = nullptr) {
if (EnableFontFallback && FallbackFonts) {
DrawTextInternal(font, FallbackFonts, text, textRange, color, location, customMaterial);
@@ -290,6 +299,14 @@ public:
}
}
+ ///
+ /// Draws a text with formatting, follows the fallback settings defined in .
+ ///
+ /// The font to use.
+ /// The text to render.
+ /// The text color.
+ /// The text layout properties.
+ /// The custom material for font characters rendering. It must contain texture parameter named Font used to sample font texture.
API_FUNCTION() FORCE_INLINE static void DrawText(Font* font, const StringView& text, const Color& color, API_PARAM(Ref) const TextLayoutOptions& layout, MaterialBase* customMaterial = nullptr) {
if (EnableFontFallback && FallbackFonts) {
DrawTextInternal(font, FallbackFonts, text, color, layout, customMaterial);
@@ -299,6 +316,15 @@ public:
}
}
+ ///
+ /// Draws a text with formatting, follows the fallback settings defined in .
+ ///
+ /// The font to use.
+ /// The text to render.
+ /// The input text range (substring range of the input text parameter).
+ /// The text color.
+ /// The text layout properties.
+ /// The custom material for font characters rendering. It must contain texture parameter named Font used to sample font texture.
API_FUNCTION() FORCE_INLINE static void DrawText(Font* font, const StringView& text, API_PARAM(Ref) const TextRange& textRange, const Color& color, API_PARAM(Ref) const TextLayoutOptions& layout, MaterialBase* customMaterial = nullptr) {
if (EnableFontFallback && FallbackFonts) {
DrawTextInternal(font, FallbackFonts, text, textRange, color, layout, customMaterial);
diff --git a/Source/Engine/UI/GUI/Style.cs b/Source/Engine/UI/GUI/Style.cs
index 6092f0f72..22b8f52af 100644
--- a/Source/Engine/UI/GUI/Style.cs
+++ b/Source/Engine/UI/GUI/Style.cs
@@ -1,6 +1,5 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
-
namespace FlaxEngine.GUI
{
///
diff --git a/Source/Engine/UI/GUI/Tooltip.cs b/Source/Engine/UI/GUI/Tooltip.cs
index 8d35c21b9..734fb078f 100644
--- a/Source/Engine/UI/GUI/Tooltip.cs
+++ b/Source/Engine/UI/GUI/Tooltip.cs
@@ -243,7 +243,6 @@ namespace FlaxEngine.GUI
TextAlignment.Center,
TextWrapping.WrapWords
);
-
}
///