mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Merge pull request #105 from TheDavSmasher/paginable-menu-locale
Custom Phone Menu fixes
This commit is contained in:
2 files changed
+12
-2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using MiraAPI.Patches.Stubs;
|
||||
using MiraAPI.Translation;
|
||||
using MiraAPI.Utilities.Assets;
|
||||
using Reactor.Utilities;
|
||||
using Reactor.Utilities.Extensions;
|
||||
@@ -277,7 +278,7 @@ public abstract class CustomPaginableMenu : CustomPhoneMenu<CustomPaginableMenu.
|
||||
if (label != null)
|
||||
{
|
||||
label.name = $"{Name}SearchLabel";
|
||||
label.text = "Search";
|
||||
label.text = MiraLocaleManager.Get("Search", "Search");
|
||||
label.alignment = TextAlignmentOptions.Center;
|
||||
label.fontSize = label.fontSizeMin = label.fontSizeMax = 2.1f;
|
||||
label.color = Color.white;
|
||||
@@ -294,7 +295,7 @@ public abstract class CustomPaginableMenu : CustomPhoneMenu<CustomPaginableMenu.
|
||||
if (noResultsText != null)
|
||||
{
|
||||
noResultsText.name = $"{Name}NoResultsText";
|
||||
noResultsText.text = "No results";
|
||||
noResultsText.text = MiraLocaleManager.Get($"{Name}NoResults", "No results");
|
||||
noResultsText.alignment = TextAlignmentOptions.Center;
|
||||
noResultsText.fontSize = noResultsText.fontSizeMin = noResultsText.fontSizeMax = 2.25f;
|
||||
noResultsText.color = Color.white;
|
||||
|
||||
@@ -328,6 +328,15 @@ public abstract class CustomPhoneMenu : ICustomMenu
|
||||
button.UnselectedColor = uColor;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implicitly converts to the <see cref="Minigame"/> the <see cref="CustomPhoneMenu"/> wraps.
|
||||
/// </summary>
|
||||
/// <param name="menu">The menu instance.</param>
|
||||
public static implicit operator Minigame(CustomPhoneMenu menu)
|
||||
{
|
||||
return menu.Component;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="CustomPhoneMenu"/>
|
||||
|
||||
Reference in new issue
Block a user