Skip to main content

Class StyleModel

Superclass for all versions of the Dalamud style model.

Assembly: Dalamud.dll
Declaration
public abstract class StyleModel

Derived:
Dalamud.Interface.Style.StyleModelV1

Properties

Name

Gets or sets the name of the style model.

Declaration
[JsonProperty("name")]
public string Name { get; set; }

BuiltInColors

Gets or sets class representing Dalamud-builtin Dalamud.Interface.Colors.ImGuiColors.

Declaration
[JsonProperty("dol")]
public DalamudColors? BuiltInColors { get; set; }

Version

Gets or sets version number of this model.

Declaration
[JsonProperty("ver")]
public int Version { get; set; }

Methods

GetFromCurrent()

Get a StyleModel based on the current Dalamud style, with the current version.

Declaration
public static StyleModel GetFromCurrent()
Returns

Dalamud.Interface.Style.StyleModel: The current style.

GetConfiguredStyle()

Get the current style model, as per configuration.

Declaration
public static StyleModel? GetConfiguredStyle()
Returns

Dalamud.Interface.Style.StyleModel: The current style, as per configuration.

GetConfiguredStyles()

Get an enumerable of all saved styles.

Declaration
public static IEnumerable<StyleModel>? GetConfiguredStyles()
Returns

System.Collections.Generic.IEnumerable<Dalamud.Interface.Style.StyleModel>: Enumerable of saved styles.

Deserialize(string)

Deserialize a style model.

Declaration
public static StyleModel? Deserialize(string model)
Returns

Dalamud.Interface.Style.StyleModel: The deserialized model.

Parameters
TypeNameDescription
System.StringmodelThe serialized model.
Exceptions

System.ArgumentException
Thrown in case the version of the model is not known.

TransferOldModels()

[TEMPORARY] Transfer old non-polymorphic style models to the new format.

Declaration
public static void TransferOldModels()

Serialize()

Serialize this style model.

Declaration
public string Serialize()
Returns

System.String: Serialized style model as string.

Exceptions

System.ArgumentOutOfRangeException
Thrown when the version of the style model is unknown.

Apply()

Apply this style model to ImGui.

Declaration
public abstract void Apply()

Push()

Push this StyleModel into the ImGui style/color stack.

Declaration
public abstract void Push()

Pop()

Pop this style model from the ImGui style/color stack.

Declaration
public void Pop()

PushStyleHelper(ImGuiStyleVar, float)

Push a style var.

Declaration
protected void PushStyleHelper(ImGuiStyleVar style, float arg)
Parameters
TypeNameDescription
Dalamud.Bindings.ImGui.ImGuiStyleVarstyleStyle kind.
System.SingleargStyle var.

PushStyleHelper(ImGuiStyleVar, Vector2)

Push a style var.

Declaration
protected void PushStyleHelper(ImGuiStyleVar style, Vector2 arg)
Parameters
TypeNameDescription
Dalamud.Bindings.ImGui.ImGuiStyleVarstyleStyle kind.
System.Numerics.Vector2argStyle var.

PushColorHelper(ImGuiCol, Vector4)

Push a style color.

Declaration
protected void PushColorHelper(ImGuiCol color, Vector4 value)
Parameters
TypeNameDescription
Dalamud.Bindings.ImGui.ImGuiColcolorColor kind.
System.Numerics.Vector4valueColor value.

DonePushing()

Indicate that you have pushed.

Declaration
protected void DonePushing()