static ProjectCommands() { NewProjectCommand = new NewProjectCommand(); OpenProjectCommand = new OpenProjectCommand(); SaveProjectCommand = new SaveProjectCommand(); SettingCommand = new SettingCommand(); ExitCommand = new ExitCommand(); PublishAppCommand = new RoutedCommand("PublishAppCommand", typeof(MainWindow)); CommandManager.RegisterClassCommandBinding(typeof(MainWindow), new CommandBinding(PublishAppCommand, (s, e) => { LoginWindow loginWindow = new LoginWindow(); if (loginWindow.ShowDialog().Value) { // CreatePackageWindow createPackageWindow = new CreatePackageWindow(); // if (createPackageWindow.ShowDialog().Value) { PublishWindow publishWindow = new PublishWindow(loginWindow.UserId, loginWindow.Password); publishWindow.ShowDialog(); } } }, (s, e) => { e.CanExecute = true; })); }
static void ShowWindow(ePublishPlatformType type) { PublishManager.Instance.Setup(); string title_name = PublishUtils.GetPlatformNameByType(type); PublishWindow abWindow = EditorWindow.GetWindowWithRect <PublishWindow>(new Rect(0, 0, 1000, 800), false, title_name, true); abWindow.Setup(type); }
void OnGUI() { EditorGUILayout.Space(); EditorGUILayout.LabelField("<size=20>Mod build complete!</size>", richTextStyle); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.LabelField("Select Launch to launch the mod ingame.", EditorStyles.wordWrappedLabel); EditorGUILayout.LabelField($"Built mods are located in:\n{modPath}", EditorStyles.wordWrappedLabel); EditorGUILayout.Space(); GUILayout.BeginVertical(); if (GUILayout.Button("Launch Epic")) { System.Diagnostics.Process.Start("com.epicgames.launcher://apps/Muscovy?action=launch&silent=true"); Close(); } if (GUILayout.Button("Launch Steam")) { System.Diagnostics.Process.Start("steam://rungameid/684450"); Close(); } EditorGUILayout.Space(); if (GUILayout.Button("Publish on Steam Workshop")) { PublishWindow.Open(Path.Combine(modPath, Path.GetFileName(filePaths[0]))); Close(); } EditorGUILayout.Space(); if (GUILayout.Button("Continue")) { Close(); } GUILayout.EndVertical(); }