Ejemplo n.º 1
0
    /// <summary>
    /// Register a new context for that will appear on the top level menu.
    /// </summary>
    /// <param name="context">Interface that will be used to build UI when this context is activated</param>
    /// <param name="subContextID">An ID that is passed back to the context. Useful if this interface supports more than one context</param>
    /// <param name="setCurrent">If true this context will be immediately activiated</param>
    public void RegisterContext(IOVRInspectorContext context, int subContextID, bool setCurrent = false)
    {
        OVRInspectorContextDetails contextDetails = new OVRInspectorContextDetails(context, subContextID);

        contextList.Add(contextDetails);
        if (currentContext == null || setCurrent)
        {
            ContextActivated(contextDetails);
        }
        UpdateTopMenu();
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Construct from an existing UI panel
 /// </summary>
 public OVRInspectorContextDetails(GameObject panel)
 {
     context    = null;
     this.panel = panel;
 }
Ejemplo n.º 3
0
    public GameObject panel;             // If present context should be null

    /// <summary>
    /// Construct from IOVRInspectorContext which can build the UI
    /// </summary>
    public OVRInspectorContextDetails(IOVRInspectorContext context, int subContext)
    {
        this.context    = context;
        this.subContext = subContext;
        panel           = null;
    }