mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-28 02:20:51 +00:00
Added Removing BUTTONRECORDs
Added Jump to character on BUTTTONRECORDs
This commit is contained in:
@@ -370,6 +370,9 @@ public class DefineEditTextTag extends TextTag {
|
||||
}
|
||||
|
||||
private List<CharacterWithStyle> getTextWithStyle() {
|
||||
if (swf == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
String str = "";
|
||||
TextStyle style = new TextStyle();
|
||||
if (fontClass != null) {
|
||||
@@ -1029,7 +1032,7 @@ public class DefineEditTextTag extends TextTag {
|
||||
}
|
||||
}
|
||||
|
||||
public List<TEXTRECORD> getTextRecords() {
|
||||
public List<TEXTRECORD> getTextRecords() {
|
||||
DynamicTextModel textModel = new DynamicTextModel();
|
||||
List<CharacterWithStyle> txt = getTextWithStyle();
|
||||
TextStyle lastStyle = null;
|
||||
|
||||
@@ -202,5 +202,13 @@ public abstract class ButtonTag extends DrawableTag implements Timelined {
|
||||
for(BUTTONRECORD record:getRecords()) {
|
||||
record.setSwfAndTag(swf, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setModified(boolean value) {
|
||||
super.setModified(value);
|
||||
for(BUTTONRECORD record:getRecords()) {
|
||||
record.setModified(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags.base;
|
||||
|
||||
import com.jpexs.decompiler.flash.types.HasCharacterId;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public interface CharacterIdTag {
|
||||
public interface CharacterIdTag extends HasCharacterId {
|
||||
|
||||
public int getCharacterId();
|
||||
|
||||
public void setCharacterId(int characterId);
|
||||
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.List;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class BUTTONRECORD implements Serializable, TreeItem, HasSwfAndTag {
|
||||
public class BUTTONRECORD implements Serializable, TreeItem, HasSwfAndTag, HasCharacterId {
|
||||
|
||||
@Reserved
|
||||
@SWFType(value = BasicType.UB, count = 2)
|
||||
@@ -114,6 +114,9 @@ public class BUTTONRECORD implements Serializable, TreeItem, HasSwfAndTag {
|
||||
|
||||
@Internal
|
||||
private ButtonTag tag;
|
||||
|
||||
@Internal
|
||||
private boolean modified;
|
||||
|
||||
public BUTTONRECORD(SWF swf, ButtonTag tag) {
|
||||
this.swf = swf;
|
||||
@@ -135,18 +138,13 @@ public class BUTTONRECORD implements Serializable, TreeItem, HasSwfAndTag {
|
||||
return swf;
|
||||
}
|
||||
|
||||
public void setModified() {
|
||||
if (tag != null) {
|
||||
tag.setModified(true);
|
||||
}
|
||||
public void setModified(boolean value) {
|
||||
modified = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
if (tag != null) {
|
||||
return tag.isModified();
|
||||
}
|
||||
return false;
|
||||
return modified;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -159,4 +157,14 @@ public class BUTTONRECORD implements Serializable, TreeItem, HasSwfAndTag {
|
||||
this.swf = swf;
|
||||
this.tag = (ButtonTag) tag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCharacterId() {
|
||||
return characterId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharacterId(int characterId) {
|
||||
this.characterId = characterId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.jpexs.decompiler.flash.types;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public interface HasCharacterId {
|
||||
public int getCharacterId();
|
||||
|
||||
public void setCharacterId(int characterId);
|
||||
}
|
||||
Reference in New Issue
Block a user