//--------------------------------- // Constructor //--------------------------------- public UISpeechNode(EditableConversationNode infoNode, Vector2 pos) : base(infoNode, pos) { if (defaultNodeStyle == null || defaultNodeStyle.normal.background == null) { defaultNodeStyle = new GUIStyle(); defaultNodeStyle.normal.background = DialogueEditorUtil.MakeTextureForNode(Width, Height, DefaultColor); } if (selectedNodeStyle == null || selectedNodeStyle.normal.background == null) { selectedNodeStyle = new GUIStyle(); selectedNodeStyle.normal.background = DialogueEditorUtil.MakeTextureForNode(Width, Height, SelectedColor); } if (npcNameStyle == null) { npcNameStyle = new GUIStyle(); npcNameStyle.normal.textColor = new Color(0.8f, 0.8f, 0.8f, 1); npcNameStyle.wordWrap = true; npcNameStyle.stretchHeight = false; npcNameStyle.alignment = TextAnchor.MiddleCenter; npcNameStyle.clipping = TextClipping.Clip; } currentBoxStyle = defaultNodeStyle; CreateRect(pos, Width, Height); }
//--------------------------------- // Constructor //--------------------------------- public UIOptionNode(EditableConversationNode infoNode, Vector2 pos) : base(infoNode, pos) { if (defaultNodeStyle == null || defaultNodeStyle.normal.background == null) { defaultNodeStyle = new GUIStyle(); defaultNodeStyle.normal.background = DialogueEditorUtil.MakeTextureForNode(Width, Height, DefaultColor); } if (selectedNodeStyle == null || selectedNodeStyle.normal.background == null) { selectedNodeStyle = new GUIStyle(); selectedNodeStyle.normal.background = DialogueEditorUtil.MakeTextureForNode(Width, Height, SelectedColor); } currentBoxStyle = defaultNodeStyle; CreateRect(pos, Width, Height); }