private void SelectPackage(string id) { InvertApplication.ExecuteInBackground(new SelectPackageCommand() { Id = id }); }
public void DrawPackagePage(Rect bounds, UFramePackageDescriptor package) { var imageBounds = new Rect(bounds.x + 5, bounds.y + 5, 150, 150); var titleBounds = new Rect(imageBounds) { x = imageBounds.xMax + 5, width = bounds.width - imageBounds.width - 10, height = 20 }; var descriptionBounds = new Rect(titleBounds) { y = titleBounds.yMax + 10, height = 120, width = 400 }; var backButtonRect = new Rect(descriptionBounds) { y = descriptionBounds.yMax + 20, height = 30, width = 100 }; GUI.DrawTexture(imageBounds, GetImage(package.ProjectIconUrl), ScaleMode.ScaleToFit, true); GUI.Label(titleBounds, package.Title, ProjectPreviewTitleStyle); GUI.Label(descriptionBounds, package.Description, ProjectPageDescriptionStyle); if (GUI.Button(backButtonRect, "Back")) { InvertApplication.ExecuteInBackground(new SelectPackageCommand() { Id = null }); } var revButtonRect = new Rect(backButtonRect) { x = backButtonRect.xMax + 5, width = 200 }; foreach (var revision in KoinoniaSystem.SelectedPackageRevisions) { if (GUI.Button(revButtonRect, string.Format("Install {1} {0}", revision.VersionTag, package.Title))) { InvertApplication.ExecuteInBackground(new QueueRevisionForInstallCommand() { PackageDescriptor = package, RevisionDescriptor = revision }); //Debug.Log("Will download revision from "+ revision.SnapshotUri); } revButtonRect = new Rect(revButtonRect) { y = revButtonRect.yMax }; } }
public void UpdateAvailability() { InvertApplication.ExecuteInBackground(new PingServerCommand() { // Server = "http://invertgamestudios.com" Server = "http://google.com" }); }
public void Login() { InvertApplication.ExecuteInBackground(new LoginCommand() { Password = Password, Username = Username }); }
public void DrawControlPanel(Rect bounds, UFramePackage package) { if (GUI.Button(bounds, "Uninstall")) { InvertApplication.ExecuteInBackground(new QueueRevisionForUninstallCommand() { Package = package }); } }
private void DrawLoginScreen(Rect bounds) { float loginScreenSide = 200; GUILayout.BeginArea(new Rect((bounds.width - loginScreenSide) / 2, (bounds.height - loginScreenSide) / 2, loginScreenSide, loginScreenSide)); Username = GUILayout.TextField(Username ?? ""); Password = GUILayout.TextField(Password ?? ""); if (GUILayout.Button("Login")) { InvertApplication.ExecuteInBackground(new LoginCommand() { Username = Username, Password = Password }); } GUILayout.EndArea(); }
// [MenuItem("uFrame Dev/Multithreading/Start Infinite Loop")] public static void RunInfiniteLoop() { Task = InvertApplication.ExecuteInBackground(new InfiniteLoopCommand()); }