Fix once
annotation not working on certain properties.
This commit is contained in:
@@ -8,6 +8,8 @@ namespace Cryville.Crtr {
|
||||
readonly ISkinnableGroup _group;
|
||||
readonly SkinElement _rootElement;
|
||||
readonly DynamicStack[] _stacks = new DynamicStack[2];
|
||||
readonly HashSet<SkinPropertyKey> _once = new HashSet<SkinPropertyKey>();
|
||||
|
||||
class DynamicStack {
|
||||
public readonly List<DynamicProperty> Properties = new List<DynamicProperty>();
|
||||
public readonly List<DynamicElement> Elements = new List<DynamicElement>();
|
||||
@@ -112,7 +114,14 @@ namespace Cryville.Crtr {
|
||||
ChartPlayer.etor.ContextTransform = rc.Transform;
|
||||
if (rc.PropSrcs != null) ChartPlayer.etor.ContextCascadeInsert(rc.PropSrcs);
|
||||
foreach (var p in rel.properties) {
|
||||
p.Key.ExecuteDynamic(_group, ctx, p.Value, dl);
|
||||
if (p.Key.annotations.Contains("once")) {
|
||||
if (_once.Contains(p.Key)) continue;
|
||||
p.Key.ExecuteDynamic(_group, ctx, p.Value, dl);
|
||||
_once.Add(p.Key);
|
||||
}
|
||||
else {
|
||||
p.Key.ExecuteDynamic(_group, ctx, p.Value, dl);
|
||||
}
|
||||
}
|
||||
ChartPlayer.etor.ContextTransform = null;
|
||||
foreach (var e in rel.elements) {
|
||||
|
Reference in New Issue
Block a user