private void HitBoxTabDraw() { EditorGUILayout.BeginVertical("Box"); if (headFold = CustomUI.Foldout("Head", headFold)) { HitFoldOut(ref fighterStatus.headHitBox); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical("Box"); if (bodyFold = CustomUI.Foldout("Body", bodyFold)) { HitFoldOut(ref fighterStatus.bodyHitBox); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical("Box"); if (footFold = CustomUI.Foldout("Foot", footFold)) { HitFoldOut(ref fighterStatus.footHitBox); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical("Box"); if (grabFold = CustomUI.Foldout("Grab", grabFold)) { HitFoldOut(ref fighterStatus.grabHitBox); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical("Box"); if (pushingFold = CustomUI.Foldout("Pushing", pushingFold)) { HitFoldOut(ref fighterStatus.pushingHitBox); } EditorGUILayout.EndVertical(); }
/// <summary> /// Drag & Drop ボックス描画 /// </summary> private void DrawDragAndDropBox() { if (toolConfig == null) { return; } CustomUI.DrawDragAndDropBox( "[Drag & Drop ParticleSystems Here]", toolConfig.GetFrameTexture(), style, (objs) => { if (internalGuiState.IsDragAndDropRecursive) { var particleSystems = objs.Select(obj => obj as GameObject) .Where(go => go != null) .Select(go => go.GetComponentsInChildren <ParticleSystem>()) .SelectMany(ps => ps) .Where(ps => ps != null) .Distinct() .ToArray(); internalGuiState.SetParticleSystems(particleSystems); } else { var particleSystems = objs.Select(obj => obj as GameObject) .Where(go => go != null) .Select(go => go.GetComponent <ParticleSystem>()) .Where(ps => ps != null) .ToArray(); internalGuiState.SetParticleSystems(particleSystems); } }); }
public override void OnInspectorGUI() { EditorGUILayout.Space(); EditorGUILayout.Space(); foldPiyo = CustomUI.Foldout("Piyo", foldPiyo); if (foldPiyo) { Hoge hoge = (Hoge)target; hoge.piyo = EditorGUILayout.Toggle("piyo", hoge.piyo); hoge.qiyo = EditorGUILayout.IntField("qiyo", hoge.qiyo); hoge.riyo = EditorGUILayout.TextField("riyo", hoge.riyo); } EditorGUILayout.Space(); foldFuga = CustomUI.Foldout("Fuga", foldFuga); if (foldFuga) { Hoge hoge = (Hoge)target; hoge.fuga = EditorGUILayout.Toggle("fuga", hoge.fuga); hoge.guga = EditorGUILayout.IntField("guga", hoge.guga); hoge.huga = EditorGUILayout.TextField("huga", hoge.huga); } EditorGUILayout.Space(); }
public static CustomUI BuildCustomUI(ManagedAction showODBCAdminControlPanel) { var customUI = new CustomUI(); customUI.On(NativeDialogs.WelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Back, new ShowDialog(NativeDialogs.WelcomeDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Next, new ShowDialog(NativeDialogs.InstallDirDlg)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Back, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Next, new SetTargetPath(), new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.ChangeFolder, new SetProperty("_BrowseProperty", "[WIXUI_INSTALLDIR]"), new ShowDialog(CommonDialogs.BrowseDlg)); customUI.On(NativeDialogs.VerifyReadyDlg, Buttons.Back, new ShowDialog(NativeDialogs.InstallDirDlg, Condition.NOT_Installed), new ShowDialog(NativeDialogs.MaintenanceTypeDlg, Condition.Installed)); customUI.On(NativeDialogs.MaintenanceWelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.MaintenanceTypeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Back, new ShowDialog(NativeDialogs.MaintenanceWelcomeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Repair, new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Remove, new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.ExitDialog, Buttons.Finish, new ExecuteCustomAction(showODBCAdminControlPanel.Id, "WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed"), new CloseDialog() { Order = 9999, }); return(customUI); }
private void Awake() { TextMeshProUGUI text = transform.Find("label").GetComponent <TextMeshProUGUI>(); InputScreen input = CustomUI.InputScreenUI.GetComponent <InputScreen>(); Button btnConfirm = CustomUI.InputScreenUI.transform.Find("Button Confirm").GetComponent <Button>(); Button btnClose = CustomUI.InputScreenUI.transform.Find("Button Close").GetComponent <Button>(); GetComponent <Button>().onClick.AddListener(() => { MenuScreen prevScreen = CustomUI.currentScreen; input.SetTitle(title); input.Input = text.text; input.isDigitOnly = isDigitOnly; CustomUI.Open(CustomUI.InputScreenUI); input.OnOpen(); btnConfirm.onClick.RemoveAllListeners(); btnConfirm.onClick.AddListener(() => { text.text = input.Input; CustomUI.Open(prevScreen); input.OnClose(); }); btnClose.onClick.RemoveAllListeners(); btnClose.onClick.AddListener(() => { CustomUI.Open(prevScreen); input.OnClose(); }); }); }
private void InitBasic() { var contentFiles = new List <string>(); _ScanFiles("Content/", contentFiles, "Content/"); ContentFiles = contentFiles.ToArray(); CustomUI.Init(); }
void ShowLabel(CustomUI customUI) { float x = Screen.width * Mathf.Clamp(customUI.rect.x, 0f, 1f); float y = Screen.width * Mathf.Clamp(customUI.rect.y, 0f, 1f); float width = Screen.width * Mathf.Clamp(customUI.rect.width, 0f, 1f); float height = Screen.width * Mathf.Clamp(customUI.rect.height, 0f, 1f); Rect rect = new Rect(x, y, width, height); customUI.style.fontSize = (int)(Screen.height * customUI.fontSizePercent); GUI.Label(rect, customUI.text, customUI.style); }
private IEnumerator WaitForAllPlayersLoaded() { CustomUI.OpenPopup("Incoming connection", "A new player is connecting"); AppUtil.Instance.PauseGame(); yield return(new WaitUntil(() => networkPlayers.All(p => p.Value.GetComponent <NetworkPlayerSync>().IsLoaded))); AppUtil.Instance.UnpauseGame(); playersLoaded = null; CustomUI.Close(); newPlayerConnecting = false; }
static void Main() { var project = new Project("PhotoSorter", new Dir(new Id("INSTALLDIR"), @"%LocalAppData%\PhotoSorter", new File(@"..\PhotoSorter\bin\Release\PhotoSorter.exe", new FileShortcut("PhotoSorter", @"%Desktop%"), new FileShortcut("PhotoSorter", @"%ProgramMenu%\PhotoSorter")), new Files(@"..\PhotoSorter\bin\Release\*.*", f => !f.EndsWith(".pdb") && !f.Contains("vshost") && !f.EndsWith("PhotoSorter.exe")), new ExeFileShortcut("Uninstall PhotoSorter", "[System64Folder]msiexec.exe", "/x [ProductCode]") { WorkingDirectory = "%Temp%" }) ); project.GUID = new Guid("{5E1EED8B-5CEB-4EE7-BD2D-B7A4BFA836C0}"); project.Codepage = "1251"; project.Language = "ru-RU"; project.SetVersionFromFile(@"..\PhotoSorter\bin\Release\PhotoSorter.exe"); project.Media.CompressionLevel = CompressionLevel.high; project.Media.EmbedCab = true; project.UI = WUI.WixUI_Common; project.MajorUpgradeStrategy = MajorUpgradeStrategy.Default; project.InstallScope = InstallScope.perUser; var customUi = new CustomUI(); customUi.On(NativeDialogs.ExitDialog, Buttons.Finish, new CloseDialog() { Order = 9999 }); customUi.On(NativeDialogs.WelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.InstallDirDlg)); customUi.On(NativeDialogs.InstallDirDlg, Buttons.Back, new ShowDialog(NativeDialogs.WelcomeDlg)); customUi.On(NativeDialogs.InstallDirDlg, Buttons.Next, new SetTargetPath(), new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUi.On(NativeDialogs.InstallDirDlg, Buttons.ChangeFolder, new SetProperty("_BrowseProperty", "[WIXUI_INSTALLDIR]"), new ShowDialog(CommonDialogs.BrowseDlg)); customUi.On(NativeDialogs.VerifyReadyDlg, Buttons.Back, new ShowDialog(NativeDialogs.InstallDirDlg, Condition.NOT_Installed), new ShowDialog(NativeDialogs.MaintenanceTypeDlg, Condition.Installed)); customUi.On(NativeDialogs.MaintenanceWelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.MaintenanceTypeDlg)); customUi.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Back, new ShowDialog(NativeDialogs.MaintenanceWelcomeDlg)); customUi.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Repair, new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUi.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Remove, new ShowDialog(NativeDialogs.VerifyReadyDlg)); project.SetNetFxPrerequisite(Condition.Net45_Installed, "Please install .Net FrameWork 4.5"); project.CustomUI = customUi; project.OutFileName = "PhotoSorterSetup"; project.PreserveTempFiles = true; project.ResolveWildCards(true); project.BuildMsi(); }
void DisplayLabel(CustomUI customUI) { Rect rect = customUI.rectPercent; rect.width = Screen.width * Mathf.Clamp(rect.width, 0f, 1f); rect.height = Screen.height * Mathf.Clamp(rect.height, 0f, 1f); rect.x = (Screen.width - rect.width) * 0.5f; rect.y = Screen.height * Mathf.Clamp(rect.y, 0f, 1f); customUI.style.fontSize = (int)(Screen.height * Mathf.Clamp(customUI.fontSizePercent, 0f, 1f)); GUI.Label(rect, customUI.text, customUI.style); }
private void ShowCustomUI(bool k) { if (k) { custom = new CustomUI(xamlPath); MainUI.Instance.ShowNewUI(custom); BindDependencies(); } else { MainUI.Instance.RemoveUI(custom); } }
/// <summary> /// ドラッグアンドドロップボックス /// </summary> private void DrawDragAndDropBox() { CustomUI.DrawDragAndDropBox( "[Drag & Drop Shaders Here]", VfxToolConfig.Get().GetFrameTexture(), style, objs => { var shaders = DragAndDrop.objectReferences .Select(o => o as Shader) .Where(s => s != null) .ToArray(); guiState.SetShaders(shaders); }); }
void ShowButton(CustomUI customUI, string function) { float x = Screen.width * Mathf.Clamp(customUI.rect.x, 0f, 1f); float y = Screen.width * Mathf.Clamp(customUI.rect.y, 0f, 1f); float width = Screen.width * Mathf.Clamp(customUI.rect.width, 0f, 1f); float height = Screen.width * Mathf.Clamp(customUI.rect.height, 0f, 1f); Rect rect = new Rect(x, y, width, height); customUI.style.fontSize = (int)(Screen.height * customUI.fontSizePercent); if (GUI.Button(rect, customUI.text, customUI.style)) { Invoke(function, 0f); } }
/// <summary> /// Builds the custom UI. /// This is the equivalent of the CustomUIBuilder.BuildPostLicenseDialogUI implementation /// </summary> /// <returns></returns> public static CustomUI BuildCustomUI() { Dialog activationDialog = new ProductActivationForm().ToWDialog(); XElement xml = activationDialog.ToXElement(); var customUI = new CustomUI(); customUI.CustomDialogs.Add(activationDialog); customUI.On(NativeDialogs.ExitDialog, Buttons.Finish, new CloseDialog() { Order = 9999 }); customUI.On(NativeDialogs.WelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Back, new ShowDialog(NativeDialogs.WelcomeDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Next, new ShowDialog(activationDialog, "LicenseAccepted = \"1\"")); customUI.On(activationDialog, Buttons.Back, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(activationDialog, Buttons.Next, new DialogAction { Name = "DoAction", Value = "ValidateLicenceKey" }, new ShowDialog(NativeDialogs.InstallDirDlg, "SERIALNUMBER_VALIDATED = \"TRUE\"")); customUI.On(activationDialog, Buttons.Cancel, new CloseDialog("Exit")); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Back, new ShowDialog(activationDialog)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Next, new SetTargetPath(), new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.ChangeFolder, new SetProperty("_BrowseProperty", "[WIXUI_INSTALLDIR]"), new ShowDialog(CommonDialogs.BrowseDlg)); customUI.On(NativeDialogs.VerifyReadyDlg, Buttons.Back, new ShowDialog(NativeDialogs.InstallDirDlg, Condition.NOT_Installed), new ShowDialog(NativeDialogs.MaintenanceTypeDlg, Condition.Installed)); customUI.On(NativeDialogs.MaintenanceWelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.MaintenanceTypeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Back, new ShowDialog(NativeDialogs.MaintenanceWelcomeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Repair, new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Remove, new ShowDialog(NativeDialogs.VerifyReadyDlg)); return(customUI); }
/// <summary> /// ControlBoxの表示 /// </summary> protected override void OnControlBoxGUI() { base.OnControlBoxGUI(); using (new EditorGUILayout.VerticalScope(GUI.skin.box)) { // guiState.IsOpenDuration = CustomUI.ToolbarWithFoldout("■ Duration", guiState.IsOpenDuration); guiState.IsOpenDuration = CustomUI.ToolbarWithFoldout("Duration", guiState.IsOpenDuration); if (guiState.IsOpenDuration) { GUILayout.Space(2); using (new EditorGUILayout.HorizontalScope()) { GUILayout.Space(2); guiState.InputDuration = EditorGUILayout.FloatField(guiState.InputDuration); if (GUILayout.Button("Apply")) { ApplyDuration(); } } } } using (new EditorGUILayout.VerticalScope(GUI.skin.box)) { guiState.IsOpenStartLifetime = CustomUI.ToolbarWithFoldout("Start Lifetime", guiState.IsOpenStartLifetime); if (guiState.IsOpenStartLifetime) { GUILayout.Space(2); DrawStartLifetimeButtons(); // ボタン表示 } } using (new EditorGUILayout.VerticalScope(GUI.skin.box)) { guiState.IsOpenStartDelay = CustomUI.ToolbarWithFoldout("Star Delay", guiState.IsOpenStartDelay); if (guiState.IsOpenStartDelay) { GUILayout.Space(2); DrawDelayButtons(); // ボタン表示 } } }
void DisplayButton(CustomUI customUI, ButtonType type) { Rect rect = customUI.rectPercent; rect.x = Screen.width * Mathf.Clamp(rect.x, 0f, 1f); rect.y = Screen.height * Mathf.Clamp(rect.y, 0f, 1f); rect.width = Screen.width * Mathf.Clamp(rect.width, 0f, 1f); rect.height = Screen.height * Mathf.Clamp(rect.height, 0f, 1f); customUI.style.fontSize = (int)(Screen.height * Mathf.Clamp(customUI.fontSizePercent, 0f, 1f)); if (GUI.Button(rect, customUI.text, customUI.style)) { ButtonClick(type); } }
/// <summary> /// 変更対象の表示 /// </summary> private void DrawTargetBox() { using (new EditorGUILayout.VerticalScope(GUI.skin.box)) { internalGuiState.TargetBoxScrollPosition = EditorGUILayout.BeginScrollView(internalGuiState.TargetBoxScrollPosition); if (CustomUI.ToolbarWithButton(targetBoxHeaderText, "Clear")) { internalGuiState.Clear(); } GUILayout.Space(2); // using (new EditorGUI.IndentLevelScope()) { // EditorGUI.BeginDisabledGroup(true); for (int i = 0; i < internalGuiState.GetParticleSystemCount(); i++) { var ps = internalGuiState.GetTargetParticleSystem(i); if (ps == null) { continue; } EditorGUILayout.BeginHorizontal(); bool toggle = EditorGUILayout.Toggle("", internalGuiState.GetToggle(i), GUILayout.Width(18)); internalGuiState.SetToggle(i, toggle); EditorGUILayout.ObjectField(ps, typeof(ParticleSystem), true); EditorGUILayout.EndHorizontal(); using (new EditorGUI.IndentLevelScope()) { DrawParticleSystemParameter(i, ps); } GUILayout.Space(4); } // EditorGUI.EndDisabledGroup(); } GUILayout.Space(2); EditorGUILayout.EndScrollView(); } }
public static CustomUI BuildCustomUI() { Dialog fontDialog = new CustomFontForm().ToWDialog(); XElement xml = fontDialog.ToXElement(); var customUI = new CustomUI(); SetDefaultTextStyles(customUI); customUI.CustomDialogs.Add(fontDialog); customUI.On(NativeDialogs.ExitDialog, Buttons.Finish, new CloseDialog() { Order = 9999 }); customUI.On(NativeDialogs.WelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Back, new ShowDialog(NativeDialogs.WelcomeDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Next, new ShowDialog(fontDialog)); customUI.On(fontDialog, Buttons.Back, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(fontDialog, Buttons.Next, new ShowDialog(NativeDialogs.InstallDirDlg)); customUI.On(fontDialog, Buttons.Cancel, new CloseDialog("Exit")); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Back, new ShowDialog(fontDialog)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Next, new SetTargetPath(), new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.ChangeFolder, new SetProperty("_BrowseProperty", "[WIXUI_INSTALLDIR]"), new ShowDialog(CommonDialogs.BrowseDlg)); customUI.On(NativeDialogs.VerifyReadyDlg, Buttons.Back, new ShowDialog(NativeDialogs.InstallDirDlg, Condition.NOT_Installed), new ShowDialog(NativeDialogs.MaintenanceTypeDlg, Condition.Installed)); customUI.On(NativeDialogs.MaintenanceWelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.MaintenanceTypeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Back, new ShowDialog(NativeDialogs.MaintenanceWelcomeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Repair, new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Remove, new ShowDialog(NativeDialogs.VerifyReadyDlg)); return(customUI); }
public static void SetDefaultTextStyles(CustomUI customUI) { //The default styles for the WixUI_* and two ones used in the fontDialog //the TextStyles contains a dictionary of string and foSystem.Drawing.Font //System.Drawing.Font does not have any color accocietd with it, we will add that later. //Here we only create the fonts, set the size and fontstyle. //We remove all the default fonts and replace them with new ones. customUI.TextStyles.Clear(); customUI.TextStyles.Add("WixUI_Font_Normal", new Font("Tahoma", 8)); customUI.TextStyles.Add("WixUI_Font_Normal_Bold", new Font("Tahoma", 8, FontStyle.Bold)); customUI.TextStyles.Add("WixUI_Font_Bigger", new Font("Tahoma", 12)); customUI.TextStyles.Add("WixUI_Font_Title", new Font("Tahoma", 9, FontStyle.Bold)); //Add the two new ones used in the fontDialog customUI.TextStyles.Add("MyRedConsolas", new Font("Consolas", 12)); customUI.TextStyles.Add("MyGreenArial", new Font("Arial", 12, FontStyle.Bold)); }
//进入 public virtual void Enter(bool _quitCurrentUI = false) { //退出当前UI if (_quitCurrentUI && currentUI != null) { currentUI.Quit(); } currentUI = this; ui.SetActive(true); //设置底部文本 if (text_bottomInfo != null) { UIManager.text_bottomInfo = text_bottomInfo; } }
/// <summary> /// Builds the custom UI. /// This is the equivalent of the CustomUIBuilder.BuildPostLicenseDialogUI implementation /// </summary> /// <returns></returns> public static CustomUI BuildCustomUI() { Dialog activationDialog = new ProductActivationForm().ToWDialog(); XElement xml = activationDialog.ToXElement(); var customUI = new CustomUI(); customUI.CustomDialogs.Add(activationDialog); customUI.On(NativeDialogs.ExitDialog, Buttons.Finish, new CloseDialog() { Order = 9999 }); customUI.On(NativeDialogs.WelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Back, new ShowDialog(NativeDialogs.WelcomeDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Next, new ShowDialog(activationDialog, "LicenseAccepted = \"1\"")); customUI.On(activationDialog, Buttons.Back, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(activationDialog, Buttons.Next, new DialogAction { Name = "DoAction", Value = "ValidateLicenceKey" }, new ShowDialog(NativeDialogs.InstallDirDlg, "SERIALNUMBER_VALIDATED = \"TRUE\"")); customUI.On(activationDialog, Buttons.Cancel, new CloseDialog("Exit")); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Back, new ShowDialog(activationDialog)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Next, new SetTargetPath(), new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.ChangeFolder, new SetProperty("_BrowseProperty", "[WIXUI_INSTALLDIR]"), new ShowDialog(CommonDialogs.BrowseDlg)); customUI.On(NativeDialogs.VerifyReadyDlg, Buttons.Back, new ShowDialog(NativeDialogs.InstallDirDlg, Condition.NOT_Installed), new ShowDialog(NativeDialogs.MaintenanceTypeDlg, Condition.Installed)); customUI.On(NativeDialogs.MaintenanceWelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.MaintenanceTypeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Back, new ShowDialog(NativeDialogs.MaintenanceWelcomeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Repair, new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Remove, new ShowDialog(NativeDialogs.VerifyReadyDlg)); return customUI; }
/// <summary> /// ウィンドウ描画 /// </summary> protected override void OnGUI() { base.OnGUI(); config.CreateStyleIfNull(); using (new EditorGUILayout.VerticalScope(GUI.skin.box)) { internalGuiState.IsDragAndDropRecursive = CustomUI.ToolbarWithToggle("■ Drag & Drop", "Recursive", internalGuiState.IsDragAndDropRecursive); DrawDragAndDropBox(); GUILayout.Space(2); } using (new EditorGUILayout.HorizontalScope()) { DrawControlBox(); DrawTargetBox(); } }
private void InitBasic() { var contentFiles = new List <string>(); _ScanFiles("Content/", contentFiles, "Content/"); ContentFiles = contentFiles.ToArray(); CustomUI.Init(); if (!TS1) { var allFiles = new List <string>(); _ScanFiles(BasePath, allFiles, BasePath); AllFiles = allFiles.ToArray(); UIGraphics?.Init(); DataDefinition = new TSODataDefinition(); using (var stream = File.OpenRead(GetPath("TSOData_datadefinition.dat"))) { DataDefinition.Read(stream); } } }
/// <summary> /// ウィンドウ描画処理 /// </summary> void OnGUI() { if (this.bookmarkData == null) { this.bookmarkData = DataLoader.LoadData(); } this.scrollPosition = EditorGUILayout.BeginScrollView(this.scrollPosition); if (this.searchInfoList == null) { this.RebuildSearchInfoList(); } EditorGUILayout.LabelField(Config.GUI_WINDOW_HIERARCHY_TEXT_OVERVIEW); this.searchInfoList.DoLayoutList(); EditorGUILayout.EndScrollView(); CustomUI.VersionLabel(); }
private void InitBasic() { var contentFiles = new List <string>(); _ScanFiles("Content/", contentFiles, "Content/"); ContentFiles = contentFiles.ToArray(); CustomUI.Init(); if (!TS1) { var allFiles = new List <string>(); _ScanFiles(BasePath, allFiles, BasePath); AllFiles = allFiles.ToArray(); UIGraphics?.Init(); DataDefinition = new TSODataDefinition(); try { using (var stream = File.Open("Content/FSODataDefinition.dat", FileMode.Open, FileAccess.Read, FileShare.Read)) { DataDefinition.Read(stream); } } catch { using (var stream = File.OpenRead(GetPath("TSOData_datadefinition.dat"))) { DataDefinition.Read(stream); } } try { VersionString = File.ReadAllText(GetPath("version")); } catch { } } else { VersionString = "TS1"; } }
internal void ShowDialog(UIMode uiMode, UIProvider uiProvider) { var exception = new SerializableException(new ArgumentException("Argument exception preview.", new Exception("Inner exception for argument exception."))); var report = new Report(exception); var consoleOut = new StringWriter(); Console.SetOut(consoleOut); if (uiProvider == UIProvider.Console) { ConsoleUI.ShowDialog(uiMode, exception, report); this.consoleOutputTextBox.Text = consoleOut.ToString(); this.ShowDialog(); } else if (uiProvider == UIProvider.WinForms) { WinFormsUI.ShowDialog(uiMode, exception, report); this.Close(); } else if (uiProvider == UIProvider.WPF) { WPFUI.ShowDialog(uiMode, exception, report); this.Close(); } else if (uiProvider == UIProvider.Custom) { CustomUI.ShowDialog(uiMode, exception, report); this.Close(); } else { throw new ArgumentException("Parameter supplied for UIProvider argument is invalid."); } }
protected override void OnControlBoxGUI() { base.OnControlBoxGUI(); config.CreateStyleIfNull(); // GUILayout.Space(2); using (new EditorGUILayout.VerticalScope(GUI.skin.box)) { guiState.IsAutoApplyRGB = CustomUI.ToolbarWithToggle("■ Start Color", "Auto", guiState.IsAutoApplyRGB); using (new EditorGUI.IndentLevelScope()) { GUILayout.Space(2); using (new EditorGUILayout.HorizontalScope(GUILayout.MinWidth(20), GUILayout.ExpandWidth(true))) { EditorGUILayout.LabelField("RGB", config.LabelFieldOptions); EditorGUI.BeginChangeCheck(); guiState.TagetRGB = EditorGUILayout.ColorField(new GUIContent(""), guiState.TagetRGB, true, false, false, config.ValueFieldOptions); if (EditorGUI.EndChangeCheck() && guiState.IsAutoApplyRGB) { ApplyRGB(guiState.TagetRGB); } GUILayout.Space(4); if (GUILayout.Button("Apply", config.ButtonStyle, config.ApplyButtonOptions)) { ApplyRGB(guiState.TagetRGB); } } } } }
void Start() { facingRight = true; rigid = GetComponent<Rigidbody2D> (); myAnimator = GetComponent<Animator> (); cooldown = aSpeed; GameObject holder = GameObject.FindWithTag ("UI"); if (holder != null) gui = holder.GetComponent<CustomUI> (); if (gui != null) { gui.startUp (hp); } else Debug.Log ("UI not Found"); }
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) { _MaterialEditor = materialEditor; Material _material = materialEditor.target as Material; EditorGUILayout.HelpBox("Shader Uses Vertex Color Stored in COLOR, TEXCOORD2 for Rougness Color and TEXCOORD3 for additional Mask", MessageType.Info); CustomUI.GuiLine(1); EditorGUILayout.Space(); var sliderUsing = FindProperty("_UseLightInput", properties); materialEditor.ShaderProperty(sliderUsing, sliderUsing.displayName); EditorGUILayout.Separator(); CustomUI.GuiLine(1); EditorGUILayout.Separator(); var _detMap = FindProperty("_MainTex", properties); materialEditor.TexturePropertySingleLine(_textureMapText, _detMap); var _nrmMap = FindProperty("_NormalMap", properties); materialEditor.TexturePropertySingleLine(_normalMapText, _nrmMap); var _nrmIntence = FindProperty("_NormalIntencity", properties); materialEditor.ShaderProperty(_nrmIntence, _normalMapIntText); EditorGUILayout.Space(); var _Rouhgness = FindProperty("_Roughness", properties); materialEditor.ShaderProperty(_Rouhgness, "Roughness"); var _F0 = FindProperty("_F0", properties); materialEditor.ShaderProperty(_F0, "F0"); var _FresnelPower = FindProperty("_FresnelPower", properties); materialEditor.ShaderProperty(_FresnelPower, "Fresnel Power"); EditorGUILayout.Separator(); _LightmapFoldOut = CustomUI.FoldOut("Lightmapping", _LightmapFoldOut); if (_LightmapFoldOut) { EditorGUILayout.Separator(); CustomUI.GuiLine(1); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Lightmapping:", EditorStyles.boldLabel); var _IndirectAlbedoBoost = FindProperty("_IndirectAlbedoBoost", properties); materialEditor.ShaderProperty(_IndirectAlbedoBoost, "Indirect Albedo Boost"); } EditorGUILayout.Separator(); CustomUI.GuiLine(1); EditorGUILayout.Separator(); if (GUILayout.Button("Open Mesh Combiner")) { MeshCombiner.ShowWindow(); } }
/// <summary> /// Adds a control to the GUI /// </summary> /// <param name="ui">The control to add</param> public static void AddUI(CustomUI ui) { CustomUIs.Add(ui); ui.Init(); if (OnUIAdded != null) OnUIAdded(ui); }
public static void GuiLineSeparator(int i_height = 1) { EditorGUILayout.Separator(); CustomUI.GuiLine(i_height); EditorGUILayout.Separator(); }
/// <summary> /// Removes a CustomUI from the list /// </summary> /// <param name="customUI">The CustomUI to remvoe</param> public static void RemoveCustomUI(CustomUI customUI) { customUIs.Remove(customUI); }
/// <summary> /// Adds a CustomUI to the list /// </summary> /// <param name="customUI">The CustomUI to add</param> public static void AddCustomUI(CustomUI customUI) { customUIs.Add(customUI); customUI.Init(); }
/// <summary> /// ウィンドウの描画処理 /// </summary> private void OnGUI() { if (window == null) { window = this; } if (needReloadData) { needReloadData = false; this.ReloadDatas(); } if (bookmarkDatas == null) { this.ReloadDatas(); } if (this.bookmarkList == null) { this.RebuildBookmarkList(); } if (willRegisterAssets != null) { var data = this.bookmarkDatas[this.currentBookmarkIndex]; data.Assets.AddRange(willRegisterAssets); EditorUtility.SetDirty(data); willRegisterAssets = null; } EditorGUILayout.LabelField(MenuConfig.GUI_WINDOW_PROJECT_TEXT_OVERVIEW); EditorGUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); EditorGUILayout.LabelField("Bookmark", GUILayout.Width(LabelWidth)); int index = EditorGUILayout.Popup(this.currentBookmarkIndex, this.popupDisplayedOptions); if (EditorGUI.EndChangeCheck()) { if (index < bookmarkDatas.Length) { this.currentBookmarkIndex = index; this.currentBookmarkName = this.bookmarkDatas[this.currentBookmarkIndex].name; this.RebuildBookmarkList(); } else // New... を選択した場合 { // DataGenerator.CreateBookmarkData(); // DataGenerator.CreateBookmarkDataImmediately(); var instance = GenericDataGenerator.CreateDataInProject <ProjectBookmarkData>(ExportConfig.DefaultAssetName); if (instance != null) { this.ReloadDatas(); this.RebuildBookmarkList(); } } } if (GUILayout.Button("Select", EditorStyles.miniButton, GUILayout.Width(ButtonWidth))) { EditorGUIUtility.PingObject(bookmarkDatas[this.currentBookmarkIndex]); } EditorGUILayout.EndHorizontal(); this.bookmarkList.DoLayoutList(); CustomUI.VersionLabel(); }
/// <summary> /// Removes a control from the GUI /// </summary> /// <param name="ui">The CustomUI to remove</param> public static void RemoveUI(CustomUI ui) { CustomUIs.Remove(ui); if (OnUIRemoved != null) OnUIRemoved(ui); ui.Dispose(); }
/// <summary> /// Creates a new instance of the LayerUI class /// </summary> /// <param name="ui">The CustomUI the LayerUI contains</param> /// <param name="name"> /// The name of the LayerUI. /// Default is the calling assembly's display name, two semicolons and the full name of the type of <paramref name="ui" /> /// </param> public LayerUI(CustomUI ui, string name = null) : base(name ?? Assembly.GetCallingAssembly().FullName + "::" + ui.GetType()) { CustomUI = ui; }
//ヒットボックス個々(FoldOutした中身) private bool FoldOutHitBox(List <PlayerSkill.FrameHitBox> frameHitBox, string label, ref bool frag) { if (frag = CustomUI.Foldout(label, frag)) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(frameHitBox.Count.ToString()); if (GUILayout.Button("判定作成")) { frameHitBox.Add(new PlayerSkill.FrameHitBox()); } EditorGUILayout.EndHorizontal(); //スライダーその他の作成 for (int i = 0; i < frameHitBox.Count; i++) { EditorGUILayout.BeginVertical("Box"); //数値の入れ替え float frameStart = frameHitBox[i].startFrame; float frameEnd = frameHitBox[i].endFrame; EditorGUILayout.BeginHorizontal(); //左 frameStart = (int)EditorGUILayout.FloatField(frameStart, GUILayout.Width(30)); if (frameStart > frameEnd) { frameStart = frameEnd - 1; } if (frameStart < 0) { frameStart = 0; } //スライダー EditorGUILayout.MinMaxSlider(ref frameStart, ref frameEnd, 0, rightValue); //右 frameEnd = (int)EditorGUILayout.FloatField(frameEnd, GUILayout.Width(30)); if (frameEnd < frameStart) { frameEnd = frameEnd - 1; } if (frameEnd > rightValue) { frameEnd = rightValue; } //削除 bool f = false; if (GUILayout.Button("×", GUILayout.Width(20))) { f = true; } EditorGUILayout.EndHorizontal(); frameHitBox[i].startFrame = (int)frameStart; frameHitBox[i].endFrame = (int)frameEnd; //当たり判定の設定 HitFoldOut(frameHitBox[i]); EditorGUILayout.EndVertical(); if (f) { frameHitBox.Remove(frameHitBox[i]); } } } return(frag); }
internal static UIDialogResult DisplayBugReportUI(ExceptionThread exceptionThread, SerializableException serializableException, Report report) { if (exceptionThread == ExceptionThread.Task) { // Do not interfere with the default behaviour for continuation on background thread exceptions. Just log and send'em (no UI...) return(new UIDialogResult(ExecutionFlow.ContinueExecution, SendReport.Send)); } if (Settings.UIMode == UIMode.Auto) { // First of, test to see if the call is from an UI thread and if so, use the same UI type (WinForms, WPF, etc.) if (exceptionThread == ExceptionThread.UI_WinForms) { return(WinFormsUI.ShowDialog(UIMode.Minimal, serializableException, report)); } if (exceptionThread == ExceptionThread.UI_WPF) { return(WPFUI.ShowDialog(UIMode.Minimal, serializableException, report)); } if (exceptionThread == ExceptionThread.Main) { // If the call is not from a non-UI thread like the main app thread, it may be from the current appdomain but // the application may still be using an UI. Or it may be coming from an exception filter where UI type is undefined yet. switch (DiscoverUI()) { case UIProvider.WinForms: return(WinFormsUI.ShowDialog(UIMode.Minimal, serializableException, report)); case UIProvider.WPF: return(WPFUI.ShowDialog(UIMode.Minimal, serializableException, report)); case UIProvider.Console: return(ConsoleUI.ShowDialog(UIMode.Minimal, serializableException, report)); case UIProvider.Custom: return(CustomUI.ShowDialog(UIMode.Minimal, serializableException, report)); default: throw new NBugRuntimeException("UISelector.DiscoverUI() returned an invalid UI type."); } } throw new NBugRuntimeException(string.Format("Parameter supplied for '{0}' is not valid.", typeof(ExceptionThread).Name)); } if (Settings.UIMode == UIMode.None) { // Do not display an UI for UIMode.None if (Settings.ExitApplicationImmediately) { return(new UIDialogResult(ExecutionFlow.BreakExecution, SendReport.Send)); } return(new UIDialogResult(ExecutionFlow.ContinueExecution, SendReport.Send)); } if (Settings.UIProvider == UIProvider.Console) { return(ConsoleUI.ShowDialog(Settings.UIMode, serializableException, report)); } if (Settings.UIProvider == UIProvider.WinForms) { return(WinFormsUI.ShowDialog(Settings.UIMode, serializableException, report)); } if (Settings.UIProvider == UIProvider.WPF) { return(WPFUI.ShowDialog(Settings.UIMode, serializableException, report)); } if (Settings.UIProvider == UIProvider.Custom) { return(CustomUI.ShowDialog(UIMode.Minimal, serializableException, report)); } if (Settings.UIProvider == UIProvider.Auto) { // In this case, UIProvider = Auto & UIMode != Auto so just discover the UI provider and use the selected UI mode switch (DiscoverUI()) { case UIProvider.WinForms: return(WinFormsUI.ShowDialog(Settings.UIMode, serializableException, report)); case UIProvider.WPF: return(WPFUI.ShowDialog(Settings.UIMode, serializableException, report)); case UIProvider.Console: return(ConsoleUI.ShowDialog(Settings.UIMode, serializableException, report)); case UIProvider.Custom: return(CustomUI.ShowDialog(UIMode.Minimal, serializableException, report)); default: throw new NBugRuntimeException("UISelector.DiscoverUI() returned an invalid UI type."); } } throw NBugConfigurationException.Create(() => Settings.UIProvider, "Parameter supplied for settings property is invalid."); }