GithubHelp home page GithubHelp logo

vrcmg / actionmenuapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gompocp/actionmenuapi

1.0 0.0 0.0 4.08 MB

wip API for VRChat's Action Menu

License: GNU General Public License v3.0

C# 100.00%

actionmenuapi's Introduction

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

actionmenuapi's People

Contributors

gompocp avatar pushldr avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.