Skip to content

Commit

Permalink
Add fix for the pause/keybinds menu
Browse files Browse the repository at this point in the history
  • Loading branch information
toebeann committed Jan 11, 2023
1 parent 224e15f commit f5baa99
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Tobey.ChainedEchoes.UltrawideSupport/UltrawideSupport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ private void SetupStartMenu()
pp.refResolutionX = Convert.ToInt32(pp.refResolutionX / OriginalAspectRatio * CurrentAspectRatio);
}

StartCoroutine(FixKeybindingsInfo());
StartCoroutine(HidePartyField());
StartCoroutine(FixFleeField());
StartCoroutine(FixSkillNameBox());
Expand Down Expand Up @@ -159,6 +160,24 @@ private static void FixStartMenuSternenritt()
}
}

private static IEnumerator FixKeybindingsInfo()
{
yield return new WaitWhile(() => PartyInfoBattle.instance == null);
var containerTransform = PartyInfoBattle.instance.transform.root.Find("KeybindingsInfo/Container");
containerTransform.localScale = new(
x: containerTransform.localScale.x / OriginalAspectRatio * CurrentAspectRatio,
y: containerTransform.localScale.y,
z: containerTransform.localScale.z);

foreach (Transform child in containerTransform)
{
child.localScale = new(
x: child.localScale.x / containerTransform.localScale.x,
y: child.localScale.y,
z: child.localScale.z);
}
}

private void OnEnable() => harmony.PatchAll(typeof(UltrawideSupport));
private void OnDisable() => harmony.UnpatchSelf();

Expand Down

0 comments on commit f5baa99

Please sign in to comment.