├── Resources
├── online.jpg
├── standard.jpg
├── repo-banner.jpg
└── uitweaks-logo-pdn.jpg
├── UITweaks
├── Directory.Build.props
├── manifest.json
├── Models
│ ├── UITweaksConfigBase.cs
│ ├── PreviewPanel.cs
│ └── PanelDecoratorBase.cs
├── Views
│ ├── ObjectPreview.bsml
│ ├── Info.bsml
│ └── ModSettings.bsml
├── Utilities
│ ├── RainbowEffectManager.cs
│ ├── MultiplayerEnergyBarCoroutineHandler.cs
│ ├── SettableSettings
│ │ ├── UITweaksSettingsWrapper.cs
│ │ └── UITweaksSettableSettings.cs
│ ├── Utilities.cs
│ └── HSBColor.cs
├── Installers
│ ├── TweaksMenuInstaller.cs
│ ├── TweaksPanelDecoratorInstaller.cs
│ └── TweaksAppInstaller.cs
├── PluginConfig.cs
├── UI
│ ├── MenuButtonManager.cs
│ ├── UITweaksFlowCoordinator.cs
│ ├── ModInfoViewController.cs
│ ├── MockMultiplayerPositionPanel.cs
│ ├── SettingsPanelObjectGrabber.cs
│ ├── ModSettingsViewController.cs
│ └── ObjectPreviewViewController.cs
├── Config
│ ├── EnergyConfig.cs
│ ├── MultiplierConfig.cs
│ ├── ProgressConfig.cs
│ ├── PositionConfig.cs
│ ├── ComboConfig.cs
│ └── MiscConfig.cs
├── Plugin.cs
├── Decorators
│ ├── ComboPanelDecorator.cs
│ ├── SongProgressPanelDecorator.cs
│ ├── MultiplayerPositionPanelDecorator.cs
│ ├── EnergyBarPanelDecorator.cs
│ ├── ScoreMultiplierPanelDecorator.cs
│ └── ExtraPanelDecorator.cs
└── UITweaks.csproj
├── .gitignore
├── .github
└── FUNDING.yml
├── LICENSE
├── README.md
├── UITweaks.sln
└── CONTRIBUTING.md
/Resources/online.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Exomanz/UITweaks/HEAD/Resources/online.jpg
--------------------------------------------------------------------------------
/Resources/standard.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Exomanz/UITweaks/HEAD/Resources/standard.jpg
--------------------------------------------------------------------------------
/Resources/repo-banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Exomanz/UITweaks/HEAD/Resources/repo-banner.jpg
--------------------------------------------------------------------------------
/Resources/uitweaks-logo-pdn.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Exomanz/UITweaks/HEAD/Resources/uitweaks-logo-pdn.jpg
--------------------------------------------------------------------------------
/UITweaks/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | True
6 | BSIPA
7 |
8 |
--------------------------------------------------------------------------------
/UITweaks/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://raw.githubusercontent.com/bsmg/BSIPA-MetadataFileSchema/master/Schema.json",
3 | "id": "UITweaks",
4 | "name": "UITweaks",
5 | "author": "Exomanz",
6 | "version": "4.0.5",
7 | "description": "Add some color to your in-game HUD!",
8 | "gameVersion": "1.38.0",
9 | "dependsOn": {
10 | "BSIPA": "^4.3.5",
11 | "SiraUtil": "^3.1.12",
12 | "BeatSaberMarkupLanguage": "^1.12.3"
13 | }
14 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3 | ################################################################################
4 |
5 | /UITweaks/obj/Release
6 | /UITweaks/obj
7 | /UITweaks/bin/Release
8 | /UITweaks/bin/Debug
9 | /UITweaks/UITweaks.csproj.user
10 | /.vs/UITweaks
11 | /.vs/
12 | /UITweaks/.vs/
13 | ./Wiki/UITweaks.wiki
14 | /Resources/*.pdn
--------------------------------------------------------------------------------
/UITweaks/Models/UITweaksConfigBase.cs:
--------------------------------------------------------------------------------
1 | namespace UITweaks.Models
2 | {
3 | ///
4 | /// Helper class that allows for easy Zenject-ification.
5 | ///
All configs inherit this class.
6 | ///
7 | public abstract class UITweaksConfigBase
8 | {
9 | ///
10 | /// Controls whether a PanelDecorator is active in the given context.
11 | ///
12 | public virtual bool Enabled { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: exo_manz
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
14 |
--------------------------------------------------------------------------------
/UITweaks/Views/ObjectPreview.bsml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/UITweaks/Utilities/RainbowEffectManager.cs:
--------------------------------------------------------------------------------
1 | using UITweaks.Config;
2 | using UnityEngine;
3 | using Zenject;
4 |
5 | namespace UITweaks.Utilities
6 | {
7 | internal class RainbowEffectManager : ITickable
8 | {
9 | [Inject] private readonly MiscConfig miscConfig;
10 |
11 | ///
12 | /// The which controls the rainbow effect that UITweaks uses. All objects which use this effect will be in sync.
13 | ///
14 | /// This property is updated every frame.
15 | public Color Rainbow { get; private set; }
16 |
17 | [Inject] public RainbowEffectManager() { }
18 |
19 | public void Tick()
20 | {
21 | this.Rainbow = new HSBColor(
22 | Mathf.PingPong(Time.time * miscConfig.GlobalRainbowSpeed, 1),
23 | 1,
24 | 1)
25 | .ToColor();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/UITweaks/Installers/TweaksMenuInstaller.cs:
--------------------------------------------------------------------------------
1 | using UITweaks.UI;
2 | using UnityEngine;
3 | using Zenject;
4 |
5 | namespace UITweaks.Installers
6 | {
7 | public class TweaksMenuInstaller : Installer
8 | {
9 | public override void InstallBindings()
10 | {
11 | Container.Bind().FromNewComponentAsViewController().AsSingle();
12 | Container.Bind().FromNewComponentAsViewController().AsSingle();
13 | Container.Bind().FromNewComponentAsViewController().AsSingle();
14 | Container.Bind().FromNewComponentOn(new GameObject("SettingsPanelObjectGrabber")).AsSingle();
15 |
16 | Container.Bind().FromNewComponentOn(new GameObject("UITweaksFlowCoordinator")).AsSingle();
17 | Container.BindInterfacesAndSelfTo().AsSingle();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/UITweaks/PluginConfig.cs:
--------------------------------------------------------------------------------
1 | using IPA.Config.Stores.Attributes;
2 | using UITweaks.Config;
3 |
4 | namespace UITweaks
5 | {
6 | public class PluginConfig
7 | {
8 | public virtual bool AllowAprilFools { get; set; } = true;
9 |
10 | [NonNullable]
11 | public virtual MultiplierConfig Multiplier { get; set; } = new MultiplierConfig();
12 |
13 | [NonNullable]
14 | public virtual ComboConfig Combo { get; set; } = new ComboConfig();
15 |
16 | [NonNullable]
17 | public virtual EnergyConfig Energy { get; set; } = new EnergyConfig();
18 |
19 | [NonNullable]
20 | public virtual ProgressConfig Progress { get; set; } = new ProgressConfig();
21 |
22 | [NonNullable]
23 | public virtual PositionConfig Position { get; set; } = new PositionConfig();
24 |
25 | [NonNullable]
26 | public virtual MiscConfig Misc { get; set; } = new MiscConfig();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/UITweaks/UI/MenuButtonManager.cs:
--------------------------------------------------------------------------------
1 | using BeatSaberMarkupLanguage.MenuButtons;
2 | using HMUI;
3 | using System;
4 | using Zenject;
5 |
6 | namespace UITweaks.UI
7 | {
8 | internal class MenuButtonManager : IInitializable, IDisposable
9 | {
10 | [Inject] private readonly MainFlowCoordinator mainFlowCoordinator;
11 | [Inject] private readonly UITweaksFlowCoordinator modFlowCoordinator;
12 | private MenuButton button;
13 |
14 | public void Initialize()
15 | {
16 | button = new MenuButton("UI Tweaks", "Spice up your HUD!", () =>
17 | {
18 | mainFlowCoordinator.PresentFlowCoordinator(modFlowCoordinator, null, ViewController.AnimationDirection.Vertical);
19 | });
20 | MenuButtons.Instance.RegisterButton(button);
21 | }
22 |
23 | public void Dispose()
24 | {
25 | if (button != null)
26 | MenuButtons.Instance.UnregisterButton(button);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/UITweaks/Utilities/MultiplayerEnergyBarCoroutineHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using UITweaks.PanelModifiers;
3 | using UnityEngine;
4 | using Zenject;
5 |
6 | namespace UITweaks.Utilities
7 | {
8 | internal class MultiplayerEnergyBarCoroutineHandler : MonoBehaviour
9 | {
10 | [Inject] private readonly EnergyBarPanelDecorator energyBarPanelDecorator;
11 | [Inject] private readonly GameplayModifiers gameplayModifiers;
12 |
13 | public void Start()
14 | {
15 | transform.SetParent(base.transform);
16 | gameObject.SetActive(true);
17 | base.StartCoroutine(PrepareMultiplayerEnergyBarColorsForEnergyType(gameplayModifiers.energyType));
18 | }
19 |
20 | private IEnumerator PrepareMultiplayerEnergyBarColorsForEnergyType(GameplayModifiers.EnergyType energyType)
21 | {
22 | yield return StartCoroutine(energyBarPanelDecorator.BatteryEnergyAndOneLifeSetup(energyType));
23 | gameObject.SetActive(false);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Exomanz
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/UITweaks/Models/PreviewPanel.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace UITweaks.Models
4 | {
5 | ///
6 | /// Helper class which contains some useful properties for preview panel iteration and code reusability.
7 | ///
8 | public class PreviewPanel
9 | {
10 | ///
11 | /// The parent of the panel being previewed.
12 | ///
13 | public GameObject Panel { get; set; }
14 |
15 | ///
16 | /// The settings tab index this panel is active on.
17 | ///
18 | public int ActiveTab { get; set; }
19 |
20 | ///
21 | /// Creates a new instance of a with a given parent object and settings tab index.
22 | ///
23 | /// The index of the settings page this panel will appear on.
24 | /// The parent of the panel being previewed.
25 | public PreviewPanel(int activeTab, GameObject panel)
26 | {
27 | ActiveTab = activeTab;
28 | Panel = panel;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/UITweaks/UI/UITweaksFlowCoordinator.cs:
--------------------------------------------------------------------------------
1 | using BeatSaberMarkupLanguage;
2 | using HMUI;
3 | using Zenject;
4 |
5 | namespace UITweaks.UI
6 | {
7 | internal class UITweaksFlowCoordinator : FlowCoordinator
8 | {
9 | [Inject] private readonly MainFlowCoordinator mainFlowCoordinator;
10 | [Inject] private readonly ModSettingsViewController settingsView;
11 | [Inject] private readonly ModInfoViewController infoView;
12 | [Inject] private readonly ObjectPreviewViewController previewView;
13 |
14 | protected override void DidActivate(bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling)
15 | {
16 | if (firstActivation && addedToHierarchy)
17 | {
18 | base.SetTitle("UITweaks");
19 | base.ProvideInitialViewControllers(settingsView, infoView, previewView);
20 | base.showBackButton = true;
21 | }
22 | }
23 |
24 | protected override void BackButtonWasPressed(ViewController topViewController)
25 | {
26 | base.BackButtonWasPressed(topViewController);
27 | mainFlowCoordinator.DismissFlowCoordinator(this, null, ViewController.AnimationDirection.Vertical, false);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/UITweaks/Config/EnergyConfig.cs:
--------------------------------------------------------------------------------
1 | using IPA.Config.Stores.Attributes;
2 | using IPA.Config.Stores.Converters;
3 | using UITweaks.Models;
4 | using UnityEngine;
5 |
6 | namespace UITweaks.Config
7 | {
8 | public class EnergyConfig : UITweaksConfigBase
9 | {
10 | public override bool Enabled { get; set; } = true;
11 |
12 | ///
13 | /// If set to , the Energy Bar will play a rainbow animation when you reach full energy.
14 | ///
15 | public virtual bool RainbowOnFullEnergy { get; set; } = false;
16 |
17 | ///
18 | /// The of the leftmost anchor point in the energy bar (0%).
19 | ///
20 | [UseConverter(typeof(HexColorConverter))]
21 | public virtual Color Low { get; set; } = Color.red;
22 |
23 | ///
24 | /// The of the center anchor point in the energy bar (50%).
25 | ///
26 | [UseConverter(typeof(HexColorConverter))]
27 | public virtual Color Mid { get; set; } = Color.yellow;
28 |
29 | ///
30 | /// The of the rightmost anchor point in the energy bar (100%).
31 | ///
32 | [UseConverter(typeof(HexColorConverter))]
33 | public virtual Color High { get; set; } = Color.green;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # 🛠️ UITweaks
4 | A Beat Saber mod that aims to bring more color to the in-game HUD!
5 |
6 | [](https://github.com/Exomanz/UITweaks/releases/latest)
7 | [](https://github.com/Exomanz/UITweaks/commits)
8 |
9 | ## Dependencies:
10 | - BSIPA v4.3.5+
11 | - SiraUtil v3.1.12+
12 | - BeatSaberMarkupLanguage v1.12.3+
13 |
14 | ## Features
15 | - Multiplier ring colors, as well as an option to smoothly transition between them, and an optional rainbow animation on full 8x multiplier.
16 | - Energy bar colors corresponding to your current energy, and an optional rainbow animation on full.
17 | - Combo FC line colors, including optional gradient lines.
18 | - Colors for the progress bar, background, and slider knob. There also exists an option to smoothly transition between two colors as the song progresses.
19 | - Multiplayer player position panel colors for each position, an option to hide the first place animation, and an option for the static panel to use a static color.
20 | - And so much more!
21 |
22 | ## Contributing
23 | Please read the [contributing file](CONTRIBUTING.md) for more information.
24 |
--------------------------------------------------------------------------------
/UITweaks/UI/ModInfoViewController.cs:
--------------------------------------------------------------------------------
1 | using BeatSaberMarkupLanguage.Attributes;
2 | using BeatSaberMarkupLanguage.ViewControllers;
3 | using IPA.Loader;
4 | using SiraUtil.Logging;
5 | using SiraUtil.Zenject;
6 | using UnityEngine;
7 | using Zenject;
8 |
9 | namespace UITweaks.UI
10 | {
11 | [ViewDefinition("UITweaks.Views.Info.bsml")]
12 | [HotReload(RelativePathToLayout = @"..\Views\Info.bsml")]
13 | public class ModInfoViewController : BSMLAutomaticViewController
14 | {
15 | [Inject] private readonly SiraLog logger;
16 | private PluginMetadata meta;
17 |
18 | [Inject]
19 | internal void Construct(UBinder metadata)
20 | {
21 | meta = metadata.Value;
22 | }
23 |
24 | [UIValue("version-text")]
25 | private string Version
26 | {
27 | get => $"Version : {meta.HVersion}";
28 | }
29 |
30 | [UIAction("open-gh-source")]
31 | internal void OpenSourceLink() => Application.OpenURL("https://github.com/Exomanz/UITweaks");
32 |
33 | [UIAction("open-kofi")]
34 | internal void OpenDonateLink() => Application.OpenURL("https://ko-fi.com/exo_manz");
35 |
36 | [UIAction("open-changelog")]
37 | internal void OpenChangelogLink() => Application.OpenURL("https://github.com/Exomanz/UITweaks/commits/");
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/UITweaks.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.0.31919.166
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UITweaks", "UITweaks\UITweaks.csproj", "{4B5D5899-57C0-4FB5-891A-E83DD3071C69}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Heck-Debug|Any CPU = Heck-Debug|Any CPU
12 | Release|Any CPU = Release|Any CPU
13 | EndGlobalSection
14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
15 | {4B5D5899-57C0-4FB5-891A-E83DD3071C69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16 | {4B5D5899-57C0-4FB5-891A-E83DD3071C69}.Debug|Any CPU.Build.0 = Debug|Any CPU
17 | {4B5D5899-57C0-4FB5-891A-E83DD3071C69}.Heck-Debug|Any CPU.ActiveCfg = Heck-Debug|Any CPU
18 | {4B5D5899-57C0-4FB5-891A-E83DD3071C69}.Heck-Debug|Any CPU.Build.0 = Heck-Debug|Any CPU
19 | {4B5D5899-57C0-4FB5-891A-E83DD3071C69}.Release|Any CPU.ActiveCfg = Release|Any CPU
20 | {4B5D5899-57C0-4FB5-891A-E83DD3071C69}.Release|Any CPU.Build.0 = Release|Any CPU
21 | EndGlobalSection
22 | GlobalSection(SolutionProperties) = preSolution
23 | HideSolutionNode = FALSE
24 | EndGlobalSection
25 | GlobalSection(ExtensibilityGlobals) = postSolution
26 | SolutionGuid = {EC8C1BED-52E9-4AB2-B7EA-CCD6FADE45DB}
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/UITweaks/Utilities/SettableSettings/UITweaksSettingsWrapper.cs:
--------------------------------------------------------------------------------
1 | namespace UITweaks.Utilities.SettableSettings
2 | {
3 | #if HECK
4 | using Heck.SettingsSetter;
5 | using System;
6 | using System.Reflection;
7 | using UnityEngine;
8 | public class UITweaksSettingsWrapper : ISettableSetting
9 | {
10 | private readonly PropertyInfo settingsProperty;
11 | private readonly object settingsInstance;
12 |
13 | private object originalValue;
14 |
15 | public string GroupName { get; }
16 | public string FieldName { get; }
17 |
18 | public UITweaksSettingsWrapper(string groupName, string fieldName, PropertyInfo settingsProperty, object settingsInstance)
19 | {
20 | GroupName = groupName;
21 | FieldName = fieldName;
22 |
23 | this.settingsProperty = settingsProperty;
24 | this.settingsInstance = settingsInstance;
25 | }
26 |
27 | public object TrueValue => settingsProperty.GetValue(settingsInstance);
28 |
29 | public void SetTemporary(object tempValue)
30 | {
31 | if (tempValue != null)
32 | {
33 | originalValue = settingsProperty.GetValue(settingsInstance);
34 | settingsProperty.SetValue(settingsInstance, tempValue);
35 | }
36 |
37 | else if (originalValue != null)
38 | {
39 | settingsProperty.SetValue(settingsInstance, originalValue);
40 | originalValue = null;
41 | }
42 | }
43 | }
44 | #endif
45 | }
--------------------------------------------------------------------------------
/UITweaks/Plugin.cs:
--------------------------------------------------------------------------------
1 | using IPA;
2 | using IPA.Config.Stores;
3 | using IPA.Utilities;
4 | using SiraUtil.Zenject;
5 | using System;
6 | using System.Linq;
7 | using UITweaks.Installers;
8 | using IPAConfig = IPA.Config.Config;
9 | using IPALogger = IPA.Logging.Logger;
10 |
11 | namespace UITweaks
12 | {
13 | [Plugin(RuntimeOptions.DynamicInit), NoEnableDisable]
14 | public class Plugin
15 | {
16 | public static bool APRIL_FOOLS
17 | {
18 | get
19 | {
20 | if (Environment.GetCommandLineArgs().Any(x => x.ToLower() == "--uitweaks-aprilfools"))
21 | return true;
22 |
23 | DateTime time = Utils.CurrentTime();
24 | return time.Month == 4 && time.Day == 1;
25 | }
26 | }
27 |
28 | [Init]
29 | public Plugin(IPALogger logger, IPAConfig config, Zenjector zenject)
30 | {
31 | zenject.UseLogger(logger);
32 | zenject.UseMetadataBinder();
33 |
34 | // Singleplayer and Campaign
35 | zenject.Expose("Environment");
36 |
37 | // Multiplayer
38 | zenject.Expose("IsActiveObjects");
39 | zenject.Expose("IsActiveObjects");
40 |
41 | zenject.Install(Location.App, config.Generated());
42 | zenject.Install(Location.Menu);
43 | zenject.Install(Location.Player);
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/UITweaks/UI/MockMultiplayerPositionPanel.cs:
--------------------------------------------------------------------------------
1 | using HMUI;
2 | using UnityEngine;
3 |
4 | namespace UITweaks.UI
5 | {
6 | public class MockMultiplayerPositionPanel : MonoBehaviour
7 | {
8 | [SerializeField] public bool IsSetup { get; private set; } = false;
9 | [SerializeField] public CurvedTextMeshPro positionText;
10 | [SerializeField] public CurvedTextMeshPro playerCountText;
11 |
12 | public void Start()
13 | {
14 | gameObject.SetActive(false);
15 |
16 | var pt = new GameObject("PositionText").AddComponent();
17 | pt.transform.SetParent(this.transform, false);
18 | pt.alignment = TMPro.TextAlignmentOptions.Center;
19 | pt.fontStyle = TMPro.FontStyles.Italic;
20 | pt.text = "1";
21 | pt.transform.localPosition = new Vector3(-20, 0, 0);
22 |
23 | var pct = new GameObject("PlayerCountText").AddComponent();
24 | pct.transform.SetParent(this.transform, false);
25 | pct.alignment = TMPro.TextAlignmentOptions.Center;
26 | pct.fontStyle = TMPro.FontStyles.Italic;
27 | pct.text = "/ 5";
28 | pct.transform.localPosition = new Vector3(10, 0, 0);
29 |
30 | positionText = pt;
31 | playerCountText = pct;
32 |
33 | gameObject.SetActive(true);
34 | gameObject.AddComponent