Skip to content

Commit

Permalink
fix: offset of CustomGUIFront/CustomGUIBack to the left
Browse files Browse the repository at this point in the history
  • Loading branch information
MSchmoecker committed Feb 1, 2025
1 parent 3eb1439 commit 78d5acf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Version 2.23.2
* Fixed CustomGUIFront and CustomGUIBack offset slightly to the left
* Fixed Nuget package could not be installed to do changes in the build pipeline

## Version 2.23.1
* Fixed RPCs could be sent twice or to the wrong players if a specific target id is used

Expand Down
6 changes: 6 additions & 0 deletions JotunnLib/Managers/GUIManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,9 @@ private void CreateCustomGUI(Transform parent)
CustomGUIFront.transform.SetAsLastSibling();
CustomGUIFront.GetComponent<RectTransform>().anchorMin = Vector2.zero;
CustomGUIFront.GetComponent<RectTransform>().anchorMax = Vector2.one;
CustomGUIFront.GetComponent<RectTransform>().offsetMin = Vector2.zero;
CustomGUIFront.GetComponent<RectTransform>().offsetMax = Vector2.zero;
CustomGUIFront.GetComponent<RectTransform>().anchoredPosition = Vector2.zero;

#pragma warning disable CS0618 // Type or member is obsolete
PixelFix = CustomGUIFront;
Expand All @@ -545,6 +548,9 @@ private void CreateCustomGUI(Transform parent)
CustomGUIBack.transform.SetAsFirstSibling();
CustomGUIBack.GetComponent<RectTransform>().anchorMin = Vector2.zero;
CustomGUIBack.GetComponent<RectTransform>().anchorMax = Vector2.one;
CustomGUIBack.GetComponent<RectTransform>().offsetMin = Vector2.zero;
CustomGUIBack.GetComponent<RectTransform>().offsetMax = Vector2.zero;
CustomGUIBack.GetComponent<RectTransform>().anchoredPosition = Vector2.zero;

#pragma warning disable CS0612 // Method is obsolete
InvokeOnPixelFixCreated();
Expand Down

0 comments on commit 78d5acf

Please sign in to comment.