public override void NodeGUI() { GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); IDIn.DisplayLayout(); //GUILayout.Label("ID Input"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Entity ID:"); entityID = GUILayout.TextField(entityID); GUILayout.EndHorizontal(); // TODO: find out why this doesn't work: //if (WorldCreatorCursor.instance != null) //{ // if (GUILayout.Button("Select", GUILayout.ExpandWidth(false))) // { // WorldCreatorCursor.selectEntity += SetEntityID; // WorldCreatorCursor.instance.EntitySelection(); // } //} }
public override void NodeGUI() { output.DisplayLayout(); GUILayout.Label("Sector name"); sectorName = RTEditorGUI.TextField(sectorName); loseMode = RTEditorGUI.Toggle(loseMode, "Check for loss instead of win?"); }
public override void NodeGUI() { GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); if (!(endPanning = GUILayout.Toggle(endPanning, "End Panning"))) { if (useCoordinates = Utilities.RTEditorGUI.Toggle(useCoordinates, "Use coordinates")) { GUILayout.Label("Coordinates:"); float x = coordinates.x, y = coordinates.y; GUILayout.BeginHorizontal(); x = Utilities.RTEditorGUI.FloatField("X", x); y = Utilities.RTEditorGUI.FloatField("Y", y); coordinates = new Vector2(x, y); GUILayout.EndHorizontal(); } else { GUILayout.Label("Flag Name:"); flagName = GUILayout.TextField(flagName); } velocityFactor = Utilities.RTEditorGUI.FloatField("Velocity Factor", velocityFactor); asynchronous = RTEditorGUI.Toggle(asynchronous, "Asynchronous Mode", GUILayout.MinWidth(400)); } }
public override void NodeGUI() { output.DisplayLayout(); GUILayout.Label("Mission name"); missionName = RTEditorGUI.TextField(missionName); missionStatus = GUILayout.SelectionGrid(missionStatus, missionStatusTexts, 1); }
public override void NodeGUI() { output.DisplayLayout(); GUILayout.BeginHorizontal(); GUILayout.Label("Shell ID: "); ShellID = Utilities.RTEditorGUI.TextField(ShellID); GUILayout.EndHorizontal(); }
public override void NodeGUI() { output.DisplayLayout(); GUILayout.Label("Part ID:"); partID = GUILayout.TextField(partID); abilityID = Utilities.RTEditorGUI.IntField("Ability ID: ", abilityID); GUILayout.Label("Sector name for part to come from:"); sectorName = GUILayout.TextField(sectorName); }
public override void NodeGUI() { GUILayout.BeginHorizontal(); if (useIDInput) { if (IDInput == null) { if (inputKnobs.Count == 0) { IDInput = CreateConnectionKnob(IDInStyle); } else { IDInput = inputKnobs[0]; } } IDInput.DisplayLayout(); } output.DisplayLayout(); GUILayout.EndHorizontal(); if (nameMode = RTEditorGUI.Toggle(nameMode, "Name Mode")) { GUILayout.Label("Target Name"); targetID = GUILayout.TextField(targetID); } else { useIDInput = RTEditorGUI.Toggle(useIDInput, "Use ID input"); if (GUI.changed) { if (useIDInput) { IDInput = CreateConnectionKnob(IDInStyle); } else { DeleteConnectionPort(IDInput); } } if (!useIDInput) { GUILayout.Label("Target ID"); targetID = GUILayout.TextField(targetID); if (WorldCreatorCursor.instance != null) { if (GUILayout.Button("Select", GUILayout.ExpandWidth(false))) { WorldCreatorCursor.selectEntity += SetEntityID; WorldCreatorCursor.instance.EntitySelection(); } } } } targetCount = RTEditorGUI.IntField("Count: ", targetCount); targetFaction = RTEditorGUI.IntField("Faction: ", targetFaction); }
public override void NodeGUI() { output.DisplayLayout(); GUILayout.Label("Entity ID:"); entityID = RTEditorGUI.TextField(entityID); rangeCheck = RTEditorGUI.Toggle(rangeCheck, "Range check", GUILayout.Width(200f)); if (rangeCheck) { distanceFromPlayer = RTEditorGUI.IntField("Distance (squared): ", distanceFromPlayer); } }
public override void NodeGUI() { GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); targetFaction = RTEditorGUI.IntField("Target Faction", targetFaction); GUILayout.EndHorizontal(); }
public override void NodeGUI() { output.DisplayLayout(); GUILayout.Label("Entity ID:"); entityID = RTEditorGUI.TextField(entityID); rangeCheck = RTEditorGUI.Toggle(rangeCheck, "Range check from player", GUILayout.Width(200f)); if (rangeCheck) { distanceFromPlayer = RTEditorGUI.IntField("Distance: ", distanceFromPlayer); lessThan = GUILayout.SelectionGrid(lessThan ? 0 : 1, new string[] { "Less", "Greater" }, 1) == 0; } }
public override void NodeGUI() { GUILayout.Label("Text:"); text = GUILayout.TextArea(text, GUILayout.ExpandHeight(false)); if (!(useEntityColor = GUILayout.Toggle(useEntityColor, "Use entity color"))) { GUILayout.Label("Text Color:"); float r, g, b; GUILayout.BeginHorizontal(); r = RTEditorGUI.FloatField(textColor.r); g = RTEditorGUI.FloatField(textColor.g); b = RTEditorGUI.FloatField(textColor.b); GUILayout.EndHorizontal(); textColor = new Color(r, g, b); } GUILayout.Label("Answers:"); for (int i = 0; i < answers.Count; i++) { RTEditorGUI.Seperator(); GUILayout.BeginHorizontal(); if (GUILayout.Button("x", GUILayout.ExpandWidth(false))) { DeleteConnectionPort(outputPorts[i + 1]); answers.RemoveAt(i); i--; if (i == -1) { break; } continue; } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); answers[i] = RTEditorGUI.TextField(answers[i]); outputKnobs[i + 1].DisplayLayout(); GUILayout.EndHorizontal(); } GUILayout.BeginHorizontal(); if (GUILayout.Button("Add", GUILayout.ExpandWidth(false), GUILayout.MinWidth(100f))) { CreateConnectionKnob(outputAttribute); answers.Add(""); } GUILayout.EndHorizontal(); if (customDialogueSpeed = GUILayout.Toggle(customDialogueSpeed, "Use custom typing speed", GUILayout.MinWidth(40f))) { GUILayout.Label("Time between characters (seconds)"); speed = double.Parse(GUILayout.TextField(speed + "", GUILayout.MinWidth(40f))); } cancel.DisplayLayout(); }
public override void NodeGUI() { GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); string[] types = System.Enum.GetNames(typeof(Sector.SectorType)); GUILayout.Label("Sector Type:"); sectorType = GUILayout.SelectionGrid(sectorType, types, 1, GUILayout.Width(144f)); }
public override void NodeGUI() { input.DisplayLayout(); output.DisplayLayout(); GUILayout.Label("Text:"); text = GUILayout.TextArea(text); GUILayout.Label("ID:"); id = GUILayout.TextArea(id); onlyShowIfInParty = GUILayout.Toggle(onlyShowIfInParty, "Only show if in party"); }
//public bool action = false; //TODO: action input public override void NodeGUI() { GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); defaultMusic = GUILayout.Toggle(defaultMusic, "Default music"); if (!defaultMusic) { GUILayout.Label("Music ID:"); musicID = GUILayout.TextArea(musicID); } }
public override void NodeGUI() { GUILayout.Label("Decorator Node"); GUILayout.BeginHorizontal(); GUILayout.BeginVertical(); inputKnob.DisplayLayout(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); base.NodeGUI(); }
public override void NodeGUI() { if (NodeEditorGUI.state == NodeEditorGUI.NodeEditorState.Dialogue && outputKnobs.Count > 0) { DeleteConnectionPort(outputKnobs[0]); output = null; } else if ((NodeEditorGUI.state != NodeEditorGUI.NodeEditorState.Dialogue) && (output == null)) { output = CreateConnectionKnob(OutStyle); } GUILayout.BeginHorizontal(); input.DisplayLayout(); if (!jumpToStart && (NodeEditorGUI.state != NodeEditorGUI.NodeEditorState.Dialogue)) { if (output == null) { if (outputKnobs.Count == 0) { output = CreateConnectionKnob(OutStyle); } else { output = outputKnobs[0]; } } output.DisplayLayout(); } GUILayout.EndHorizontal(); jumpToStart = RTEditorGUI.Toggle(jumpToStart, "Jump to start"); if (jumpToStart && outputKnobs.Count > 0) { DeleteConnectionPort(outputKnobs[0]); output = null; } GUILayout.BeginHorizontal(); openBuilder = RTEditorGUI.Toggle(openBuilder, "Open Yard"); GUILayout.EndHorizontal(); if (openTrader = RTEditorGUI.Toggle(openTrader, "Open Trader")) { GUILayout.BeginHorizontal(); GUILayout.Label("Trader Inventory JSON"); traderJSON = GUILayout.TextArea(traderJSON); GUILayout.EndHorizontal(); } }
public override void NodeGUI() { output.DisplayLayout(); GUILayout.Label("Sector name: "); sectorName = GUILayout.TextField(sectorName); GUILayout.Label("Entity ID: "); entityID = GUILayout.TextField(entityID); if (WorldCreatorCursor.instance != null) { if (GUILayout.Button("Select Warp Entity", GUILayout.ExpandWidth(false))) { WorldCreatorCursor.selectEntity += SelectEntity; WorldCreatorCursor.instance.EntitySelection(); } } }
public override void NodeGUI() { GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); GUILayout.Label("Color:"); GUILayout.BeginHorizontal(); var r = RTEditorGUI.FloatField(color.r); var g = RTEditorGUI.FloatField(color.g); var b = RTEditorGUI.FloatField(color.b); color = new Color(r, g, b); GUILayout.EndHorizontal(); }
public override void NodeGUI() { GUILayout.BeginHorizontal(); inputLeft.DisplayLayout(); GUILayout.BeginVertical(); outputTrue.DisplayLayout(); outputFalse.DisplayLayout(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.Label("Variable Name:"); variableName = GUILayout.TextField(variableName); GUILayout.Label("Value:"); value = RTEditorGUI.IntField(value); GUILayout.Label("Comparison mode:"); mode = GUILayout.SelectionGrid(mode, modes, 1, GUILayout.Width(144f)); }
public override void NodeGUI() { dynaCreationAttribute.MaxConnectionCount = ConnectionCount.Single; if (dynamicConnectionPorts.Count != labels.Count) { // Make sure labels and ports are synchronised while (dynamicConnectionPorts.Count > labels.Count) { DeleteConnectionPort(dynamicConnectionPorts.Count - 1); } while (dynamicConnectionPorts.Count < labels.Count) { CreateConnectionKnob(dynaCreationAttribute); } } input.DisplayLayout(); GUILayout.Label("Runs child nodes in sequence"); // Display text field and add button GUILayout.BeginHorizontal(); newLabel = (labels.Count + 1).ToString(); GUILayout.EndHorizontal(); for (int i = 0; i < labels.Count; i++) { // Display label and delete button GUILayout.BeginHorizontal(); GUILayout.Label(labels[i]); ((ConnectionKnob)dynamicConnectionPorts[i]).SetPosition(); if (GUILayout.Button("x", GUILayout.ExpandWidth(false))) { // Remove current label labels.RemoveAt(i); DeleteConnectionPort(i); i--; } GUILayout.EndHorizontal(); } GUILayout.BeginHorizontal(); if (GUILayout.Button("Add", GUILayout.ExpandWidth(false))) { labels.Add(newLabel); CreateConnectionKnob(dynaCreationAttribute); } GUILayout.EndHorizontal(); }
public override void NodeGUI() { GUILayout.Label("This node is deprecated. Use 'Flow/Condition Check Node' instead"); GUILayout.Space(20); GUILayout.BeginHorizontal(); inputLeft.DisplayLayout(); GUILayout.BeginVertical(); outputTrue.DisplayLayout(); outputFalse.DisplayLayout(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.Label("Variable Name:"); variableName = GUILayout.TextField(variableName); GUILayout.Label("Value:"); value = RTEditorGUI.IntField(value); GUILayout.Label("Comparison mode:"); mode = GUILayout.SelectionGrid(mode, modes, 1, GUILayout.Width(144f)); }
public override void NodeGUI() { GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (!(restoreOld = GUILayout.Toggle(restoreOld, "Restore old drop rate"))) { GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Drop Rate"); dropRate = RTEditorGUI.FloatField(dropRate, GUILayout.MinWidth(400)); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Sector Name"); sectorName = RTEditorGUI.TextField(sectorName, GUILayout.MinWidth(400)); } GUILayout.EndHorizontal(); }
public override void NodeGUI() { height = 150f; GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); GUILayout.Label("Text:"); text = GUILayout.TextArea(text); height += GUI.skin.textArea.CalcHeight(new GUIContent(text), 200f); GUILayout.Label("Color:"); float r, g, b; GUILayout.BeginHorizontal(); r = RTEditorGUI.FloatField(color.r); g = RTEditorGUI.FloatField(color.g); b = RTEditorGUI.FloatField(color.b); GUILayout.EndHorizontal(); color = new Color(r, g, b); }
public override void NodeGUI() { GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); GUILayout.Label("Note: Using the ID of a character will spawn the " + "character, rendering the blueprint, faction and entity name fields obsolete."); GUILayout.Label("Blueprint:"); blueprint = GUILayout.TextField(blueprint); GUILayout.Label("Entity Name:"); entityName = GUILayout.TextField(entityName); GUILayout.Label("Faction number:"); faction = Utilities.RTEditorGUI.IntField(faction); if (useCoordinates = Utilities.RTEditorGUI.Toggle(useCoordinates, "Use coordinates")) { GUILayout.Label("Coordinates:"); float x = coordinates.x, y = coordinates.y; GUILayout.BeginHorizontal(); x = Utilities.RTEditorGUI.FloatField("X", x); y = Utilities.RTEditorGUI.FloatField("Y", y); coordinates = new Vector2(x, y); GUILayout.EndHorizontal(); } else { GUILayout.Label("Flag Name:"); flagName = GUILayout.TextField(flagName); } if (issueID = Utilities.RTEditorGUI.Toggle(issueID, "Issue ID")) { GUILayout.Label("Entity ID:"); entityID = GUILayout.TextField(entityID); } forceCharacterTeleport = Utilities.RTEditorGUI.Toggle(forceCharacterTeleport, "Force Character Teleport"); }
public override void NodeGUI() { output.DisplayLayout(); GUILayout.Label("Sector name"); sectorName = RTEditorGUI.TextField(sectorName); }
public override void NodeGUI() { GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); GUILayout.Label("Note: Using the ID of a character will spawn the " + "character, rendering the blueprint, faction and entity name fields obsolete."); GUILayout.Label("Blueprint:"); blueprint = GUILayout.TextField(blueprint); GUILayout.Label("Entity Name:"); entityName = GUILayout.TextField(entityName); GUILayout.Label("Faction number:"); faction = Utilities.RTEditorGUI.IntField(faction); if (useCoordinates = Utilities.RTEditorGUI.Toggle(useCoordinates, "Use coordinates")) { GUILayout.Label("Coordinates:"); float x = coordinates.x, y = coordinates.y; GUILayout.BeginHorizontal(); x = Utilities.RTEditorGUI.FloatField("X", x); y = Utilities.RTEditorGUI.FloatField("Y", y); coordinates = new Vector2(x, y); GUILayout.EndHorizontal(); } else { GUILayout.Label("Flag Name:"); flagName = GUILayout.TextField(flagName); } if (issueID = Utilities.RTEditorGUI.Toggle(issueID, "Issue ID")) { GUILayout.Label("Entity ID:"); entityID = GUILayout.TextField(entityID); } GUILayout.Label("Spawn count:"); count = Mathf.Max(1, Utilities.RTEditorGUI.IntField(count)); forceCharacterTeleport = Utilities.RTEditorGUI.Toggle(forceCharacterTeleport, "Force Character Teleport"); GUILayout.Label("Additional spawn points:"); for (int i = 0; i < additionalFlags.Count; i++) { RTEditorGUI.Seperator(); GUILayout.BeginHorizontal(); if (GUILayout.Button("x", GUILayout.ExpandWidth(false))) { additionalFlags.RemoveAt(i); additionalCounts.RemoveAt(i); i--; if (i == -1) { break; } continue; } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Flag name:"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); additionalFlags[i] = GUILayout.TextField(additionalFlags[i]); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Spawn count:"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); additionalCounts[i] = Mathf.Max(1, Utilities.RTEditorGUI.IntField(additionalCounts[i])); GUILayout.EndHorizontal(); } GUILayout.BeginHorizontal(); if (GUILayout.Button("Add", GUILayout.ExpandWidth(false), GUILayout.MinWidth(100f))) { additionalFlags.Add(""); additionalCounts.Add(1); } GUILayout.EndHorizontal(); }
public override void NodeGUI() { output.DisplayLayout(); seconds = Utilities.RTEditorGUI.IntField("Time (seconds): ", seconds); milliseconds = Utilities.RTEditorGUI.IntField("Additional Time (milliseconds): ", milliseconds, GUILayout.Width(300F)); }
public override void NodeGUI() { output.DisplayLayout(); seconds = Utilities.RTEditorGUI.IntField("Time: ", seconds); }
public override void NodeGUI() { GUILayout.BeginHorizontal(); input.DisplayLayout(); output.DisplayLayout(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (useIDInput) { if (IDInput == null) { if (inputKnobs.Count == 1) { IDInput = CreateConnectionKnob(IDInStyle); } else { IDInput = inputKnobs[1]; } } IDInput.DisplayLayout(); } GUILayout.EndHorizontal(); useIDInput = RTEditorGUI.Toggle(useIDInput, "Use ID Input", GUILayout.MinWidth(400)); if (GUI.changed) { if (useIDInput) { IDInput = CreateConnectionKnob(IDInStyle); } else { DeleteConnectionPort(IDInput); } } if (!useIDInput) { GUILayout.Label("Entity ID"); entityID = GUILayout.TextField(entityID); if (WorldCreatorCursor.instance != null) { if (GUILayout.Button("Select", GUILayout.ExpandWidth(false))) { WorldCreatorCursor.selectEntity += SetEntityID; WorldCreatorCursor.instance.EntitySelection(); } } } RTEditorGUI.Seperator(); asynchronous = RTEditorGUI.Toggle(asynchronous, "Asynchronous Mode", GUILayout.MinWidth(400)); if (GUILayout.Button("Draw Path", GUILayout.ExpandWidth(false))) { if (path == null) { path = new PathData(); path.waypoints = new List <PathData.Node>(); } WorldCreatorCursor.finishPath += SetPath; WorldCreatorCursor.instance.pathDrawing(WorldCreatorCursor.WCCursorMode.Control, path); } GUILayout.BeginHorizontal(); doNotRotate = GUILayout.Toggle(doNotRotate, "Do Not Rotate", GUILayout.MinWidth(400)); GUILayout.EndHorizontal(); if (useCustomMass = GUILayout.Toggle(useCustomMass, "Use Custom Weight", GUILayout.MinWidth(400))) { GUILayout.Label("Weight"); mass = float.Parse(GUILayout.TextField(mass.ToString(), GUILayout.MinWidth(400))); } }
public override void NodeGUI() { GUILayout.BeginHorizontal(); inputLeft.DisplayLayout(); outputRight.DisplayLayout(); GUILayout.EndHorizontal(); showPopup = RTEditorGUI.Toggle(showPopup, "Show popup:"); GUILayout.Label("Credit reward:"); wrapper.creditReward = RTEditorGUI.IntField(wrapper.creditReward, GUILayout.Width(208f)); GUILayout.Label("Reputation reward:"); wrapper.reputationReward = RTEditorGUI.IntField(wrapper.reputationReward, GUILayout.Width(208f)); GUILayout.Label("Shard reward:"); wrapper.shardReward = RTEditorGUI.IntField(wrapper.shardReward, GUILayout.Width(208f)); wrapper.partReward = RTEditorGUI.Toggle(wrapper.partReward, "Part reward", GUILayout.Width(200f)); if (wrapper.partReward) { height += 320f; GUILayout.Label("Part ID:"); wrapper.partID = GUILayout.TextField(wrapper.partID, GUILayout.Width(200f)); if (ResourceManager.Instance != null && wrapper.partID != null && (GUI.changed || !init)) { init = true; PartBlueprint partBlueprint = ResourceManager.GetAsset <PartBlueprint>(wrapper.partID); if (partBlueprint != null) { partTexture = ResourceManager.GetAsset <Sprite>(partBlueprint.spriteID).texture; } else { partTexture = null; } } if (partTexture != null) { GUILayout.Label(partTexture); height += partTexture.height + 8f; } else { NodeEditorGUI.nodeSkin.label.normal.textColor = Color.red; GUILayout.Label("<Part not found>"); NodeEditorGUI.nodeSkin.label.normal.textColor = NodeEditorGUI.NE_TextColor; } wrapper.partAbilityID = RTEditorGUI.IntField("Ability ID", wrapper.partAbilityID, GUILayout.Width(200f)); string abilityName = AbilityUtilities.GetAbilityNameByID(wrapper.partAbilityID, null); if (abilityName != "Name unset") { GUILayout.Label("Ability: " + abilityName); height += 24f; } wrapper.partTier = RTEditorGUI.IntField("Part tier", wrapper.partTier, GUILayout.Width(200f)); GUILayout.Label("Part Secondary Data:"); wrapper.partSecondaryData = GUILayout.TextField(wrapper.partSecondaryData, GUILayout.Width(200f)); } else { height += 160f; } }