Integrate Easy GUI into main program as Timeline mode

This commit is contained in:
Jindra Petřík
2024-10-29 16:55:43 +01:00
parent 68e4b4d029
commit cc7efe1a81
10 changed files with 157 additions and 164 deletions
@@ -3056,7 +3056,11 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
}
}
RGB backgroundColor = timeline.getFrame(frame).backgroundColor;
Frame fr = timeline.getFrame(frame);
if (fr == null) {
return image;
}
RGB backgroundColor = fr.backgroundColor;
if (backgroundColor != null) {
Graphics2D g = (Graphics2D) image.getBufferedImage().getGraphics();
g.setPaint(backgroundColor.toColor());
@@ -3070,8 +3074,8 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
gg.setPaint(Color.green);
gg.setTransform(AffineTransform.getTranslateInstance(0, 0));
DepthState ds = null;
if (selectedDepth > -1 && timeline.getFrameCount() > frame) {
ds = timeline.getFrame(frame).layers.get(selectedDepth);
if (selectedDepth > -1 && timeline.getFrameCount() > frame && fr != null) {
ds = fr.layers.get(selectedDepth);
}
if (ds != null && freeTransformDepth == -1) {
+1 -6
View File
@@ -44,7 +44,6 @@ import com.jpexs.decompiler.flash.configuration.SwfSpecificConfiguration;
import com.jpexs.decompiler.flash.configuration.SwfSpecificCustomConfiguration;
import com.jpexs.decompiler.flash.console.CommandLineArgumentParser;
import com.jpexs.decompiler.flash.console.ContextMenuTools;
import com.jpexs.decompiler.flash.easygui.EasyGuiMain;
import com.jpexs.decompiler.flash.exporters.modes.ExeExportMode;
import com.jpexs.decompiler.flash.gfx.GfxConvertor;
import com.jpexs.decompiler.flash.gui.debugger.DebugAdapter;
@@ -2918,11 +2917,7 @@ public class Main {
* @throws IOException On error
*/
public static void main(String[] args) throws IOException {
decodeLaunch5jArgs(args);
if (args.length > 0 && args[0].equals("-easy")) {
EasyGuiMain.main(args);
return;
}
decodeLaunch5jArgs(args);
setSessionLoaded(false);
@@ -45,6 +45,7 @@ import com.jpexs.decompiler.flash.configuration.CustomConfigurationKeys;
import com.jpexs.decompiler.flash.configuration.SwfSpecificCustomConfiguration;
import com.jpexs.decompiler.flash.dumpview.DumpInfo;
import com.jpexs.decompiler.flash.dumpview.DumpInfoSwfNode;
import com.jpexs.decompiler.flash.easygui.EasyPanel;
import com.jpexs.decompiler.flash.exporters.BinaryDataExporter;
import com.jpexs.decompiler.flash.exporters.Font4Exporter;
import com.jpexs.decompiler.flash.exporters.FontExporter;
@@ -321,7 +322,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
private final JPanel welcomePanel;
private final TimelineViewPanel timelineViewPanel;
private final EasyPanel easyPanel;
private final MainFrameStatusPanel statusPanel;
@@ -1300,12 +1301,12 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
welcomePanel = createWelcomePanel();
add(welcomePanel, BorderLayout.CENTER);
timelineViewPanel = new TimelineViewPanel();
easyPanel = new EasyPanel();
contentPanel = new JPanel(new CardLayout());
contentPanel.add(welcomePanel, WELCOME_PANEL);
contentPanel.add(splitPane1, SPLIT_PANE1);
contentPanel.add(timelineViewPanel, TIMELINE_PANEL);
contentPanel.add(easyPanel, TIMELINE_PANEL);
add(contentPanel);
showContentPanelCard(WELCOME_PANEL);
@@ -5701,11 +5702,11 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
item = ((TagScript) item).getTag();
}
if (item instanceof Timelined) {
timelineViewPanel.setTimelined((Timelined) item);
easyPanel.setTimelined((Timelined) item);
} else if (item instanceof Frame) {
timelineViewPanel.setTimelined(((Frame) item).timeline.timelined);
easyPanel.setTimelined(((Frame) item).timeline.timelined);
} else {
timelineViewPanel.setTimelined(swf);
easyPanel.setTimelined(swf);
}
showContentPanelCard(TIMELINE_PANEL);
return true;
@@ -0,0 +1,49 @@
# Copyright (C) 2024 JPEXS
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
library = Library
library.folder.images = images
library.folder.graphics = graphics
library.folder.shapeTweens = shapeTweens
library.folder.texts = texts
library.folder.fonts = fonts
library.folder.movieClips = movieClips
library.folder.buttons = buttons
library.folder.sounds = sounds
library.folder.videos = videos
library.header.name = Name
library.header.asLinkage = AS Linkage
item.image = image
item.graphic = graphic
item.shapeTween = shapeTween
item.text = text
item.font = font
item.movieClip = movieClip
item.button = button
item.sound = sound
item.video = video
item.uknown = unknown
undo = Undo %action%
undo.cannot = Cannot undo
redo = Redo %action%
redo.cannot = Cannot redo
transform = Transform