Browse Source

Fixed text with Rich Text tags not displaying

master
chrisgregan 11 years ago
parent
commit
e71991c060
  1. 7
      Assets/Fungus/Scripts/Dialog.cs

7
Assets/Fungus/Scripts/Dialog.cs

@ -283,8 +283,6 @@ namespace Fungus
float continueTimer; float continueTimer;
bool instantCompleteText; bool instantCompleteText;
GameObject typingAudio;
// Cached versions of scaled style objects // Cached versions of scaled style objects
GUIStyle cachedBoxStyle; GUIStyle cachedBoxStyle;
GUIStyle cachedNameTextStyle; GUIStyle cachedNameTextStyle;
@ -391,10 +389,11 @@ namespace Fungus
sayText = _sayText; sayText = _sayText;
// Hack to avoid displaying partial color tag text
if (_sayText.Contains("<")) if (_sayText.Contains("<"))
{ {
// Hack to avoid displaying partial color tag text - write instantly
displayedSayText = _sayText; displayedSayText = _sayText;
dialogMode = DialogMode.Waiting;
} }
else else
{ {
@ -413,6 +412,8 @@ namespace Fungus
yield break; yield break;
} }
GameObject typingAudio = null;
if (writingSound != null) if (writingSound != null)
{ {
typingAudio = new GameObject(); typingAudio = new GameObject();

Loading…
Cancel
Save