private void DrawNode_UniRPGEvent(DiaQNode node) { Vector2 v = node.OutputPosition(0); GUI.DrawTexture(new Rect(2, v.y - 8, 16, 16), DiaQEdGUI.Icon_Event); GUI.Label(new Rect(20, v.y - 9, node.position.width - 40, 16), node.CachedString, DiaQEdGUI.LeftAlignTextStyle); if (GUI.Button(new Rect(v.x - 16, v.y - 8, 16, 16), new GUIContent(DiaQEdGUI.Icon_ArrowBlue), DiaQEdGUI.IconButtonStyle)) { linkNode = node; linkOutSlot = 0; linkOutPos1 = node.GetPositionInGraph(currGraph) + v; } }
private void DrawNode_QuestCheck(DiaQNode node) { GUI.DrawTexture(new Rect(node.position.width - 14, 2, 12, 12), DiaQEdGUI.Icon_Decision); Vector2 v = node.OutputPosition(0); GUI.Label(new Rect(0, v.y - 9, node.position.width - 20, 16), "NotTaken", DiaQEdGUI.RightAlignTextStyle); if (GUI.Button(new Rect(v.x - 16, v.y - 8, 16, 16), new GUIContent(DiaQEdGUI.Icon_ArrowRed), DiaQEdGUI.IconButtonStyle)) { linkNode = node; linkOutSlot = 0; linkOutPos1 = node.GetPositionInGraph(currGraph) + v; } v = node.OutputPosition(1); GUI.Label(new Rect(0, v.y - 9, node.position.width - 20, 16), "Accepted", DiaQEdGUI.RightAlignTextStyle); if (GUI.Button(new Rect(v.x - 16, v.y - 8, 16, 16), new GUIContent(DiaQEdGUI.Icon_ArrowYellow), DiaQEdGUI.IconButtonStyle)) { linkNode = node; linkOutSlot = 1; linkOutPos1 = node.GetPositionInGraph(currGraph) + v; } v = node.OutputPosition(2); GUI.Label(new Rect(0, v.y - 9, node.position.width - 20, 16), "Completed", DiaQEdGUI.RightAlignTextStyle); if (GUI.Button(new Rect(v.x - 16, v.y - 8, 16, 16), new GUIContent(DiaQEdGUI.Icon_ArrowGreen), DiaQEdGUI.IconButtonStyle)) { linkNode = node; linkOutSlot = 2; linkOutPos1 = node.GetPositionInGraph(currGraph) + v; } v = node.OutputPosition(3); GUI.Label(new Rect(0, v.y - 9, node.position.width - 20, 16), "HandedIn", DiaQEdGUI.RightAlignTextStyle); if (GUI.Button(new Rect(v.x - 16, v.y - 8, 16, 16), new GUIContent(DiaQEdGUI.Icon_ArrowBlue), DiaQEdGUI.IconButtonStyle)) { linkNode = node; linkOutSlot = 3; linkOutPos1 = node.GetPositionInGraph(currGraph) + v; } v = node.OutputPosition(4); GUI.DrawTexture(new Rect(2, v.y - 8, 16, 16), DiaQEdGUI.Icon_Quest); if (node.i_data[0] == 0) GUI.Label(new Rect(20, v.y - 9, node.position.width - 40, 16), node.CachedString, DiaQEdGUI.LeftAlignTextStyle); else GUI.Label(new Rect(20, v.y - 9, node.position.width - 40, 16), "from: " + node.data[0], DiaQEdGUI.LeftAlignTextStyle); }
private void DrawNode_Random(DiaQNode node) { Vector2 v = node.OutputPosition(0); GUI.DrawTexture(new Rect(2, v.y - 8, 16, 16), DiaQEdGUI.Icon_Dice); for (int i = 0; i < node.i_data[0]; i++) { v = node.OutputPosition(i); GUI.Label(new Rect(0, v.y - 9, node.position.width - 20, 16), i.ToString(), DiaQEdGUI.RightAlignTextStyle); if (GUI.Button(new Rect(v.x - 16, v.y - 8, 16, 16), new GUIContent(DiaQEdGUI.Icon_ArrowBlue), DiaQEdGUI.IconButtonStyle)) { linkNode = node; linkOutSlot = i; linkOutPos1 = node.GetPositionInGraph(currGraph) + v; } } }
private void DrawNode_Decision(DiaQNode node) { GUI.DrawTexture(new Rect(node.position.width - 14, 2, 12, 12), DiaQEdGUI.Icon_Decision); Vector2 v = node.OutputPosition(0); GUI.Label(new Rect(0, v.y - 9, node.position.width - 20, 16), "TRUE", DiaQEdGUI.RightAlignTextStyle); if (GUI.Button(new Rect(v.x - 16, v.y - 8, 16, 16), new GUIContent(DiaQEdGUI.Icon_ArrowGreen), DiaQEdGUI.IconButtonStyle)) { linkNode = node; linkOutSlot = 0; linkOutPos1 = node.GetPositionInGraph(currGraph) + v; } v = node.OutputPosition(1); GUI.Label(new Rect(0, v.y - 9, node.position.width - 20, 16), "FALSE", DiaQEdGUI.RightAlignTextStyle); if (GUI.Button(new Rect(v.x - 16, v.y - 8, 16, 16), new GUIContent(DiaQEdGUI.Icon_ArrowRed), DiaQEdGUI.IconButtonStyle)) { linkNode = node; linkOutSlot = 1; linkOutPos1 = node.GetPositionInGraph(currGraph) + v; } }
private void DrawNode_Dialogue(DiaQNode node) { GUI.DrawTexture(new Rect(node.position.width - 14, 2, 12, 12), DiaQEdGUI.Icon_Dialogue); for (int i = 0; i < node.choices.Count; i++) { Vector2 v = node.OutputPosition(i); GUI.Label(new Rect(0, v.y - 9, node.position.width - 20, 16), node.choices[i] + " :" + (i + 1).ToString(), DiaQEdGUI.RightAlignTextStyle); if (GUI.Button(new Rect(v.x - 16, v.y - 8, 16, 16), new GUIContent(DiaQEdGUI.Icon_ArrowBlue), DiaQEdGUI.IconButtonStyle)) { linkNode = node; linkOutSlot = i; linkOutPos1 = node.GetPositionInGraph(currGraph) + v; } } }
private void DrawNode_Start(DiaQNode node) { GUI.DrawTexture(new Rect(19, 19, 16, 16), DiaQEdGUI.Icon_Play); Vector2 v = node.OutputPosition(0); if (GUI.Button(new Rect(v.x - 16, v.y - 8, 16, 16), new GUIContent(DiaQEdGUI.Icon_ArrowBlue), DiaQEdGUI.IconButtonStyle)) { linkNode = node; linkOutSlot = 0; linkOutPos1 = node.GetPositionInGraph(currGraph) + v; } }