Refactor OpenedAnchorName in ISkinnableGroup.

This commit is contained in:
2023-03-01 00:33:01 +08:00
parent 1a30149942
commit 67720fd0e1
3 changed files with 3 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ namespace Cryville.Crtr {
public string TypeName { get { throw new InvalidOperationException("Type name undefined"); } }
public SkinContext SkinContext { get; private set; }
public Anchor OpenedAnchor { get { throw new InvalidOperationException("Anchor not supported"); } }
public int OpenedAnchorName { get { throw new InvalidOperationException("Anchor not supported"); } }
public void PushAnchorEvent(double time, int name) {
throw new InvalidOperationException("Anchor not supported");
}

View File

@@ -187,7 +187,7 @@ namespace Cryville.Crtr {
public interface ISkinnableGroup {
string TypeName { get; }
SkinContext SkinContext { get; }
Anchor OpenedAnchor { get; }
int OpenedAnchorName { get; }
bool TryGetAnchorsByName(int name, out IReadOnlyCollection<Anchor> result);
void RegisterAnchor(int name);
void PushAnchorEvent(double time, int name);

View File

@@ -101,7 +101,7 @@ namespace Cryville.Crtr {
public override string ToString() { return string.Format("..{0}", IdentifierManager.SharedInstance.Retrieve(Name)); }
public override SkinContext MatchDynamic(ISkinnableGroup g, SkinContext c) {
return g.OpenedAnchor != null && g.OpenedAnchor.Name == Name ? c : null;
return g.OpenedAnchorName == Name ? c : null;
}
public override bool IsUpdatable(ISkinnableGroup g, int dl) {
return dl >= 1;