mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 08:10:45 +00:00
Added: Simple editor - edit parameters of items inside buttons
This commit is contained in:
@@ -49,6 +49,7 @@ import com.jpexs.decompiler.flash.timeline.DepthState;
|
||||
import com.jpexs.decompiler.flash.timeline.Frame;
|
||||
import com.jpexs.decompiler.flash.timeline.Timelined;
|
||||
import com.jpexs.decompiler.flash.treeitems.Openable;
|
||||
import com.jpexs.decompiler.flash.types.BUTTONRECORD;
|
||||
import com.jpexs.decompiler.flash.types.MATRIX;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.CardLayout;
|
||||
@@ -187,13 +188,19 @@ public class EasySwfPanel extends JPanel {
|
||||
for (int i = 0; i < depths.size(); i++) {
|
||||
int depth = depths.get(i);
|
||||
DepthState ds = stagePanel.getTimelined().getTimeline().getFrame(frame).layers.get(depth);
|
||||
wasModified.add(ds.placeObjectTag.isModified());
|
||||
wasModified.add(ds.placeObjectTag == null ? false : ds.placeObjectTag.isModified());
|
||||
|
||||
Matrix contMat = newMatrix.concatenate(new Matrix(fpreviousMatrices.get(i)));
|
||||
|
||||
ds.placeObjectTag.setMatrix(contMat.toMATRIX());
|
||||
ds.placeObjectTag.setPlaceFlagHasMatrix(newMatrix != null);
|
||||
ds.placeObjectTag.setModified(true);
|
||||
if (timelined instanceof ButtonTag) {
|
||||
ButtonTag button = (ButtonTag) timelined;
|
||||
BUTTONRECORD rec = button.getButtonRecordAt(frame, depth, true);
|
||||
rec.placeMatrix = contMat.toMATRIX();
|
||||
} else {
|
||||
ds.placeObjectTag.setMatrix(contMat.toMATRIX());
|
||||
ds.placeObjectTag.setPlaceFlagHasMatrix(newMatrix != null);
|
||||
ds.placeObjectTag.setModified(true);
|
||||
}
|
||||
}
|
||||
timelined.resetTimeline();
|
||||
stagePanel.repaint();
|
||||
@@ -216,10 +223,16 @@ public class EasySwfPanel extends JPanel {
|
||||
for (int i = 0; i < depths.size(); i++) {
|
||||
int depth = depths.get(i);
|
||||
DepthState ds = stagePanel.getTimelined().getTimeline().getFrame(frame).layers.get(depth);
|
||||
ds.placeObjectTag.setMatrix(fpreviousMatrices.get(i));
|
||||
ds.placeObjectTag.setPlaceFlagHasMatrix(fpreviousMatrices != null);
|
||||
if (!wasModified.get(i)) {
|
||||
ds.placeObjectTag.setModified(false);
|
||||
if (timelined instanceof ButtonTag) {
|
||||
ButtonTag button = (ButtonTag) timelined;
|
||||
BUTTONRECORD rec = button.getButtonRecordAt(frame, depth, true);
|
||||
rec.placeMatrix = fpreviousMatrices.get(i);
|
||||
} else {
|
||||
ds.placeObjectTag.setMatrix(fpreviousMatrices.get(i));
|
||||
ds.placeObjectTag.setPlaceFlagHasMatrix(fpreviousMatrices != null);
|
||||
if (ds.placeObjectTag != null && !wasModified.get(i)) {
|
||||
ds.placeObjectTag.setModified(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
stagePanel.getTimelined().resetTimeline();
|
||||
@@ -675,7 +688,11 @@ public class EasySwfPanel extends JPanel {
|
||||
if (ds == null) {
|
||||
ret.add(null);
|
||||
} else {
|
||||
ret.add(ds.placeObjectTag);
|
||||
if (ds.placeObjectTag == null) {
|
||||
ret.add(ds.toPlaceObjectTag(ds.depth));
|
||||
} else {
|
||||
ret.add(ds.placeObjectTag);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user