Exemplo n.º 1
0
 /// <summary>
 /// Rebuild top menu to allow all current contexts to be selected
 /// </summary>
 void UpdateTopMenu()
 {
     leftPanel.EraseButtons();
     lastSelectedContextButton = null;
     foreach (OVRInspectorContextDetails details in contextList)
     {
         if (!details.GoesLastOnMenu())
         {
             AddContextButton(details);
         }
     }
     //Add a button to close the menu
     recenterButton      = leftPanel.AddButton("Recenter Camera", delegate { Recenter(); }, buttonPrefab);
     resetButton         = leftPanel.AddButton("Reset tools", delegate { resetTools(); }, buttonPrefab);
     dismissInstructions = leftPanel.AddButton("Disable Instructions", delegate { instructions(false); }, buttonPrefab);
     startInstructions   = leftPanel.AddButton("Reset Instructions", delegate { instructions(true); }, buttonPrefab);
     if (allowClose)
     {
         leftPanel.AddButton("Close", delegate { Hide(); }, buttonPrefab);
     }
     foreach (OVRInspectorContextDetails details in contextList)
     {
         if (details.GoesLastOnMenu())
         {
             AddContextButton(details);
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Rebuild top menu to allow all current contexts to be selected
 /// </summary>
 void UpdateTopMenu()
 {
     leftPanel.EraseButtons();
     lastSelectedContextButton = null;
     foreach (OVRInspectorContextDetails details in contextList)
     {
         if (!details.GoesLastOnMenu())
         {
             AddContextButton(details);
         }
     }
     //Add a button to close the menu
     recenterButton = leftPanel.AddButton("Recenter", delegate { Recenter(); }, buttonPrefab);
     if (allowClose)
     {
         leftPanel.AddButton("Close", delegate { Hide(); }, buttonPrefab);
     }
     foreach (OVRInspectorContextDetails details in contextList)
     {
         if (details.GoesLastOnMenu())
         {
             AddContextButton(details);
         }
     }
 }
Exemplo n.º 3
0
    /// <summary>
    /// Make the current context update its UI
    /// </summary>
    public void UpdateContextMenu()
    {
        controlsPanel.EraseButtons();
        currentContext.BuildUI(this);
        var panel = centerPanel.panel;
        var rect  = panel.GetComponent <ScrollRect>();

        if (currentContext.panel != null)
        {
            rect.content = (RectTransform)currentContext.panel.transform;
        }
    }
Exemplo n.º 4
0
 /// <summary>
 /// Make the current context update its UI
 /// </summary>
 public void UpdateContextMenu()
 {
     controlsPanel.EraseButtons();
     currentContext.BuildUI(this);
 }