Exemple #1
0
        public static void Initialize()
        {
            var userInterface = Game.Instance.UserInterface;

            userInterface.AddBuildUserInterfaceXmlAction(UserInterfaceIds.Design.DesignerUi, OnBuildDesignerUI);

            Game.Instance.SceneManager.SceneTransitionStarted += (s, e) => designerToolsUI = null;
        }
Exemple #2
0
 public static void OnOtherFlyoutOpened(IFlyout flyout)
 {
     //Debug.Log ("Flyout Opened");
     _openedFlyout = flyout;
     if (designerToolsUI != null)
     {
         //Debug.Log ("Closing DT Flyout");
         designerToolsUI.Close();
         designerToolsUI = null;
     }
 }
Exemple #3
0
 private static void OnButtonClicked()
 {
     if (designerToolsUI != null)
     {
         designerToolsUI.Close();
         designerToolsUI = null;
         _flyoutButton.SetAndApplyAttribute("colors", "Button|ButtonHover|ButtonPressed|ButtonDisabled");
         _openedFlyout = null;
     }
     else
     {
         var ui = Game.Instance.UserInterface;
         designerToolsUI = ui.BuildUserInterfaceFromResource <DesignerToolsUI> ("DesignerTools/Designer/DesignerTools", (script, controller) => script.OnLayoutRebuilt(controller));
         _designer.DesignerUi.CloseFlyout(_designer.DesignerUi.SelectedFlyout);
         _flyoutButton.SetAndApplyAttribute("colors", "ButtonPressed|ButtonHover|ButtonPressed|ButtonDisabled");
         _openedFlyout = designerToolsUI.flyout;
     }
 }