Class StyleModel
Superclass for all versions of the Dalamud style model.
Assembly: Dalamud.dll​
public abstract class StyleModel
Derived:
Dalamud.Interface.Style.StyleModelV1
Properties​
Name​
Gets or sets the name of the style model.
[JsonProperty("name")]
public string Name { get; set; }
BuiltInColors​
Gets or sets class representing Dalamud-builtin Dalamud.Interface.Colors.ImGuiColors.
[JsonProperty("dol")]
public DalamudColors? BuiltInColors { get; set; }
Version​
Gets or sets version number of this model.
[JsonProperty("ver")]
public int Version { get; set; }
Methods​
GetFromCurrent()​
Get a StyleModel based on the current Dalamud style, with the current version.
public static StyleModel GetFromCurrent()
Returns​
Dalamud.Interface.Style.StyleModel: The current style.
GetConfiguredStyle()​
Get the current style model, as per configuration.
public static StyleModel? GetConfiguredStyle()
Returns​
Dalamud.Interface.Style.StyleModel: The current style, as per configuration.
GetConfiguredStyles()​
Get an enumerable of all saved styles.
public static IEnumerable<StyleModel>? GetConfiguredStyles()
Returns​
System.Collections.Generic.IEnumerable<Dalamud.Interface.Style.StyleModel>: Enumerable of saved styles.
Deserialize(string)​
Deserialize a style model.
public static StyleModel? Deserialize(string model)
Returns​
Dalamud.Interface.Style.StyleModel: The deserialized model.
Parameters​
| Type | Name | Description |
|---|---|---|
System.String | model | The 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.
public static void TransferOldModels()
Serialize()​
Serialize this style model.
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.
public abstract void Apply()
Push()​
Push this StyleModel into the ImGui style/color stack.
public abstract void Push()
Pop()​
Pop this style model from the ImGui style/color stack.
public void Pop()
PushStyleHelper(ImGuiStyleVar, float)​
Push a style var.
protected void PushStyleHelper(ImGuiStyleVar style, float arg)
Parameters​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImGuiStyleVar | style | Style kind. |
System.Single | arg | Style var. |
PushStyleHelper(ImGuiStyleVar, Vector2)​
Push a style var.
protected void PushStyleHelper(ImGuiStyleVar style, Vector2 arg)
Parameters​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImGuiStyleVar | style | Style kind. |
System.Numerics.Vector2 | arg | Style var. |
PushColorHelper(ImGuiCol, Vector4)​
Push a style color.
protected void PushColorHelper(ImGuiCol color, Vector4 value)
Parameters​
| Type | Name | Description |
|---|---|---|
Dalamud.Bindings.ImGui.ImGuiCol | color | Color kind. |
System.Numerics.Vector4 | value | Color value. |
DonePushing()​
Indicate that you have pushed.
protected void DonePushing()