예제 #1
0
 void OnGUI()
 {
     GUILayout.Label("Updating masterGamelist for each emulator configuration");
     GUILayout.BeginHorizontal();
     if (GUILayout.Button("Update"))
     {
         UpdateMasterGamelists.UpdateAll();
     }
     GUILayout.EndHorizontal();
 }
예제 #2
0
        private static void UpdateMasterGamelistMenuOption(MenuCommand menuCommand)
        {
            var emulatorSetup = menuCommand.context as EmulatorSetup;
            EmulatorConfiguration emulatorConfiguration = ArcadeManager.loadSaveEmulatorConfiguration.GetEmulatorConfiguration(emulatorSetup.id);

            if (emulatorConfiguration != null)
            {
                emulatorConfiguration = UpdateMasterGamelists.UpdateMasterGamelistFromEmulatorConfiguration(emulatorConfiguration);
                ArcadeManager.loadSaveEmulatorConfiguration.SaveEmulatorConfiguration(emulatorConfiguration);
            }
        }
예제 #3
0
        public override void OnInspectorGUI()
        {
            GUILayout.Space(8f);
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("EMULATOR PROPERTIES", EditorStyles.boldLabel);
            EditorGUILayout.EndHorizontal();
            GUILayout.Space(8f);

            DrawDefaultInspector();

            GUILayout.Space(8f);
            EditorGUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("Delete Emulator Configuration", GUILayout.Width(200), GUILayout.Height(EditorGUIUtility.singleLineHeight)))
            {
                DestroyImmediate(EmulatorSetupScript);
                ArcadeManager.loadSaveEmulatorConfiguration.SaveEmulators();
                ArcadeManager.loadSaveEmulatorConfiguration.LoadEmulators();
            }
            GUILayout.FlexibleSpace();
            EditorGUILayout.EndHorizontal();
            GUILayout.Space(8f);
            EditorGUILayout.BeginHorizontal();
            GUIStyle guiStyle = new GUIStyle();

            guiStyle.wordWrap = true;
            GUILayout.Label("Load, Save and Add Emulator Configurations from the 3DArcade Menu.", guiStyle);
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(16f);
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("MASTER GAMELIST", EditorStyles.boldLabel);
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(8f);
            EditorGUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("Select", GUILayout.Width(80), GUILayout.Height(EditorGUIUtility.singleLineHeight)))
            {
                EditorEmulatorSetupSelectMasterGamelist.ShowWindow(EmulatorSetupScript);
            }
            if (GUILayout.Button("Update", GUILayout.Width(80), GUILayout.Height(EditorGUIUtility.singleLineHeight)))
            {
                EmulatorConfiguration emulatorConfiguration = ArcadeManager.loadSaveEmulatorConfiguration.GetEmulatorConfiguration(EmulatorSetupScript.id);
                if (emulatorConfiguration != null)
                {
                    emulatorConfiguration = UpdateMasterGamelists.UpdateMasterGamelistFromEmulatorConfiguration(emulatorConfiguration);
                    ArcadeManager.loadSaveEmulatorConfiguration.SaveEmulatorConfiguration(emulatorConfiguration);
                }
            }
            if (GUILayout.Button("Show", GUILayout.Width(80), GUILayout.Height(EditorGUIUtility.singleLineHeight)))
            {
                EmulatorConfiguration emulatorConfiguration = ArcadeManager.loadSaveEmulatorConfiguration.GetEmulatorConfiguration(EmulatorSetupScript.id);
                if (emulatorConfiguration != null)
                {
                    List <ModelProperties> gamelist = emulatorConfiguration.masterGamelist;
                    EditorModelSetupGame.ShowWindow(EmulatorSetupScript.transform.gameObject, gamelist);
                }
            }
            GUILayout.FlexibleSpace();
            EditorGUILayout.EndHorizontal();
        }