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;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Logger = Cryville.Common.Logging.Logger;
|
||||||
|
|
||||||
namespace Cryville.Crtr.Skin.Components {
|
namespace Cryville.Crtr.Skin.Components {
|
||||||
public class SpriteText : SpriteBase {
|
public class SpriteText : SpriteBase {
|
||||||
@@ -117,7 +118,11 @@ namespace Cryville.Crtr.Skin.Components {
|
|||||||
tris[key].Clear();
|
tris[key].Clear();
|
||||||
}
|
}
|
||||||
foreach (var c in m_value) {
|
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;
|
var t = f.Frame.Texture;
|
||||||
float w = f.Ratio * m_size;
|
float w = f.Ratio * m_size;
|
||||||
verts[t].Add(new Vector3(sum_x , 0, 0));
|
verts[t].Add(new Vector3(sum_x , 0, 0));
|
||||||
|
Binary file not shown.
@@ -236,6 +236,12 @@
|
|||||||
Validates the string.
|
Validates the string.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</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">
|
<member name="M:Cryville.Common.Buffers.TargetString.GetEnumerator">
|
||||||
<summary>
|
<summary>
|
||||||
Returns an enumerator that iterates through the <see cref="T:Cryville.Common.Buffers.TargetString" />.
|
Returns an enumerator that iterates through the <see cref="T:Cryville.Common.Buffers.TargetString" />.
|
||||||
|
Reference in New Issue
Block a user