コード例 #1
0
    void OnGUI()
    {
        if (BPicon != null)
        {
            GUI.DrawTexture(EditorGUILayout.GetControlRect(GUILayout.Width(BPicon.width), GUILayout.Height(BPicon.height)), BPicon);
        }

        if (editorRender == null || editor == null)
        {
            editorRender = null;
            editor       = null;
        }

        defalutColor = GUI.backgroundColor;
        EditorGUILayout.BeginHorizontal(GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
        GUI.backgroundColor = bgColor;
        EditorGUILayout.BeginVertical(EditorStyles.textArea, GUILayout.Width(150), GUILayout.ExpandHeight(true));
        GUI.backgroundColor = defalutColor;
        tabsScroll          = EditorGUILayout.BeginScrollView(tabsScroll);

        DrawTabs();

        EditorGUILayout.EndVertical();
        EditorGUILayout.EndScrollView();

        GUI.backgroundColor = bgColor;
        EditorGUILayout.BeginVertical(EditorStyles.textArea, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
        GUI.backgroundColor = defalutColor;
        editorScroll        = EditorGUILayout.BeginScrollView(editorScroll);

        if (!string.IsNullOrEmpty(editorTitle))
        {
            DrawTitle(editorTitle);
        }


        if (editor != null)
        {
            editorRender.Invoke();
        }
        else
        {
            GUILayout.Label("Nothing selected");
        }

        EditorGUILayout.EndScrollView();
        EditorGUILayout.EndVertical();
        EditorGUILayout.EndHorizontal();
        GUILayout.Label("Berry Match Three, Fixer, Berry Panel\nYurov Viktor IE (Yurov Viktor) Copyright 2015 - 2016", EditorStyles.centeredGreyMiniLabel, GUILayout.ExpandWidth(true));
    }
コード例 #2
0
    void DrawTabs()
    {
        DrawTabTitle("General");

        if (DrawTabButton("Content"))
        {
            editor            = new ContentManagerEditor();
            editor.onRepaint += Repaint;
            editorRender      = editor.OnInspectorGUI;
        }


        if (DrawTabButton("UI"))
        {
            editor       = new UIManagerEditor();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Audio"))
        {
            editor            = new AudioManagerEditor();
            editor.onRepaint += Repaint;
            editorRender      = editor.OnInspectorGUI;
        }


        if (DrawTabButton("Other"))
        {
            editor       = new ProjectParametersEditor();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Share"))
        {
            editor       = new NativeShareEditor();
            editorRender = editor.OnInspectorGUI;
        }


        DrawTabTitle("Monetization");

        if (DrawTabButton("Advertising"))
        {
            editor       = new AdAssistantEditor();
            editorRender = editor.OnInspectorGUI;
        }
    }
コード例 #3
0
    public void EditLocalization(SystemLanguage _language, string _search = "")
    {
        editor       = new LocalizationAssistantEditor();
        editorRender = editor.OnInspectorGUI;
        LocalizationEditor locEditor = new LocalizationEditor();

        locEditor.scroll = (Vector2 scroll) => {
            editorScroll = scroll;
        };
        editorRender      += locEditor.OnInspectorGUI;
        locEditor.language = _language;
        locEditor.search   = _search;

        locEditor.OnEnable();

        editorTitle = "Localization";
    }
コード例 #4
0
    void OnGUI()
    {
        if (editorRender == null || editor == null)
        {
            editorRender = null;
            editor       = null;
        }

        defalutColor = GUI.backgroundColor;
        EditorGUILayout.BeginHorizontal(GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
        GUI.backgroundColor = bgColor;
        EditorGUILayout.BeginVertical(EditorStyles.textArea, GUILayout.Width(150), GUILayout.ExpandHeight(true));
        GUI.backgroundColor = defalutColor;
        tabsScroll          = EditorGUILayout.BeginScrollView(tabsScroll);

        DrawTabs();

        EditorGUILayout.EndVertical();
        EditorGUILayout.EndScrollView();

        GUI.backgroundColor = bgColor;
        EditorGUILayout.BeginVertical(EditorStyles.textArea, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
        GUI.backgroundColor = defalutColor;
        editorScroll        = EditorGUILayout.BeginScrollView(editorScroll);

        if (!string.IsNullOrEmpty(editorTitle))
        {
            DrawTitle(editorTitle);
        }


        if (editor != null)
        {
            editorRender.Invoke();
        }
        else
        {
            GUILayout.Label("Nothing selected");
        }

        EditorGUILayout.EndScrollView();
        EditorGUILayout.EndVertical();
        EditorGUILayout.EndHorizontal();
        GUILayout.Label("Game Tools Package\n(Wazzion) Copyright 2017", EditorStyles.centeredGreyMiniLabel, GUILayout.ExpandWidth(true));
    }
コード例 #5
0
    void DrawTabs()
    {
        if (DrawTabButton("Get PRO"))
        {
            editor       = CreateInstance <PRORequired>();
            editorRender = editor.OnInspectorGUI;
        }

        DrawTabTitle("General");

        if (DrawTabButton("Content"))
        {
            editor            = CreateInstance <ContentAssistantEditor>();
            editor.onRepaint += Repaint;
            editorRender      = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Localization"))
        {
            EditLocalization();
        }

        if (DrawTabButton("UI"))
        {
            editor       = CreateInstance <UIAssistantEditor>();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Audio"))
        {
            editor            = CreateInstance <AudioAssistantEditor>();
            editor.onRepaint += Repaint;
            editorRender      = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Spin Wheel Rewards"))
        {
            editor       = CreateInstance <SpinWheelEditor>();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Combo Feedback"))
        {
            editor       = CreateInstance <ComboFeedbackEditor>();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Local Profile"))
        {
            editor            = CreateInstance <ProfileAssistantEditor>();
            editor.onRepaint += Repaint;
            editorRender      = ((ProfileAssistantEditor)editor).DrawLocalProfile;
        }

        if (DrawTabButton("Bots"))
        {
            editor       = CreateInstance <PRORequired>();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Local Notifications"))
        {
            editor       = CreateInstance <PRORequired>();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Other"))
        {
            editor       = CreateInstance <ProjectParametersEditor>();
            editorRender = editor.OnInspectorGUI;
        }

        DrawTabTitle("Levels");

        if (DrawTabButton("Level Editor"))
        {
            #region Level Editor
            levels = FindObjectsOfType <Level>().ToList();
            if (levels.Count > 0)
            {
                levels.Sort((Level a, Level b) => {
                    return(a.transform.GetSiblingIndex() - b.transform.GetSiblingIndex());
                });
                UpdateLevelList();
                if (levels.Count > lastSelectedLevel)
                {
                    currentLevel = levels[lastSelectedLevel];
                }
                else
                {
                    currentLevel = levels[0];
                }
            }
            levelList = new ReorderableList(levels, typeof(Level), true, false, true, true);
            levelList.elementHeight = EditorGUIUtility.singleLineHeight + 6;

            levelList.drawElementCallback += DrawElement;

            levelList.onAddCallback     += AddItem;
            levelList.onRemoveCallback  += RemoveItem;
            levelList.onReorderCallback += ReorderItem;

            levelList.onSelectCallback += SelectItem;

            editorRender  = LevelSelector;
            editor        = CreateInstance <LevelEditor>();
            editorRender += editor.OnInspectorGUI;
            #endregion
        }

        if (DrawTabButton("Level Exporter"))
        {
            editor            = CreateInstance <LevelExporter>();
            editor.onRepaint += Repaint;
            editorRender      = editor.OnInspectorGUI;
        }

        DrawTabTitle("Monetization");

        if (DrawTabButton("Advertising"))
        {
            editor       = CreateInstance <PRORequired>();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("In-App Purchases"))
        {
            editor       = CreateInstance <BerryStoreAssistantEditor>();
            editorRender = ((BerryStoreAssistantEditor)editor).DrawIAPs;
        }

        if (DrawTabButton("Item IDs"))
        {
            editor       = CreateInstance <BerryStoreAssistantEditor>();
            editorRender = ((BerryStoreAssistantEditor)editor).DrawItems;
        }

        if (DrawTabButton("Initial Inventory"))
        {
            editor       = CreateInstance <ProfileAssistantEditor>();
            editorRender = ((ProfileAssistantEditor)editor).DrawInitialInventory;
        }

        DrawTabTitle("Items");

        if (DrawTabButton("Chip Settings"))
        {
            editor       = CreateInstance <SessionAssistantEditor>();
            editorRender = ((SessionAssistantEditor)editor).DrawChips;
        }
        if (DrawTabButton("Chip Combinations"))
        {
            editor       = CreateInstance <SessionAssistantEditor>();
            editorRender = ((SessionAssistantEditor)editor).DrawCombinations;
        }
        if (DrawTabButton("Chip Mixes"))
        {
            editor       = CreateInstance <SessionAssistantEditor>();
            editorRender = ((SessionAssistantEditor)editor).DrawMixes;
        }
        if (DrawTabButton("Blockers"))
        {
            editor       = CreateInstance <SessionAssistantEditor>();
            editorRender = ((SessionAssistantEditor)editor).DrawBlockers;
        }

        DrawTabTitle("Development");

        if (DrawTabButton("Fixer"))
        {
            editor            = CreateInstance <Berry.Fixer.Fixer>();
            editor.onRepaint += Repaint;
            editorRender      = editor.OnInspectorGUI;
        }
        if (DrawTabButton("Contact"))
        {
            editor            = CreateInstance <ContactForm>();
            editor.onRepaint += Repaint;
            editorRender      = editor.OnInspectorGUI;
        }
    }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReflexiveControl"/> class.
 /// </summary>
 /// <param name="map">
 /// The map.
 /// </param>
 /// <param name="offset">
 /// The offset.
 /// </param>
 /// <param name="iHasChunkCount">
 /// The i has chunk count.
 /// </param>
 /// <param name="iLineNumber">
 /// The i line number.
 /// </param>
 /// <param name="me">
 /// The me.
 /// </param>
 public ReflexiveControl(Map map, int offset, bool iHasChunkCount, int iLineNumber, MetaEditor me)
 {
     ToolTip1.InitialDelay = 800;
     this.LineNumber = iLineNumber;
     InitializeComponent();
     this.map = map;
     this.mapOffset = offset;
     this.hasChunkCount = iHasChunkCount;
     ME = me;
 }
コード例 #7
0
    void DrawTabs()
    {
        DrawTabTitle("General");

        if (DrawTabButton("Content"))
        {
            editor            = new ContentManagerEditor();
            editor.onRepaint += Repaint;
            editorRender      = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Localization"))
        {
            EditLocalization();
        }

        if (DrawTabButton("UI"))
        {
            editor       = new UIManagerEditor();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Audio"))
        {
            editor            = new AudioManagerEditor();
            editor.onRepaint += Repaint;
            editorRender      = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Service"))
        {
            editor       = new ServiceMgrEditor();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Other"))
        {
            editor       = new ProjectParametersEditor();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("Share"))
        {
            editor       = new NativeShareEditor();
            editorRender = editor.OnInspectorGUI;
        }


        DrawTabTitle("Monetization");

        if (DrawTabButton("Advertising"))
        {
            editor       = new AdAssistantEditor();
            editorRender = editor.OnInspectorGUI;
        }

        if (DrawTabButton("In-App Purchases"))
        {
            editor       = new BerryStoreAssistantEditor();
            editorRender = ((BerryStoreAssistantEditor)editor).DrawIAPs;
        }

        if (DrawTabButton("Item IDs"))
        {
            editor       = new BerryStoreAssistantEditor();
            editorRender = ((BerryStoreAssistantEditor)editor).DrawItems;
        }
    }
コード例 #8
0
ファイル: MainWindow.xaml.cs プロジェクト: Mixi59/Stump
        private static void ThreadStartingPoint(string filename, Point mousePosition)
        {
            SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());

            if (!File.Exists(filename))
            {
                return;
            }

            Window window;

            switch (Path.GetExtension(filename))
            {
            case ".d2p":
                window = new D2PEditor(new D2pFile(filename));
                break;

            case ".d2i":
                window = new D2IEditor(new D2IFile(filename));
                break;

            case ".d2o":
                window = new D2OEditor(filename);
                break;

            case ".d2os":
                window = new D2OEditor(filename);
                break;

            case ".meta":
                window = new MetaEditor(new MetaFile(filename));
                break;

            case ".dlm":
                window = new MapEditor(new DlmReader(filename, Settings.LoaderSettings.GenericMapDecryptionKey));
                break;

            case ".swl":
                var file    = new SwlFile(filename);
                var swfName = filename.Replace(".swl", ".swf");
                var swfFile = File.Create(swfName);

                swfFile.Write(file.SwfData, 0, file.SwfData.Length);

                swfFile.Dispose();
                file.Dispose();
                return;

            case ".swf":
                var swf = new SwfReader(filename);
                swf.ToSwl();
                swf.Dispose();
                return;

            default:
                return;
            }


            window.WindowStartupLocation = WindowStartupLocation.Manual;
            window.Left = mousePosition.X - window.Width / 2;
            window.Top  = mousePosition.Y - window.Height / 2;
            window.Show();
            System.Windows.Threading.Dispatcher.Run();
        }