Class SingleFontChooserDialog
A dialog for choosing a font and its size.
Assembly: Dalamud.dll
public sealed class SingleFontChooserDialog : IDisposable
Implements:
System.IDisposable
Properties
Title
Gets or sets the title of this font chooser dialog popup.
public string Title { get; set; }
PreviewText
Gets or sets the preview text. A text too long may be truncated on assignment.
public string PreviewText { get; set; }
ResultTask
Gets the task that resolves upon choosing a font or cancellation.
public Task<SingleFontSpec> ResultTask { get; }
SelectedFont
Gets or sets the selected family and font.
public SingleFontSpec SelectedFont { get; set; }
FontFamilyExcludeFilter
Gets or sets the font family exclusion filter predicate.
public Predicate<IFontFamilyId>? FontFamilyExcludeFilter { get; set; }
IgnorePreviewGlobalScale
Gets or sets a value indicating whether to ignore the global scale on preview text input.
public bool IgnorePreviewGlobalScale { get; set; }
IsModal
Gets or sets a value indicating whether this popup should be modal, blocking everything behind from being interacted.
public bool IsModal { get; set; }
WindowFlags
Gets or sets the window flags.
public ImGuiWindowFlags WindowFlags { get; set; }
PopupPosition
Gets or sets the popup window position.
public Vector2 PopupPosition { get; set; }
PopupSize
Gets or sets the popup window size.
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.
public static SingleFontChooserDialog CreateAuto(UiBuilder uiBuilder)
Returns
Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog: The new instance of Dalamud.Interface.ImGuiFontChooserDialog.SingleFontChooserDialog.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Interface.UiBuilder | uiBuilder | An instance of Dalamud.Interface.UiBuilder. |
GetDefaultPopupSizeNonClamped()
Gets the default popup size before clamping to monitor work area.
public static Vector2 GetDefaultPopupSizeNonClamped()
Returns
System.Numerics.Vector2: The default popup size.
Dispose()
public void Dispose()
Cancel()
Cancels this dialog.
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.
public void SetPopupPositionAndSizeToCurrentWindowCenter(Vector2 preferredPopupSize)
Parameters
| Type | Name | Description |
|---|---|---|
System.Numerics.Vector2 | preferredPopupSize | The 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.
public void SetPopupPositionAndSizeToCurrentWindowCenter()
Draw()
Draws this dialog.
public void Draw()
Events
SelectedFontSpecChanged
Called when the selected font spec has changed.
public event Action<SingleFontSpec>? SelectedFontSpecChanged
Event Type
System.Action<Dalamud.Interface.FontIdentifier.SingleFontSpec>
Implements
System.IDisposable