mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-21 19:06:03 +00:00
Added #1231 Button transforming
Fixed BUTTONRECORD display does not use its Matrix Fixed Editation status not cleared after Sprite transforming
This commit is contained in:
@@ -18,6 +18,9 @@ package com.jpexs.decompiler.flash.types;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.tags.DefineButton2Tag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineButtonCxformTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineButtonTag;
|
||||
import com.jpexs.decompiler.flash.tags.PlaceObject3Tag;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ButtonTag;
|
||||
import com.jpexs.decompiler.flash.treeitems.Openable;
|
||||
@@ -189,4 +192,38 @@ public class BUTTONRECORD implements Serializable, TreeItem, HasSwfAndTag, HasCh
|
||||
public void setCharacterId(int characterId) {
|
||||
this.characterId = characterId;
|
||||
}
|
||||
|
||||
public PlaceObject3Tag toPlaceObject() {
|
||||
PlaceObject3Tag placeTag = new PlaceObject3Tag(swf);
|
||||
placeTag.depth = placeDepth;
|
||||
placeTag.characterId = characterId;
|
||||
placeTag.placeFlagHasCharacter = true;
|
||||
if (colorTransform != null) {
|
||||
placeTag.colorTransform = colorTransform;
|
||||
placeTag.placeFlagHasColorTransform = true;
|
||||
}
|
||||
|
||||
ButtonTag buttonTag = getTag();
|
||||
if (buttonTag instanceof DefineButtonTag) {
|
||||
DefineButtonTag button1Tag = (DefineButtonTag) buttonTag;
|
||||
DefineButtonCxformTag cxformTag = (DefineButtonCxformTag) button1Tag.getSwf().getCharacterIdTag(button1Tag.getCharacterId(), DefineButtonCxformTag.ID);
|
||||
if (cxformTag != null) {
|
||||
placeTag.colorTransform = new CXFORMWITHALPHA(cxformTag.buttonColorTransform);
|
||||
placeTag.placeFlagHasColorTransform = true;
|
||||
}
|
||||
}
|
||||
|
||||
placeTag.matrix = new MATRIX(placeMatrix);
|
||||
placeTag.placeFlagHasMatrix = true;
|
||||
|
||||
if (buttonHasBlendMode) {
|
||||
placeTag.blendMode = blendMode;
|
||||
placeTag.placeFlagHasBlendMode = true;
|
||||
}
|
||||
if (buttonHasFilterList) {
|
||||
placeTag.surfaceFilterList = filterList;
|
||||
placeTag.placeFlagHasFilterList = true;
|
||||
}
|
||||
return placeTag;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user