Skip to main content
Version: 15.x (API 15) [Current]

Class SingleFontChooserDialog

A dialog for choosing a font and its size.

Assembly: Dalamud.dll​
Declaration
public sealed class SingleFontChooserDialog : IDisposable

Implements:
System.IDisposable

Properties​

Title​

Gets or sets the title of this font chooser dialog popup.

Declaration
public string Title { get; set; }

PreviewText​

Gets or sets the preview text. A text too long may be truncated on assignment.

Declaration
public string PreviewText { get; set; }

ResultTask​

Gets the task that resolves upon choosing a font or cancellation.

Declaration
public Task<SingleFontSpec> ResultTask { get; }

SelectedFont​

Gets or sets the selected family and font.

Declaration
public SingleFontSpec SelectedFont { get; set; }

FontFamilyExcludeFilter​

Gets or sets the font family exclusion filter predicate.

Declaration
public Predicate<IFontFamilyId>? FontFamilyExcludeFilter { get; set; }

IgnorePreviewGlobalScale​

Gets or sets a value indicating whether to ignore the global scale on preview text input.

Declaration
public bool IgnorePreviewGlobalScale { get; set; }

IsModal​

Gets or sets a value indicating whether this popup should be modal, blocking everything behind from being interacted.

Declaration
public bool IsModal { get; set; }
Remarks​

If true, then Dalamud.Bindings.ImGui.ImGui.BeginPopupModal(Dalamud.Bindings.ImGui.ImU8String,System.Boolean@,Dalamud.Bindings.ImGui.ImGuiWindowFlags) will be used. Otherwise, Dalamud.Bindings.ImGui.ImGui.Begin(Dalamud.Bindings.ImGui.ImU8String,System.Boolean@,Dalamud.Bindings.ImGui.ImGuiWindowFlags) will be used.

WindowFlags​

Gets or sets the window flags.

Declaration
public ImGuiWindowFlags WindowFlags { get; set; }

PopupPosition​

Gets or sets the popup window position.

Declaration
public Vector2 PopupPosition { get; set; }
Remarks​

<p>Setting the position only works before the first call to Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog.Draw().</p> <p>If any of the coordinates are System.Single.NaN, default position will be used.</p> <p>The position will be clamped into the work area of the selected monitor.</p>

PopupSize​

Gets or sets the popup window size.

Declaration
public Vector2 PopupSize { get; set; }
Remarks​

<p>Setting the size only works before the first call to Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog.Draw().</p> <p>If any of the coordinates are System.Single.NaN, default size will be used.</p> <p>The size will be clamped into the work area of the selected monitor.</p>

Methods​

CreateAuto(UiBuilder)​

Creates a new instance of Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog that will automatically draw and dispose itself as needed; calling Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog.Draw() and Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog.Dispose() are handled automatically.

Declaration
public static SingleFontChooserDialog CreateAuto(UiBuilder uiBuilder)
Returns​

Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog: The new instance of Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog.

Parameters​
TypeNameDescription
Dalamud.Interface.UiBuilderuiBuilderAn instance of Dalamud.Interface.UiBuilder.

GetDefaultPopupSizeNonClamped()​

Gets the default popup size before clamping to monitor work area.

Declaration
public static Vector2 GetDefaultPopupSizeNonClamped()
Returns​

System.Numerics.Vector2: The default popup size.

Dispose()​

Declaration
public void Dispose()

Cancel()​

Cancels this dialog.

Declaration
public void Cancel()

SetPopupPositionAndSizeToCurrentWindowCenter(Vector2)​

Sets Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog.PopupSize and Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog.PopupPosition to be at the center of the current window being drawn.

Declaration
public void SetPopupPositionAndSizeToCurrentWindowCenter(Vector2 preferredPopupSize)
Parameters​
TypeNameDescription
System.Numerics.Vector2preferredPopupSizeThe preferred popup size.

SetPopupPositionAndSizeToCurrentWindowCenter()​

Sets Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog.PopupSize and Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog.PopupPosition to be at the center of the current window being drawn.

Declaration
public void SetPopupPositionAndSizeToCurrentWindowCenter()

Draw()​

Draws this dialog.

Declaration
public void Draw()

Events​

SelectedFontSpecChanged​

Called when the selected font spec has changed.

Declaration
public event Action<SingleFontSpec>? SelectedFontSpecChanged
Event Type​

System.Action<Dalamud.Interface.FontIdentifier.SingleFontSpec>

Implements​

  • System.IDisposable