saving font size fixes

Main
Arneth 2 years ago
parent 94943deb1a
commit 8db8c935f2

@ -3,6 +3,7 @@ using System.Collections;
using Assets.Scripts; using Assets.Scripts;
using Qoo; using Qoo;
using Qoo.Application; using Qoo.Application;
using Qoo.Def;
using Qoo.File; using Qoo.File;
using Qoo.Ks; using Qoo.Ks;
using UnityEngine; using UnityEngine;
@ -62,9 +63,32 @@ public class UnityApp : Singleton<UnityApp>
this.font = FontEnum.NewRodin; this.font = FontEnum.NewRodin;
break; break;
} }
this.preferredFontSize = PlayerPrefs.GetInt("fontsize");
switch (this.preferredFontSize)
{
case 0:
FontDef.SetFontInfo(new FONTINFO[]
{
new FONTINFO(22, 22, 1f, 0),
new FONTINFO(22, 22, 1f, 0),
new FONTINFO(42, 42, 1f, -1),
new FONTINFO(62, 62, 1f, -2)
});
break;
case 1:
default:
FontDef.SetFontInfo(new FONTINFO[]
{
new FONTINFO(22, 22, 1f, 0),
new FONTINFO(28, 28, 1f, 0),
new FONTINFO(42, 42, 1f, -1),
new FONTINFO(62, 62, 1f, -2)
});
break;
}
//UnityEngine.Object.DontDestroyOnLoad(this); //UnityEngine.Object.DontDestroyOnLoad(this);
Application.targetFrameRate = 60; Application.targetFrameRate = 60;
this.preferredFontSize = 28;
Application.runInBackground = true; Application.runInBackground = true;
//Screen.SetResolution(1024, 576, false, 60); //Screen.SetResolution(1024, 576, false, 60);
@ -394,5 +418,5 @@ public class UnityApp : Singleton<UnityApp>
internal FontEnum font = FontEnum.NewRodin; internal FontEnum font = FontEnum.NewRodin;
public int preferredFontSize = 28; internal int preferredFontSize = 28;
} }

Loading…
Cancel
Save