mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-05 18:34:45 +00:00
Added #1959 Display frame labels along frames and FrameLabel tags
This commit is contained in:
@@ -86,4 +86,10 @@ public class FrameLabelTag extends Tag {
|
||||
public boolean isNamedAnchor() {
|
||||
return namedAnchor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName() + (name.isEmpty() ? "" : " (" + name + ")");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.jpexs.decompiler.flash.timeline;
|
||||
|
||||
import com.jpexs.decompiler.flash.tags.DoActionTag;
|
||||
import com.jpexs.decompiler.flash.tags.FrameLabelTag;
|
||||
import com.jpexs.decompiler.flash.tags.ShowFrameTag;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ASMSourceContainer;
|
||||
@@ -93,7 +94,17 @@ public class Frame implements TreeItem, Exportable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "frame " + (frame + 1);
|
||||
String name = "frame " + (frame + 1);
|
||||
List<String> labels = new ArrayList<>();
|
||||
for (Tag t : innerTags) {
|
||||
if (t instanceof FrameLabelTag) {
|
||||
labels.add(((FrameLabelTag)t).name);
|
||||
}
|
||||
}
|
||||
if (!labels.isEmpty()) {
|
||||
name += " (" + String.join(", ", labels) + ")";
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user