public void assertStyle(string setting, StoryVar value) { StoryStyle style = this.Story.GetCurrentStyle(); IntegrationTest.Assert( value == style[setting], string.Format("Group's \"{0}\" style setting is not {1}", setting, value) ); IntegrationTest.Assert( this.Story.Output.Reverse <StoryOutput>().Any(output => value == output.GetAppliedStyle()[setting]), string.Format("The \"{0}\" style setting was not applied to any output", setting) ); }
public override void OnInspectorGUI() { StoryOutput output = ((TwineTextPlayerElement)target).SourceOutput; bool unused; EditorGUILayout.LabelField("Type", output.GetType().Name); EditorGUILayout.LabelField("Id", idGenerator.GetId(output, out unused).ToString()); EditorGUILayout.LabelField("Name", output.Name); EditorGUILayout.LabelField("Text", output.Text); EditorGUILayout.LabelField("Style"); EditorGUI.indentLevel++; StoryStyle style = output.GetAppliedStyle(); foreach (var pair in style) { EditorGUILayout.LabelField(pair.Key, pair.Value != null ? pair.Value.ToString() : null); } EditorGUI.indentLevel--; }