Skip to main content

Class SingleFontChooserDialog

A dialog for choosing a font and its size.

Assembly: Dalamud.dll
View Source
Declaration
public sealed class SingleFontChooserDialog : IDisposable

Implements:
System.IDisposable

Properties

Title

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

View Source
Declaration
public string Title { get; set; }

PreviewText

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

View Source
Declaration
public string PreviewText { get; set; }

ResultTask

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

View Source
Declaration
public Task<SingleFontSpec> ResultTask { get; }

SelectedFont

Gets or sets the selected family and font.

View Source
Declaration
public SingleFontSpec SelectedFont { get; set; }

FontFamilyExcludeFilter

Gets or sets the font family exclusion filter predicate.

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

IgnorePreviewGlobalScale

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

View Source
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.

View Source
Declaration
public bool IsModal { get; set; }

WindowFlags

Gets or sets the window flags.

View Source
Declaration
public ImGuiWindowFlags WindowFlags { get; set; }

PopupPosition

Gets or sets the popup window position.

View Source
Declaration
public Vector2 PopupPosition { get; set; }

PopupSize

Gets or sets the popup window size.

View Source
Declaration
public Vector2 PopupSize { get; set; }

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.

View Source
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.

View Source
Declaration
public static Vector2 GetDefaultPopupSizeNonClamped()
Returns

System.Numerics.Vector2: The default popup size.### Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source
Declaration
public void Dispose()

Cancel()

Cancels this dialog.

View Source
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.

View Source
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.

View Source
Declaration
public void SetPopupPositionAndSizeToCurrentWindowCenter()

Draw()

Draws this dialog.

View Source
Declaration
public void Draw()

Events

SelectedFontSpecChanged

Called when the selected font spec has changed.

View Source
Declaration
public event Action<SingleFontSpec>? SelectedFontSpecChanged
Event Type

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

Implements

  • System.IDisposable