summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/GameSettingMenu.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assembly-CSharp/GameSettingMenu.cs')
-rw-r--r--Client/Assembly-CSharp/GameSettingMenu.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/Client/Assembly-CSharp/GameSettingMenu.cs b/Client/Assembly-CSharp/GameSettingMenu.cs
new file mode 100644
index 0000000..d0d80dc
--- /dev/null
+++ b/Client/Assembly-CSharp/GameSettingMenu.cs
@@ -0,0 +1,37 @@
+using System;
+using UnityEngine;
+
+public class GameSettingMenu : MonoBehaviour
+{
+ public Transform[] AllItems;
+
+ public float YStart;
+
+ public float YOffset;
+
+ public Transform[] HideForOnline;
+
+ private void OnEnable()
+ {
+ int num = 0;
+ for (int i = 0; i < this.AllItems.Length; i++)
+ {
+ Transform transform = this.AllItems[i];
+ if (transform.gameObject.activeSelf)
+ {
+ if ((AmongUsClient.Instance.GameMode == GameModes.OnlineGame && this.HideForOnline.IndexOf(transform) != -1) || transform.name == "MapName")
+ {
+ transform.gameObject.SetActive(false);
+ }
+ else
+ {
+ Vector3 localPosition = transform.localPosition;
+ localPosition.y = this.YStart - (float)num * this.YOffset;
+ transform.localPosition = localPosition;
+ num++;
+ }
+ }
+ }
+ base.GetComponent<Scroller>().YBounds.max = (float)num * this.YOffset / 2f + 0.1f;
+ }
+}