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