Skip to content

Commit

Permalink
minor adjustments to size of remap container
Browse files Browse the repository at this point in the history
  • Loading branch information
Rune580 committed Dec 28, 2023
1 parent 1f73d12 commit beb96b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LethalCompanyInputUtils/LcInputActionApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class LcInputActionApi
internal static void LoadIntoUI(KepRemapPanel panel)
{
UpdateFontScaling(panel);
EnsureContentSizeFitter(panel);
AdjustSizeAndPos(panel);
var layoutElement = EnsureLayoutElement(panel);
layoutElement.minHeight = 0;

Expand Down Expand Up @@ -75,7 +75,7 @@ private static void UpdateFontScaling(KepRemapPanel panel)
textMeshPro.enableAutoSizing = true;
}

private static void EnsureContentSizeFitter(KepRemapPanel panel)
private static void AdjustSizeAndPos(KepRemapPanel panel)
{
var content = panel.keyRemapContainer.parent.gameObject;
if (content.GetComponent<ContentSizeFitter>() is not null)
Expand Down Expand Up @@ -115,7 +115,7 @@ internal static void CalculateVerticalMaxForGamepad(KepRemapPanel panel)
panel.maxVertical = gamepadKeyCount / maxItemsInRow;

var layoutElement = EnsureLayoutElement(panel);
layoutElement.minHeight += (panel.maxVertical + 2) * panel.verticalOffset;
layoutElement.minHeight += (panel.maxVertical + 3) * panel.verticalOffset;
}

internal static void ResetLoadedInputActions()
Expand Down

0 comments on commit beb96b7

Please sign in to comment.