mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 01:51:19 +00:00
#868 export path fix, allow to export buttons
This commit is contained in:
@@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.gui;
|
||||
import com.jpexs.decompiler.flash.abc.ScriptPack;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.BinaryDataExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.ButtonExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.FontExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.FramesExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.ImageExportMode;
|
||||
@@ -33,6 +34,7 @@ import com.jpexs.decompiler.flash.gui.tagtree.TagTreeModel;
|
||||
import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag;
|
||||
import com.jpexs.decompiler.flash.tags.DefineVideoStreamTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ASMSource;
|
||||
import com.jpexs.decompiler.flash.tags.base.ButtonTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.FontTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ImageTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.MorphShapeTag;
|
||||
@@ -76,6 +78,7 @@ public class ExportDialog extends AppDialog {
|
||||
TagTreeModel.FOLDER_SCRIPTS,
|
||||
TagTreeModel.FOLDER_BINARY_DATA,
|
||||
TagTreeModel.FOLDER_FRAMES,
|
||||
TagTreeModel.FOLDER_BUTTONS,
|
||||
TagTreeModel.FOLDER_FONTS,
|
||||
TagTreeModel.FOLDER_MORPHSHAPES,
|
||||
"symbolclass"
|
||||
@@ -91,6 +94,7 @@ public class ExportDialog extends AppDialog {
|
||||
{ASMSource.class, ScriptPack.class},
|
||||
{DefineBinaryDataTag.class},
|
||||
{Frame.class},
|
||||
{ButtonTag.class},
|
||||
{FontTag.class},
|
||||
{MorphShapeTag.class},
|
||||
{SymbolClassTypeTag.class}
|
||||
@@ -106,6 +110,7 @@ public class ExportDialog extends AppDialog {
|
||||
ScriptExportMode.class,
|
||||
BinaryDataExportMode.class,
|
||||
FramesExportMode.class,
|
||||
ButtonExportMode.class,
|
||||
FontExportMode.class,
|
||||
MorphShapeExportMode.class,
|
||||
SymbolClassExportMode.class
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.jpexs.decompiler.flash.exporters.SoundExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.SymbolClassExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.TextExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.BinaryDataExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.ButtonExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.FontExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.FramesExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.ImageExportMode;
|
||||
@@ -51,6 +52,7 @@ import com.jpexs.decompiler.flash.exporters.modes.SoundExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.TextExportMode;
|
||||
import com.jpexs.decompiler.flash.exporters.script.AS2ScriptExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.BinaryDataExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.ButtonExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.FontExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.FramesExportSettings;
|
||||
import com.jpexs.decompiler.flash.exporters.settings.ImageExportSettings;
|
||||
@@ -995,6 +997,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
List<Tag> images = new ArrayList<>();
|
||||
List<Tag> shapes = new ArrayList<>();
|
||||
List<Tag> morphshapes = new ArrayList<>();
|
||||
List<Tag> buttons = new ArrayList<>();
|
||||
List<Tag> movies = new ArrayList<>();
|
||||
List<Tag> sounds = new ArrayList<>();
|
||||
List<Tag> texts = new ArrayList<>();
|
||||
@@ -1030,6 +1033,9 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
if (nodeType == TreeNodeType.SHAPE) {
|
||||
shapes.add((Tag) d);
|
||||
}
|
||||
if (nodeType == TreeNodeType.BUTTON) {
|
||||
buttons.add((Tag) d);
|
||||
}
|
||||
if (nodeType == TreeNodeType.MORPH_SHAPE) {
|
||||
morphshapes.add((Tag) d);
|
||||
}
|
||||
@@ -1111,6 +1117,15 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
ret.addAll(frameExporter.exportFrames(handler, selFile + File.separator + subFolder, swf, containerId, entry.getValue(), fes, evl));
|
||||
}
|
||||
|
||||
ButtonExportSettings bes = new ButtonExportSettings(export.getValue(ButtonExportMode.class), export.getZoom());
|
||||
for (Tag tag : buttons) {
|
||||
ButtonTag button = (ButtonTag) tag;
|
||||
String subFolder = "buttons";
|
||||
List<Integer> frameNums = new ArrayList<>();
|
||||
frameNums.add(0); // todo: export all frames
|
||||
ret.addAll(frameExporter.exportFrames(handler, selFile + File.separator + subFolder, swf, button.getCharacterId(), frameNums, bes, evl));
|
||||
}
|
||||
|
||||
boolean parallel = Configuration.parallelSpeedUp.get();
|
||||
String scriptsFolder = Path.combine(selFile, "scripts");
|
||||
Path.createDirectorySafe(new File(scriptsFolder));
|
||||
|
||||
@@ -66,6 +66,11 @@ frames.canvas = HTML5 Canvas
|
||||
frames.pdf = PDF
|
||||
frames.bmp = BMP
|
||||
|
||||
buttons = Buttons
|
||||
buttons.png = PNG
|
||||
buttons.svg = SVG
|
||||
buttons.bmp = BMP
|
||||
|
||||
fonts = Fonts
|
||||
fonts.ttf = TTF
|
||||
fonts.woff = WOFF
|
||||
|
||||
@@ -66,6 +66,11 @@ frames.canvas = HTML5 V\u00e1szon
|
||||
frames.pdf = PDF
|
||||
frames.bmp = BMP
|
||||
|
||||
buttons = Gombok
|
||||
buttons.png = PNG
|
||||
buttons.svg = SVG
|
||||
buttons.bmp = BMP
|
||||
|
||||
fonts = Bet\u0171t\u00edpusok
|
||||
fonts.ttf = TTF
|
||||
fonts.woff = WOFF
|
||||
|
||||
@@ -535,6 +535,9 @@ public class TagTree extends JTree {
|
||||
if (nodeType == TreeNodeType.MORPH_SHAPE) {
|
||||
ret.add(d);
|
||||
}
|
||||
if (nodeType == TreeNodeType.BUTTON) {
|
||||
ret.add(d);
|
||||
}
|
||||
if (nodeType == TreeNodeType.AS) {
|
||||
ret.add(d);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user