From 5d0b97452f17560ffb8f971f7cd103168cd4c4c6 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Fri, 29 Aug 2014 17:39:23 +0100 Subject: [PATCH] Added dialog text tags --- Assets/Fungus/Dialog/Editor/SayEditor.cs | 3 +- Assets/Fungus/Dialog/Scripts/ChooseDialog.cs | 8 +- Assets/Fungus/Dialog/Scripts/Dialog.cs | 286 +++++++++++++++++-- Assets/Fungus/Dialog/Scripts/SayDialog.cs | 39 ++- Assets/Shuttle/ShuttleGame.unity | Bin 116380 -> 116636 bytes 5 files changed, 286 insertions(+), 50 deletions(-) diff --git a/Assets/Fungus/Dialog/Editor/SayEditor.cs b/Assets/Fungus/Dialog/Editor/SayEditor.cs index d6c323bb..44a50e9c 100644 --- a/Assets/Fungus/Dialog/Editor/SayEditor.cs +++ b/Assets/Fungus/Dialog/Editor/SayEditor.cs @@ -24,7 +24,8 @@ namespace Fungus.Script EditorGUILayout.BeginHorizontal(); - string text = EditorGUILayout.TextArea(t.storyText, sayStyle, GUILayout.MinHeight(40)); + float minHeight = sayStyle.CalcHeight(new GUIContent(t.storyText), EditorGUIUtility.currentViewWidth); + string text = EditorGUILayout.TextArea(t.storyText, sayStyle, GUILayout.MinHeight(minHeight + 10), GUILayout.ExpandHeight(true)); if (t.character != null && t.character.characterImage != null && diff --git a/Assets/Fungus/Dialog/Scripts/ChooseDialog.cs b/Assets/Fungus/Dialog/Scripts/ChooseDialog.cs index 0a8317ad..90c3b9e0 100644 --- a/Assets/Fungus/Dialog/Scripts/ChooseDialog.cs +++ b/Assets/Fungus/Dialog/Scripts/ChooseDialog.cs @@ -23,8 +23,8 @@ namespace Fungus.Script public void Choose(string text, List