private void HandleSubmit() { variableManager.SetVariableValue(variableName, inputField.text); if (playOnSubmit) { // Attempt to select and play next command. var nextIndex = scriptPlayer.PlayedIndex + 1; scriptPlayer.Play(nextIndex); } Hide(); }
private void DrawWindow(int windowId) { scrollPos = GUILayout.BeginScrollView(scrollPos); foreach (var record in records) { GUILayout.BeginHorizontal(); GUILayout.TextField(record.Name, GUILayout.Width(width / 2f - 15)); record.EditedValue = GUILayout.TextField(record.EditedValue); if (record.Changed && GUILayout.Button("SET", GUILayout.Width(50))) { variableManager.SetVariableValue(record.Name, record.EditedValue); } GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); if (GUILayout.Button("Close Window")) { show = false; } GUI.DragWindow(); }