mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Add font properties to IUiBuilder
This commit is contained in:
parent
69b4ed941f
commit
7883e2e8fa
1 changed files with 43 additions and 0 deletions
|
|
@ -122,6 +122,34 @@ public interface IUiBuilder
|
|||
/// </summary>
|
||||
IFontSpec DefaultFontSpec { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default Dalamud font size in points.
|
||||
/// </summary>
|
||||
public float FontDefaultSizePt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default Dalamud font size in pixels.
|
||||
/// </summary>
|
||||
public float FontDefaultSizePx { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default Dalamud font - supporting all game languages and icons.<br />
|
||||
/// <strong>Accessing this static property outside of <see cref="Draw"/> is dangerous and not supported.</strong>
|
||||
/// </summary>
|
||||
public ImFontPtr FontDefault { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default Dalamud icon font based on FontAwesome 5 Free solid.<br />
|
||||
/// <strong>Accessing this static property outside of <see cref="Draw"/> is dangerous and not supported.</strong>
|
||||
/// </summary>
|
||||
public ImFontPtr FontIcon { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default Dalamud monospaced font based on Inconsolata Regular.<br />
|
||||
/// <strong>Accessing this static property outside of <see cref="Draw"/> is dangerous and not supported.</strong>
|
||||
/// </summary>
|
||||
public ImFontPtr FontMono { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the game's active Direct3D device.
|
||||
/// </summary>
|
||||
|
|
@ -380,6 +408,21 @@ public sealed class UiBuilder : IDisposable, IUiBuilder
|
|||
/// </summary>
|
||||
public IFontSpec DefaultFontSpec => Service<FontAtlasFactory>.Get().DefaultFontSpec;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public float FontDefaultSizePt => Service<FontAtlasFactory>.Get().DefaultFontSpec.SizePt;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public float FontDefaultSizePx => Service<FontAtlasFactory>.Get().DefaultFontSpec.SizePx;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ImFontPtr FontDefault => InterfaceManager.DefaultFont;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ImFontPtr FontIcon => InterfaceManager.IconFont;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ImFontPtr FontMono => InterfaceManager.MonoFont;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the handle to the default Dalamud font - supporting all game languages and icons.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue