mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-08 05:45:04 +00:00
Clone tags and frames
This commit is contained in:
@@ -3190,13 +3190,19 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
updateCharacters();
|
||||
}
|
||||
}
|
||||
|
||||
public int indexOfTag(Tag tag) {
|
||||
return tags.indexOf(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a tag to the SWF If targetTreeItem is: - Frame: adds the tag to the
|
||||
* Adds a tag to the SWF If targetTreeItem is:
|
||||
* - Frame: adds the tag to the
|
||||
* Frame. Frame can be a frame of the main timeline or a DefineSprite frame
|
||||
* - DefineSprite: adds the tag to the end of the DefineSprite's tag list -
|
||||
* Any other tag in the SWF: adds the new tag exactly before the specified
|
||||
* tag - Other: adds the tag to the end of the SWF's tag list
|
||||
* - DefineSprite: adds the tag to the end of the DefineSprite's tag list
|
||||
* - Any other tag in the SWF: adds the new tag exactly before the specified
|
||||
* tag
|
||||
* - Other: adds the tag to the end of the SWF's tag list
|
||||
*
|
||||
* @param tag
|
||||
* @param targetTreeItem
|
||||
|
||||
@@ -327,6 +327,11 @@ public class DefineSpriteTag extends DrawableTag implements Timelined {
|
||||
subTags.add(index, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int indexOfTag(Tag tag) {
|
||||
return subTags.indexOf(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createOriginalData() {
|
||||
super.createOriginalData();
|
||||
|
||||
@@ -172,6 +172,11 @@ public abstract class ButtonTag extends DrawableTag implements Timelined {
|
||||
@Override
|
||||
public void addTag(int index, Tag tag) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int indexOfTag(Tag tag) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replaceTag(int index, Tag newTag) {
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.timeline;
|
||||
|
||||
import com.jpexs.decompiler.flash.ReadOnlyTagList;
|
||||
@@ -42,4 +43,6 @@ public interface Timelined extends BoundedTag {
|
||||
public void addTag(int index, Tag tag);
|
||||
|
||||
public void replaceTag(int index, Tag newTag);
|
||||
|
||||
public int indexOfTag(Tag tag);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user