/// <summary> /// Setup this window's UI. /// </summary> void SetupUI() { _backgroundStyle = new GUIStyle(GUI.skin.box); RectOffset br = _backgroundStyle.margin; br.top = 10; br.bottom = 6; br.left = 4; br.right = 4; _backgroundStyle.margin = br; br = _backgroundStyle.padding; br.top = 8; br.bottom = 8; br.left = 8; br.right = 8; _backgroundStyle.padding = br; _eventMessageContent = new GUIContent("Log", "Status messages logged here."); _eventMessageStyle = new GUIStyle(EditorStyles.textArea); _eventMessageStyle.richText = true; _eventMessageStyle.normal.textColor = new Color(1f, 1f, 1f, 1f); _eventMessageStyle.normal.background = HEU_GeneralUtility.MakeTexture(1, 1, new Color(0, 0, 0, 1f)); }
private void SetupUIElements() { if (_helpGridBoxStyle == null) { _helpGridBoxStyle = new GUIStyle(GUI.skin.box); Color bgColor = HEU_EditorUI.IsEditorDarkSkin() ? new Color(0.8f, 0.8f, 0.8f, 0.2f) : new Color(0.6f, 0.6f, 0.6f, 0.6f); _helpGridBoxStyle.normal.background = HEU_GeneralUtility.MakeTexture(1, 1, bgColor); _helpGridBoxStyle.normal.textColor = HEU_EditorUI.IsEditorDarkSkin() ? Color.white : Color.black; _helpGridBoxStyle.fontStyle = FontStyle.Normal; _helpGridBoxStyle.fontSize = 11; _helpGridBoxStyle.alignment = TextAnchor.MiddleLeft; } }
public void SetupUI() { _backgroundStyle = new GUIStyle(GUI.skin.box); RectOffset br = _backgroundStyle.margin; br.top = 10; br.bottom = 6; br.left = 4; br.right = 4; _backgroundStyle.margin = br; _eventMessageStyle = new GUIStyle(EditorStyles.textArea); _eventMessageStyle.richText = true; _eventMessageStyle.normal.textColor = new Color(1f, 1f, 1f, 1f); _eventMessageStyle.normal.background = HEU_GeneralUtility.MakeTexture(1, 1, new Color(0, 0, 0, 1f)); }
private void SetupUI() { _cookedColor = new Color(0.1f, 0.9f, 0.0f, 1f); _assetGOLabel = new GUIContent("Linked Asset", "The HDA containing TOP networks to link with."); _assetStatusLabel = new GUIContent("Asset Work Items Status:"); _resetContent = new GUIContent("Reset", "Reset the state and generated items. Updates from linked HDA."); _refreshContent = new GUIContent("Refresh", "Refresh the state and UI."); _autocookContent = new GUIContent("Autocook", "Automatically cook the output node when the linked asset is cooked."); _useHEngineDataContent = new GUIContent("Use HEngine Data", "Whether to use henginedata parm values for displaying and loading node resuls."); _topNetworkChooseLabel = new GUIContent("TOP Network"); _topNetworkNoneLabel = new GUIContent("TOP Network: None"); _topNodeChooseLabel = new GUIContent("TOP Node"); _topNodeNoneLabel = new GUIContent("TOP Node: None"); _topNodeStatusLabel = new GUIContent("TOP Node Work Items Status:"); _buttonDirtyContent = new GUIContent("Dirty Node", "Remove current TOP node's work items."); _buttonCookContent = new GUIContent("Cook Node", "Generates and cooks current TOP node's work items."); _autoloadContent = new GUIContent("Autoload Results", "Automatically load into Unity the generated geometry from work item results."); _showHideResultsContent = new GUIContent("Show Results", "Show or Hide Results."); _buttonDirtyAllContent = new GUIContent("Dirty All", "Removes all work items."); _buttonCookAllContent = new GUIContent("Cook Output", "Generates and cooks all work items."); _buttonCancelCookContent = new GUIContent("Cancel Cook", "Cancel PDG cook."); _buttonPauseCookContent = new GUIContent("Pause Cook", "Pause PDG cook."); _eventMessageContent = new GUIContent("PDG Event Messages", "Messages from events generated during cooking the PDG graph."); _backgroundStyle = new GUIStyle(GUI.skin.box); RectOffset br = _backgroundStyle.margin; br.top = 10; br.bottom = 6; br.left = 4; br.right = 4; _backgroundStyle.margin = br; br = _backgroundStyle.padding; br.top = 8; br.bottom = 8; br.left = 8; br.right = 8; _backgroundStyle.padding = br; _boxStyleTitle = new GUIStyle(GUI.skin.box); float c = 0.35f; _boxStyleTitle.normal.background = HEU_GeneralUtility.MakeTexture(1, 1, new Color(c, c, c, 1f)); _boxStyleTitle.normal.textColor = Color.black; _boxStyleTitle.fontStyle = FontStyle.Bold; _boxStyleTitle.alignment = TextAnchor.MiddleCenter; _boxStyleTitle.fontSize = 10; _boxStyleValue = new GUIStyle(GUI.skin.box); c = 0.7f; _boxStyleValue.normal.background = HEU_GeneralUtility.MakeTexture(1, 1, new Color(c, c, c, 1f)); _boxStyleValue.normal.textColor = Color.black; _boxStyleValue.fontStyle = FontStyle.Bold; _boxStyleValue.fontSize = 14; _boxStyleStatus = new GUIStyle(GUI.skin.box); c = 0.3f; _boxStyleStatus.normal.background = HEU_GeneralUtility.MakeTexture(1, 1, new Color(c, c, c, 1f)); _boxStyleStatus.normal.textColor = Color.black; _boxStyleStatus.fontStyle = FontStyle.Bold; _boxStyleStatus.alignment = TextAnchor.MiddleCenter; _boxStyleStatus.fontSize = 14; _boxStyleStatus.stretchWidth = true; _eventMessageStyle = new GUIStyle(EditorStyles.textArea); _eventMessageStyle.richText = true; _eventMessageStyle.normal.background = HEU_GeneralUtility.MakeTexture(1, 1, new Color(0, 0, 0, 1f)); }