mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-04 01:56:11 +00:00
Added: Simple editor - ratio (shapetweens, video)
This commit is contained in:
@@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Simple editor - change background color
|
||||
- Simple editor - filters
|
||||
- Simple editor - convolution filter presets
|
||||
- Simple editor - ratio (shapetweens, video)
|
||||
|
||||
### Fixed
|
||||
- [#2424] DefineEditText handling of letterSpacing, font size on incorrect values
|
||||
|
||||
@@ -495,4 +495,15 @@ public class PlaceObject2Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
this.colorTransform = new CXFORMWITHALPHA(colorTransform);
|
||||
placeFlagHasColorTransform = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaceFlagHasRatio(boolean placeFlagHasRatio) {
|
||||
this.placeFlagHasRatio = placeFlagHasRatio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRatio(int ratio) {
|
||||
this.ratio = ratio;
|
||||
placeFlagHasRatio = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -698,18 +698,18 @@ public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
public boolean hasImage() {
|
||||
return placeFlagHasImage;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setColorTransform(ColorTransform colorTransform) {
|
||||
this.colorTransform = new CXFORMWITHALPHA(colorTransform);
|
||||
placeFlagHasColorTransform = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisible(int value) {
|
||||
this.visible = value;
|
||||
placeFlagHasVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaceFlagHasVisible(boolean value) {
|
||||
@@ -725,7 +725,7 @@ public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
@Override
|
||||
public void setPlaceFlagHasBlendMode(boolean value) {
|
||||
this.placeFlagHasBlendMode = value;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBitmapCache(int value) {
|
||||
@@ -736,7 +736,7 @@ public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
@Override
|
||||
public void setPlaceFlagHasCacheAsBitmap(boolean value) {
|
||||
this.placeFlagHasCacheAsBitmap = value;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBackgroundColor(RGBA value) {
|
||||
@@ -744,10 +744,10 @@ public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
this.placeFlagOpaqueBackground = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void setPlaceFlagOpaqueBackground(boolean value) {
|
||||
this.placeFlagOpaqueBackground = value;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaceFlagHasFilterList(boolean placeFlagHasFilterList) {
|
||||
@@ -758,5 +758,16 @@ public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
public void setFilters(List<FILTER> filters) {
|
||||
this.surfaceFilterList = new ArrayList<>(filters);
|
||||
this.placeFlagHasFilterList = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaceFlagHasRatio(boolean placeFlagHasRatio) {
|
||||
this.placeFlagHasRatio = placeFlagHasRatio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRatio(int ratio) {
|
||||
this.ratio = ratio;
|
||||
placeFlagHasRatio = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -780,4 +780,15 @@ public class PlaceObject4Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
this.surfaceFilterList = new ArrayList<>(filters);
|
||||
this.placeFlagHasFilterList = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlaceFlagHasRatio(boolean placeFlagHasRatio) {
|
||||
this.placeFlagHasRatio = placeFlagHasRatio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRatio(int ratio) {
|
||||
this.ratio = ratio;
|
||||
placeFlagHasRatio = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,6 +255,14 @@ public abstract class PlaceObjectTypeTag extends Tag implements CharacterIdTag,
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public void setPlaceFlagHasRatio(boolean placeFlagHasRatio) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public void setRatio(int ratio) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if place equals.
|
||||
* @param other Other place object type tag
|
||||
|
||||
@@ -106,6 +106,9 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel {
|
||||
private final IntegerPropertyField greenAddPropertyField = new IntegerPropertyField(0, -255, 255);
|
||||
private final IntegerPropertyField blueAddPropertyField = new IntegerPropertyField(0, -255, 255);
|
||||
private final EasySwfPanel swfPanel;
|
||||
|
||||
private final IntegerPropertyField ratioPropertyField = new IntegerPropertyField(-1, -1, 65535);
|
||||
|
||||
|
||||
private final JPanel propertiesPanel;
|
||||
|
||||
@@ -250,8 +253,9 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel {
|
||||
gbc.insets = new Insets(3, 3, 3, 3);
|
||||
|
||||
gbc.gridx = 0;
|
||||
gbc.gridy = 0;
|
||||
gbc.gridy = 0;
|
||||
gbc.gridwidth = 1;
|
||||
|
||||
gbc.anchor = GridBagConstraints.EAST;
|
||||
displayPanel.add(new JLabel(formatPropertyName("display.visible")), gbc);
|
||||
|
||||
@@ -260,6 +264,18 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel {
|
||||
gbc.anchor = GridBagConstraints.WEST;
|
||||
|
||||
displayPanel.add(visibleCheckBox, gbc);
|
||||
|
||||
gbc.gridx = 0;
|
||||
gbc.gridy++;
|
||||
gbc.gridwidth = 1;
|
||||
gbc.anchor = GridBagConstraints.EAST;
|
||||
displayPanel.add(new JLabel(formatPropertyName("display.ratio")), gbc);
|
||||
|
||||
gbc.gridx++;
|
||||
gbc.gridwidth = 2;
|
||||
gbc.anchor = GridBagConstraints.WEST;
|
||||
|
||||
displayPanel.add(ratioPropertyField, gbc);
|
||||
|
||||
gbc.gridy++;
|
||||
gbc.gridx = 0;
|
||||
@@ -727,6 +743,23 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel {
|
||||
}
|
||||
});
|
||||
hPropertyField.addValidation(nonZeroFloatValidation);
|
||||
|
||||
ratioPropertyField.addChangeListener(new ChangeListener() {
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
undoManager.doOperation(new PlaceChangeDoableOperation("instance.display.ratio", 2) {
|
||||
Integer ratio = ratioPropertyField.getValue();
|
||||
@Override
|
||||
public void doPlaceOperation(PlaceObjectTypeTag placeObject, DepthState depthState) {
|
||||
if (ratio == null) {
|
||||
placeObject.setPlaceFlagHasRatio(false);
|
||||
} else {
|
||||
placeObject.setRatio(ratio);
|
||||
}
|
||||
}
|
||||
}, swfPanel.getSwf());
|
||||
}
|
||||
});
|
||||
|
||||
visibleCheckBox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
@@ -887,6 +920,8 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel {
|
||||
Set<Boolean> cacheAsBitmap = new HashSet<>();
|
||||
Set<RGBA> backgroundColor = new HashSet<>();
|
||||
Set<List<FILTER>> filters = new HashSet<>();
|
||||
Set<Integer> ratio = new HashSet<>();
|
||||
|
||||
|
||||
for (DepthState ds : dss) {
|
||||
if (ds == null) {
|
||||
@@ -921,6 +956,7 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel {
|
||||
cacheAsBitmap.add(ds.cacheAsBitmap);
|
||||
backgroundColor.add(ds.backGroundColor);
|
||||
filters.add(ds.filters);
|
||||
ratio.add(ds.ratio == -1 ? 0 : ds.ratio);
|
||||
}
|
||||
|
||||
if (visible.size() == 0) {
|
||||
@@ -936,6 +972,8 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel {
|
||||
bluePercentPropertyField.setValue(bluePercent, true);
|
||||
blueAddPropertyField.setValue(blueAdd, true);
|
||||
|
||||
ratioPropertyField.setValue(ratio, true);
|
||||
|
||||
if (visible.size() > 1) {
|
||||
visibleCheckBox.setSelectionState(1);
|
||||
} else {
|
||||
|
||||
@@ -190,4 +190,6 @@ property.instance.filters.matrix = matrix
|
||||
property.instance.filters.glowColor = glow color
|
||||
property.instance.filters.innerGlow = inner glow
|
||||
|
||||
property.instance.filters.menu.enable = Enable or disable filter
|
||||
property.instance.filters.menu.enable = Enable or disable filter
|
||||
|
||||
property.instance.display.ratio = Ratio
|
||||
@@ -188,4 +188,6 @@ property.instance.filters.defaultColor = v\u00fdchoz\u00ed barva
|
||||
property.instance.filters.preserveAlpha = zachovat alfu
|
||||
property.instance.filters.matrix = matice
|
||||
property.instance.filters.glowColor = barva z\u00e1\u0159e
|
||||
property.instance.filters.innerGlow = vnit\u0159n\u00ed z\u00e1\u0159e
|
||||
property.instance.filters.innerGlow = vnit\u0159n\u00ed z\u00e1\u0159e
|
||||
|
||||
property.instance.display.ratio = Pom\u011br interpolace
|
||||
Reference in New Issue
Block a user