Format scripts

This commit is contained in:
2025-09-11 20:59:11 -07:00
parent ff2acc233e
commit bd1b02236b
10 changed files with 30 additions and 21 deletions

View File

@@ -200,7 +200,8 @@ public class ChatroomMenu : MonoBehaviour
optionsPanel.SetActive(false); optionsPanel.SetActive(false);
editMessage.SetActive(true); editMessage.SetActive(true);
}); });
optionsPanelReportButton.onClick.AddListener(() => { optionsPanelReportButton.onClick.AddListener(() =>
{
reportMessagePanelReportReason.text = ""; reportMessagePanelReportReason.text = "";
optionsPanel.SetActive(false); optionsPanel.SetActive(false);
reportMessagePanel.SetActive(true); reportMessagePanel.SetActive(true);

View File

@@ -1,17 +1,21 @@
using UnityEngine; using UnityEngine;
public class HideIfSettingFalse : MonoBehaviour { public class HideIfSettingFalse : MonoBehaviour
{
public SettingTypes setting; public SettingTypes setting;
public bool reverse; public bool reverse;
void Start() { void Start()
{
bool value = GetSettingValue(setting); bool value = GetSettingValue(setting);
gameObject.SetActive(value == !reverse); gameObject.SetActive(value == !reverse);
} }
bool GetSettingValue(SettingTypes s) { bool GetSettingValue(SettingTypes s)
{
var b = BazookaManager.Instance; var b = BazookaManager.Instance;
return s switch { return s switch
{
SettingTypes.FullScreen => b.GetSettingFullScreen(), SettingTypes.FullScreen => b.GetSettingFullScreen(),
SettingTypes.ShowFPS => b.GetSettingShowFPS(), SettingTypes.ShowFPS => b.GetSettingShowFPS(),
SettingTypes.Vsync => b.GetSettingVsync(), SettingTypes.Vsync => b.GetSettingVsync(),

View File

@@ -96,7 +96,7 @@ public class SettingsMenu : MonoBehaviour
{ {
var type = color == -1 ? colorType : color; var type = color == -1 ? colorType : color;
var text = colorMenu.transform.GetChild(0).GetComponent<TMP_Text>(); var text = colorMenu.transform.GetChild(0).GetComponent<TMP_Text>();
var colorToSet = new JArray(255, 255, 255);; var colorToSet = new JArray(255, 255, 255);
switch (type) switch (type)
{ {
case 0: //IGBGColor case 0: //IGBGColor

View File

@@ -3,7 +3,8 @@ using Newtonsoft.Json;
using System.Numerics; using System.Numerics;
[Preserve] [Preserve]
public class ChatroomMessage { public class ChatroomMessage
{
[Preserve] [Preserve]
[JsonProperty("username")] [JsonProperty("username")]
public string Username { get; set; } public string Username { get; set; }

View File

@@ -2,7 +2,8 @@ using System;
using System.Numerics; using System.Numerics;
using Newtonsoft.Json; using Newtonsoft.Json;
public class MarketplaceIconStorageType { public class MarketplaceIconStorageType
{
[JsonProperty("selected")] [JsonProperty("selected")]
public string Selected { get; set; } = null; public string Selected { get; set; } = null;
[JsonProperty("balance")] [JsonProperty("balance")]

View File

@@ -3,7 +3,8 @@ using Newtonsoft.Json;
using System.Numerics; using System.Numerics;
[Preserve] [Preserve]
public class MarketplaceIconType { public class MarketplaceIconType
{
[Preserve] [Preserve]
[JsonProperty("username")] [JsonProperty("username")]
public string CreatorUsername { get; set; } public string CreatorUsername { get; set; }

View File

@@ -3,7 +3,8 @@ using Newtonsoft.Json;
using System.Numerics; using System.Numerics;
[Preserve] [Preserve]
public class ProfileMessageResponse { public class ProfileMessageResponse
{
[Preserve] [Preserve]
[JsonProperty("id")] [JsonProperty("id")]
public BigInteger ID { get; set; } public BigInteger ID { get; set; }