public override ContextMenuStrip GetContextMenu(ItemContextMenuRequestEventArgs requestEventArgs)
 {
     if (Repository != null)
     {
         var menu = new ConfigurationMenu(Repository);
         Utility.MarkDropDownForAutoDispose(menu);
         return(menu);
     }
     else
     {
         return(null);
     }
 }
예제 #2
0
    public static void Init()
    {
        thisWindowReference = EditorWindow.GetWindow(typeof(EditorWindowBase));
        windowWidth         = EditorWindow.focusedWindow.position.width;
        windowHeight        = EditorWindow.focusedWindow.position.height;
        buttonMenuRect      = new Rect(0.01f * windowWidth, 0.01f * windowHeight, windowWidth * 0.98f, windowHeight * 0.10f);
        leftMenuRect        = new Rect(0.01f * windowWidth, 0.12f * windowHeight, windowWidth * 0.14f, windowHeight * 0.87f);
        windowRect          = new Rect(0.16f * windowWidth, 0.12f * windowHeight, windowWidth * 0.83f, windowHeight * 0.85f);

        leftSubMenuSkin             = (GUISkin)Resources.Load("Editor/EditorLeftMenuItemSkin", typeof(GUISkin));
        leftSubMenuConcreteItemSkin =
            (GUISkin)Resources.Load("Editor/EditorLeftMenuItemSkinConcreteOptions", typeof(GUISkin));

        redoTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/redo", typeof(Texture2D));
        undoTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/undo", typeof(Texture2D));

        addTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/addNode", typeof(Texture2D));

        deleteImg    = (Texture2D)Resources.Load("EAdventureData/img/icons/deleteContent", typeof(Texture2D));
        duplicateImg = (Texture2D)Resources.Load("EAdventureData/img/icons/duplicateNode", typeof(Texture2D));

        sceneTexture        = (Texture2D)Resources.Load("EAdventureData/img/icons/scenes", typeof(Texture2D));
        cutsceneTexture     = (Texture2D)Resources.Load("EAdventureData/img/icons/cutscenes", typeof(Texture2D));
        bookTexture         = (Texture2D)Resources.Load("EAdventureData/img/icons/books", typeof(Texture2D));
        itemTexture         = (Texture2D)Resources.Load("EAdventureData/img/icons/items", typeof(Texture2D));
        setItemTexture      = (Texture2D)Resources.Load("EAdventureData/img/icons/Atrezzo-List-1", typeof(Texture2D));
        playerTexture       = (Texture2D)Resources.Load("EAdventureData/img/icons/player", typeof(Texture2D));
        characterTexture    = (Texture2D)Resources.Load("EAdventureData/img/icons/npcs", typeof(Texture2D));
        conversationTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/conversations", typeof(Texture2D));
        advancedTexture     = (Texture2D)Resources.Load("EAdventureData/img/icons/advanced", typeof(Texture2D));
        adaptationTexture   =
            (Texture2D)Resources.Load("EAdventureData/img/icons/adaptationProfiles", typeof(Texture2D));
        assessmentTexture =
            (Texture2D)Resources.Load("EAdventureData/img/icons/assessmentProfiles", typeof(Texture2D));

        thisWindowReference.Show();

        fileMenu          = new FileMenu();
        editMenu          = new EditMenu();
        adventureMenu     = new AdventureMenu();
        chaptersMenu      = new ChaptersMenu();
        runMenu           = new RunMenu();
        configurationMenu = new ConfigurationMenu();
        aboutMenu         = new AboutMenu();

        InitGUI();
    }
        public override void Initialise()
        {
            base.Initialise();

            PluginName         = "BuildYourOwnRoutineCore";
            KeyboardHelper     = new KeyboardHelper(GameController);
            ExtensionCache     = new ExtensionCache();
            ExtensionParameter = new ExtensionParameter(this);

            ProfileDirectory   = PluginDirectory + @"/Profile/";
            ExtensionDirectory = PluginDirectory + @"/Extension/";
            ExtensionLoader.LoadAllExtensions(ExtensionCache, ExtensionDirectory);
            ProcessLoadedExtensions();

            ConfigurationMenu = new ConfigurationMenu(this);

            CreateAndStartTreeFromLoadedProfile();

            Settings.TicksPerSecond.OnValueChanged += UpdateCoroutineWaitRender;
        }
예제 #4
0
    public override void OnInspectorGUI()
    {
        serializedObject.Update();

        DrawDefaultInspector();
        EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator();

        ConfigurationMenu myScript = (ConfigurationMenu)target;

        EditorGUILayout.LabelField("Fields assigned by button");
        EditorGUILayout.ObjectField("Button Music", myScript.ButtonMusic, typeof(Image), false);

        if (GUILayout.Button("Get Components & Prefabs"))
        {
            var buttonMusicField = serializedObject.FindProperty("buttonMusic");
            var buttonMusic      = GameObject.FindGameObjectWithTag("ButtonMusic").GetComponent <Image>();
            buttonMusicField.objectReferenceValue = buttonMusic;
        }

        serializedObject.ApplyModifiedProperties();
    }
예제 #5
0
 public BuildYourOwnRoutineCore()
 {
     ConfigurationMenu = new ConfigurationMenu(this);
 }
예제 #6
0
 public override void DrawSettings()
 {
     ConfigurationMenu.Render();
 }