Import scripts into ABC file

This commit is contained in:
Jindra Petřík
2022-11-20 13:34:07 +01:00
parent ce8165567b
commit bfbb9733eb
4 changed files with 38 additions and 12 deletions

View File

@@ -238,7 +238,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
return;
}
if (Main.isSwfAir(abc.getSwf())) {
if (Main.isSwfAir(abc.getOpenable())) {
libraryComboBox.setSelectedIndex(Main.LIBRARY_AIR);
} else {
libraryComboBox.setSelectedIndex(Main.LIBRARY_FLASH);
@@ -285,6 +285,10 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
public SWF getSwf() {
return abc == null ? null : abc.getSwf();
}
public Openable getOpenable() {
return abc == null ? null : abc.getOpenable();
}
public List<ABCContainerTag> getAbcList() {
SWF swf = getSwf();
@@ -1480,7 +1484,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
}
private void editDecompiledButtonActionPerformed(ActionEvent evt) {
scriptReplacer = mainPanel.getAs3ScriptReplacer(Main.isSwfAir(getSwf()));
scriptReplacer = mainPanel.getAs3ScriptReplacer(Main.isSwfAir(getOpenable()));
if (scriptReplacer == null) {
return;
}