mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-20 06:47:46 +01:00
This commit is contained in:
parent
cdf9ea1b87
commit
8e7bffc8af
2 changed files with 5 additions and 21 deletions
2
Luna
2
Luna
|
|
@ -1 +1 @@
|
|||
Subproject commit 3fa2195ba9b34c4ce21e3180bf238edb488a4d35
|
||||
Subproject commit bff400eb44aeded41fb6b1b3d35948881b578737
|
||||
|
|
@ -17,30 +17,14 @@ public sealed partial class UiConfig : ConfigurationFile<FilenameService>
|
|||
|
||||
protected override void AddData(JsonTextWriter j)
|
||||
{
|
||||
j.WritePropertyName("CollectionsTab");
|
||||
j.WriteStartObject();
|
||||
j.WritePropertyName("Mode");
|
||||
j.WriteValue(CollectionsTabScale.Mode.ToString());
|
||||
j.WritePropertyName("Width");
|
||||
j.WriteValue(CollectionsTabScale.Width);
|
||||
j.WriteEndObject();
|
||||
j.WritePropertyName("ModsTab");
|
||||
j.WriteStartObject();
|
||||
j.WritePropertyName("Mode");
|
||||
j.WriteValue(ModTabScale.Mode.ToString());
|
||||
j.WritePropertyName("Width");
|
||||
j.WriteValue(ModTabScale.Width);
|
||||
j.WriteEndObject();
|
||||
CollectionsTabScale.WriteJson(j, "CollectionsTab");
|
||||
ModTabScale.WriteJson(j, "ModsTab");
|
||||
}
|
||||
|
||||
protected override void LoadData(JObject j)
|
||||
{
|
||||
if (j["CollectionsTab"] is JObject collections)
|
||||
_collectionsTabScale = new TwoPanelWidth(collections["Width"].ValueOr(float.NaN),
|
||||
collections["Mode"].TextEnum(ScalingMode.Percentage));
|
||||
|
||||
if (j["ModsTab"] is JObject mods)
|
||||
_modTabScale = new TwoPanelWidth(mods["Width"].ValueOr(float.NaN), mods["Mode"].TextEnum(ScalingMode.Percentage));
|
||||
_collectionsTabScale = TwoPanelWidth.ReadJson(j, "CollectionsTab", new TwoPanelWidth(0.25f, ScalingMode.Percentage));
|
||||
_modTabScale = TwoPanelWidth.ReadJson(j, "ModsTab", new TwoPanelWidth(0.3f, ScalingMode.Percentage));
|
||||
}
|
||||
|
||||
public override int CurrentVersion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue