VRMenu.CreateInteractionToggleButton C# (CSharp) Method

CreateInteractionToggleButton() public method

public CreateInteractionToggleButton ( vrInteraction iInteraction, string iButtonName, vrWidgetMenu iParentMenu, vrCommand.Delegate iButtonHandler ) : void
iInteraction vrInteraction
iButtonName string
iParentMenu vrWidgetMenu
iButtonHandler vrCommand.Delegate
return void
    public void CreateInteractionToggleButton(vrInteraction iInteraction, string iButtonName, vrWidgetMenu iParentMenu, vrCommand.Delegate iButtonHandler)
    {
        string itName = iInteraction.GetName();

        vrCommand newCommand = new vrCommand("VRMenu." + itName + "ToggleCommand", iButtonHandler);
        m_Commands.Add(itName, newCommand);

        vrWidgetToggleButton button = new vrWidgetToggleButton("VRMenu." + itName + "ToggleButton", iParentMenu, iButtonName, newCommand, iInteraction.IsActive());
        m_Buttons.Add(itName, button);
    }