Skip to content

VRCMG/ActionMenuApi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License


ActionMenuApi

Currently in the process the rewriting old script used in my other mod "ActionMenuUtils"
Request Feature

Table of Contents

  1. Info
  2. Getting Started
  3. Usage
  4. License
  5. Acknowledgements

Info

Preview

Now supports the

  • Radial puppet
  • Four Axis puppet
  • Button
  • Toggle
  • SubMenu

Currently you can't (yet) nest a submenu within a custom submenu

Working on

  • Correct placement of the radial/four axis puppet

Getting Started

To use simply add ActionMenuApi to your mods folder and reference it in your project same way as with UIX

Building

  1. Clone the repo
    git clone https://github.com/gompocp/ActionMenuApi.git
  2. Fix references (all available in VRChat\MelonLoader\Managed
  3. Configure the solution build configuration and click build

Usage

using ActionMenuApi;
/*

Code

*/

//To add a button to the main page of the action menu
AMAPI.AddButtonPedalToMenu(ActionMenuPageType.Main, () => MelonLogger.Msg("Pressed Button") , "Button", buttonIcon);

//To add a toggle to the main page of the action menu
AMAPI.AddTogglePedalToMenu(ActionMenuPageType.Main, testBool, b => testBool = b, "Toggle", toggleIcon);

//To add a radial pedal to the main page of the action menu
AMAPI.AddRadialPedalToMenu(ActionMenuPageType.Main, f => testFloatValue = f, "Radial", testFloatValue, radialIcon);

//To add a submenu to the main page of the action menu and add a toggle and button to it
AMAPI.AddSubMenuToMenu(ActionMenuPageType.Main, 
    delegate {
        MelonLogger.Msg("Sub Menu Opened");
        AMAPI.AddButtonPedalToSubMenu(() => MelonLogger.Msg("Pressed Button In Sub Menu"), "Sub Menu Button", buttonIcon);
        AMAPI.AddTogglePedalToSubMenu(b => testBool2 = b, testBool2, "Sub Menu Toggle", toggleIcon);
    },
    "Sub Menu", 
    subMenuIcon
);

For a mod example check out the test mod here

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Project Link: https://github.com/gompocp/ActionMenuApi

Acknowledgements

  • XRef method from BenjaminZehowlt
  • Knah for his native hooking example and assetbundle loading example

About

wip API for VRChat's Action Menu

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C# 100.0%