Add new modifiers, settings, and page buttons

This commit is contained in:
Atony committed 2026-10-16 14:57:56 -05:00
1 parent 8fa6903a8d
commit 0b85c9fe96
12 files changed
+41 -7

No files matched your search

+6 -7
View File
@@ -661,9 +661,9 @@ public static class RoleGuidePatches
instance.TabButtons[2].transform.parent);
SetupTabButton(
modifiersButton,
MiraAssets.WikiRolesButtonIdleSprite,
MiraAssets.WikiRolesButtonOpenSprite,
MiraAssets.WikiRolesButtonHoverSprite);
MiraAssets.WikiModifiersButtonIdleSprite,
MiraAssets.WikiModifiersButtonOpenSprite,
MiraAssets.WikiModifiersButtonHoverSprite);
modifiersButton.OnClick = new Button.ButtonClickedEvent();
modifiersButton.OnClick.AddListener((Action)(() => OpenModifiersTab()));
instance.TabButtons.Add(modifiersButton);
@@ -2189,10 +2189,10 @@ public static class RoleGuidePatches
SearchSortingGroupButton.gameObject.SetActive(paginationVisible);
}
private static void SetPaginationSprites(SpriteRenderer idle, SpriteRenderer hover, bool flip)
private static void SetPaginationSprites(SpriteRenderer idle, SpriteRenderer hover, bool isLeft)
{
var idleSprite = MiraAssets.NextButton.LoadAsset();
var hoverSprite = MiraAssets.NextButtonActive.LoadAsset();
var idleSprite = isLeft ? MiraAssets.PageLeftIdle.LoadAsset() : MiraAssets.PageRightIdle.LoadAsset();
var hoverSprite = isLeft ? MiraAssets.PageLeftHover.LoadAsset() : MiraAssets.PageRightHover.LoadAsset();
// Match the on-screen size of the sort icon being replaced, since the arrow art differs in size.
var currentHeight = idle.sprite ? idle.sprite.bounds.size.y * idle.transform.localScale.y : 0f;
@@ -2201,7 +2201,6 @@ public static class RoleGuidePatches
idle.sprite = idleSprite;
hover.sprite = hoverSprite;
idle.flipX = hover.flipX = flip;
idle.transform.localScale = hover.transform.localScale = new Vector3(scale, scale, 1f);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

+35
View File
@@ -205,6 +205,21 @@ public static class MiraAssets
/// </summary>
public static LoadableResourceAsset WikiRolesButtonOpenSprite { get; } = new("MiraAPI.Resources.Wiki.SidebarRolesButtonOpen.png");
/// <summary>
/// Gets the sprite used for the modifiers button while hovering.
/// </summary>
public static LoadableResourceAsset WikiModifiersButtonHoverSprite { get; } = new("MiraAPI.Resources.Wiki.SidebarModifiersButtonHover.png");
/// <summary>
/// Gets the sprite used for the modifiers button while hovering.
/// </summary>
public static LoadableResourceAsset WikiModifiersButtonIdleSprite { get; } = new("MiraAPI.Resources.Wiki.SidebarModifiersButtonIdle.png");
/// <summary>
/// Gets the sprite used for the modifiers button while hovering.
/// </summary>
public static LoadableResourceAsset WikiModifiersButtonOpenSprite { get; } = new("MiraAPI.Resources.Wiki.SidebarModifiersButtonOpen.png");
/// <summary>
/// Gets the sprite used for the roles button while hovering.
/// </summary>
@@ -335,5 +350,25 @@ public static class MiraAssets
/// </summary>
public static LoadableResourceAsset IconTerminology { get; } = new("MiraAPI.Resources.Wiki.IconTerminology.png");
/// <summary>
/// Gets the Page switching sprite.
/// </summary>
public static LoadableResourceAsset PageLeftHover { get; } = new("MiraAPI.Resources.Wiki.PageLeftHover.png");
/// <summary>
/// Gets the Page switching sprite.
/// </summary>
public static LoadableResourceAsset PageLeftIdle { get; } = new("MiraAPI.Resources.Wiki.PageLeftIdle.png");
/// <summary>
/// Gets the Page switching sprite.
/// </summary>
public static LoadableResourceAsset PageRightHover { get; } = new("MiraAPI.Resources.Wiki.PageRightHover.png");
/// <summary>
/// Gets the Page switching sprite.
/// </summary>
public static LoadableResourceAsset PageRightIdle { get; } = new("MiraAPI.Resources.Wiki.PageRightIdle.png");
internal static LoadableResourceAsset BlankSprite { get; } = new("MiraAPI.Resources.BlankSprite.png");
}