void on_object() { if (can_show_object_panel() == false) { return; } visiblePanel = VisiblePanel.ObjectPanel; update_visibility(); }
// Use this for initialization public void Start() { sceneButton = UnityUIUtil.FindButtonAndAddClickHandler("SceneTab", on_scene); objectButton = UnityUIUtil.FindButtonAndAddClickHandler("ObjectTab", on_object); scenePanel = this.gameObject.FindChildByName("SceneScrollView", true); objectPanel = this.gameObject.FindChildByName("ObjectScrollView", true); visiblePanel = VisiblePanel.ObjectPanel; update_visibility(); panelSetup = this; }
void update_tabs() { if (CCActions.CurrentViewMode == AppViewMode.PrintView) { objectButton.gameObject.SetVisible(true); } else { objectButton.gameObject.SetVisible(false); if (visiblePanel == VisiblePanel.ObjectPanel) { visiblePanel = VisiblePanel.ScenePanel; update_visibility(); } } }
void on_scene() { visiblePanel = VisiblePanel.ScenePanel; update_visibility(); }