Skip to main content

Class StyleModel

Superclass for all versions of the Dalamud style model.

Assembly: Dalamud.dll
View Source
Declaration
public abstract class StyleModel

Derived:
Dalamud.Interface.Style.StyleModelV1

Properties

Name

Gets or sets the name of the style model.

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

BuiltInColors

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

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

Version

Gets or sets version number of this model.

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

Methods

GetFromCurrent()

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

View Source
Declaration
public static StyleModel GetFromCurrent()
Returns

Dalamud.Interface.Style.StyleModel: The current style.### GetConfiguredStyle() Get the current style model, as per configuration.

View Source
Declaration
public static StyleModel? GetConfiguredStyle()
Returns

Dalamud.Interface.Style.StyleModel: The current style, as per configuration.### GetConfiguredStyles() Get an enumerable of all saved styles.

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

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

View Source
Declaration
public static void TransferOldModels()

Serialize()

Serialize this style model.

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

View Source
Declaration
public abstract void Apply()

Push()

Push this StyleModel into the ImGui style/color stack.

View Source
Declaration
public abstract void Push()

Pop()

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

View Source
Declaration
public void Pop()

PushStyleHelper(ImGuiStyleVar, float)

Push a style var.

View Source
Declaration
protected void PushStyleHelper(ImGuiStyleVar style, float arg)
Parameters
TypeNameDescription
ImGuiNET.ImGuiStyleVarstyleStyle kind.
System.SingleargStyle var.

PushStyleHelper(ImGuiStyleVar, Vector2)

Push a style var.

View Source
Declaration
protected void PushStyleHelper(ImGuiStyleVar style, Vector2 arg)
Parameters
TypeNameDescription
ImGuiNET.ImGuiStyleVarstyleStyle kind.
System.Numerics.Vector2argStyle var.

PushColorHelper(ImGuiCol, Vector4)

Push a style color.

View Source
Declaration
protected void PushColorHelper(ImGuiCol color, Vector4 value)
Parameters
TypeNameDescription
ImGuiNET.ImGuiColcolorColor kind.
System.Numerics.Vector4valueColor value.

DonePushing()

Indicate that you have pushed.

View Source
Declaration
protected void DonePushing()