Skip to content

Commit

Permalink
Fix textures for Toggles,Radial Puppet,Four Axis Puppet
Browse files Browse the repository at this point in the history
  • Loading branch information
gompocp committed May 21, 2021
1 parent 040a13f commit 203bd64
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ActionMenuApi/ActionMenuApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#pragma warning disable 1591
[assembly: MelonInfo(typeof(ActionMenuApi.ActionMenuApi), "ActionMenuApi", "0.2.1", "gompo", "https://github.com/gompocp/ActionMenuApi/releases")]
[assembly: MelonGame("VRChat", "VRChat")]

////PedalOption.prop_Boolean_0 TODO: Note to self to use this sometime in the future
namespace ActionMenuApi
{
public class ActionMenuApi : MelonMod
Expand Down
2 changes: 2 additions & 0 deletions ActionMenuApi/Api/VRCActionMenuPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ internal static void AddPedalToList(ActionMenuPage pageType, PedalStruct customP
else if (insertion == Insertion.Post) Patches.nameplatesOpacityPagePost.Add(customPedal);
return;
case ActionMenuPage.NameplatesSize:
MelonLogger.Warning("Adding to the Nameplates size page isn't supported currently. Please use a different page");
return;
if (insertion == Insertion.Pre) Patches.nameplatesSizePagePre.Add(customPedal);
else if (insertion == Insertion.Post) Patches.nameplatesSizePagePost.Add(customPedal);
return;
Expand Down
4 changes: 2 additions & 2 deletions ActionMenuApi/Stuff/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static PushPageDelegate GetPushPageDelegate



public static void SetBackgroundIcon(this PedalOption pedal, Texture2D icon) => pedal.GetActionButton().prop_Texture2D_0 = icon;
public static void SetBackgroundIcon(this PedalOption pedal, Texture2D icon) => pedal.GetActionButton().prop_Texture2D_2 = icon;

//Only texture2d prop on PedalOption. shouldnt change unless drastic changes are made to the action menu
public static void SetForegroundIcon(this PedalOption pedal, Texture2D icon) => pedal.prop_Texture2D_0 = icon;
Expand Down Expand Up @@ -467,6 +467,6 @@ public static GameObject GetChild(this GameObject gameObject, string childName)
public static void SetFillAngle(this PedalGraphic pedalGraphic, float angle) => pedalGraphic.field_Public_Single_3 = angle;
public static float GetFillAngle(this PedalGraphic pedalGraphic) => pedalGraphic.field_Public_Single_3;
public static Vector2 GetCursorPos(this ActionMenu actionMenu) => actionMenu.field_Private_Vector2_0;
public static void SetPedalTypeIcon(this PedalOption pedalOption, Texture2D icon) => pedalOption.GetActionButton().prop_Texture2D_2 = icon; //No choice needs to be hardcoded in sadly
public static void SetPedalTypeIcon(this PedalOption pedalOption, Texture2D icon) => pedalOption.GetActionButton().prop_Texture2D_0 = icon; //No choice needs to be hardcoded in sadly
}
}

0 comments on commit 203bd64

Please sign in to comment.