Exemple #1
0
 public override void Unload()
 {
     base.Unload();
     if (UIEditor.UIEditor.Instance != null)
     {
         UIEditor.UIEditor.Instance.UIStateMachine.Remove(RecipeGraphUI);
     }
     Instance          = null;
     Graph             = null;
     QuickRecipeHotkey = null;
     RecipeGraphUI     = null;
 }
Exemple #2
0
        public override void PostSetupContent()
        {
            base.PostSetupContent();

            RecipeGraphUI = new RecipeGraphState();
            UIEditor.UIEditor.Instance.AddState(RecipeGraphUI);
            UIImageButton modButton = new UIImageButton()
            {
                Texture      = GetTexture("Images/搜索"),
                WhiteTexture = GetTexture("Images/搜索 白边"),
                Tooltip      = "切换合成图面板",
            };

            modButton.OnClick += ModButton_OnClick;
            UIEditor.UIEditor.Instance.AddToolBarButton(modButton);
        }