Emits a warning on text frame not found.
This commit is contained in:
@@ -3,6 +3,7 @@ using Cryville.Common.Pdt;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Logger = Cryville.Common.Logging.Logger;
|
||||
|
||||
namespace Cryville.Crtr.Skin.Components {
|
||||
public class SpriteText : SpriteBase {
|
||||
@@ -117,7 +118,11 @@ namespace Cryville.Crtr.Skin.Components {
|
||||
tris[key].Clear();
|
||||
}
|
||||
foreach (var c in m_value) {
|
||||
var f = m_frames[c];
|
||||
SpriteInfo f;
|
||||
if (!m_frames.TryGetValue(c, out f)) {
|
||||
Logger.Log("main", 3, "Skin", "Could not render the character '{0}' in the string \"{1}\" on the text component because no image is assigned to that character.", c, m_value);
|
||||
continue;
|
||||
}
|
||||
var t = f.Frame.Texture;
|
||||
float w = f.Ratio * m_size;
|
||||
verts[t].Add(new Vector3(sum_x , 0, 0));
|
||||
|
Binary file not shown.
@@ -236,6 +236,12 @@
|
||||
Validates the string.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Buffers.TargetString.ToString">
|
||||
<summary>
|
||||
Returns the string the current <see cref="T:Cryville.Common.Buffers.TargetString" /> represents.
|
||||
</summary>
|
||||
<returns>The string the current <see cref="T:Cryville.Common.Buffers.TargetString" /> represents.</returns>
|
||||
</member>
|
||||
<member name="M:Cryville.Common.Buffers.TargetString.GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through the <see cref="T:Cryville.Common.Buffers.TargetString" />.
|
||||
|
Reference in New Issue
Block a user