Replace PureMVC with gdx-puremvc
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -104,6 +104,8 @@ dependencies {
|
||||
|
||||
implementation "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
|
||||
|
||||
implementation "games.rednblack.puremvc:core:$pureMvcVersion"
|
||||
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:$lwjgl3Version"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:$lwjgl3Version:natives-linux"
|
||||
implementation "org.lwjgl:lwjgl-tinyfd:$lwjgl3Version:natives-linux-arm32"
|
||||
|
||||
+2
-1
@@ -6,4 +6,5 @@ visuiVersion = 1.5.1
|
||||
typingLabelVersion = 1.3.0
|
||||
shapedrawerVersion = 2.5.0
|
||||
talosVersion = 1.4.0
|
||||
gdxTinyVGVersion=7a8927633e
|
||||
gdxTinyVGVersion=7a8927633e
|
||||
pureMvcVersion=1.0.2
|
||||
+1
-1
Submodule hyperlap2d-common-api updated: 19c2b01f94...ed24c1d7d3
@@ -17,6 +17,8 @@ dependencies {
|
||||
|
||||
implementation 'net.mountainblade:modular:1.0'
|
||||
|
||||
implementation "games.rednblack.puremvc:core:$pureMvcVersion"
|
||||
|
||||
implementation project(":hyperlap2d-common-api")
|
||||
implementation project(":hyperlap2d-runtime-libgdx")
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.kotcrab.vis.ui.widget.VisLabel;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import com.kotcrab.vis.ui.widget.VisTextButton;
|
||||
import games.rednblack.h2d.common.H2DDialog;
|
||||
import org.puremvc.java.interfaces.IFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 8/18/2015.
|
||||
@@ -20,7 +20,7 @@ public class MainPanel extends H2DDialog {
|
||||
|
||||
public static final String SAVE_CLICKED = CLASS_NAME + ".SAVE_CLICKED";
|
||||
|
||||
private IFacade facade;
|
||||
private Facade facade;
|
||||
|
||||
private VisTable mainTable;
|
||||
private TextureRegion texture;
|
||||
@@ -31,7 +31,7 @@ public class MainPanel extends H2DDialog {
|
||||
private EditingZone editingZone;
|
||||
private PreviewWidget previewWidget;
|
||||
|
||||
public MainPanel(IFacade facade) {
|
||||
public MainPanel(Facade facade) {
|
||||
super("Nine Patch", false);
|
||||
addCloseButton();
|
||||
|
||||
|
||||
+6
-8
@@ -4,14 +4,14 @@ import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.graphics.g2d.NinePatch;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import games.rednblack.editor.renderer.components.MainItemComponent;
|
||||
import games.rednblack.editor.renderer.components.NinePatchComponent;
|
||||
import games.rednblack.editor.renderer.components.TextureRegionComponent;
|
||||
import games.rednblack.editor.renderer.factory.EntityFactory;
|
||||
import games.rednblack.editor.renderer.utils.ComponentRetriever;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.mediator.Mediator;
|
||||
import games.rednblack.puremvc.Mediator;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
import games.rednblack.puremvc.util.Interests;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedWriter;
|
||||
@@ -36,12 +36,10 @@ public class MainPanelMediator extends Mediator<MainPanel> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] listNotificationInterests() {
|
||||
return new String[]{
|
||||
NinePatchPlugin.EDIT_NINE_PATCH,
|
||||
public void listNotificationInterests(Interests interests) {
|
||||
interests.add(NinePatchPlugin.EDIT_NINE_PATCH,
|
||||
NinePatchPlugin.CONVERT_TO_NINE_PATCH,
|
||||
MainPanel.SAVE_CLICKED
|
||||
};
|
||||
MainPanel.SAVE_CLICKED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,6 +17,8 @@ dependencies {
|
||||
|
||||
implementation 'net.mountainblade:modular:1.0'
|
||||
|
||||
implementation "games.rednblack.puremvc:core:$pureMvcVersion"
|
||||
|
||||
implementation project(":hyperlap2d-common-api")
|
||||
implementation project(":hyperlap2d-runtime-libgdx")
|
||||
|
||||
|
||||
+6
-7
@@ -1,8 +1,9 @@
|
||||
package games.rednblack.editor.plugin.performance;
|
||||
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.mediator.Mediator;
|
||||
import games.rednblack.puremvc.Mediator;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
import games.rednblack.puremvc.util.Interests;
|
||||
|
||||
public class PerformancePanelMediator extends Mediator<PerformancePanel> {
|
||||
private static final String TAG = PerformancePanelMediator.class.getCanonicalName();
|
||||
@@ -18,12 +19,10 @@ public class PerformancePanelMediator extends Mediator<PerformancePanel> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] listNotificationInterests() {
|
||||
return new String[]{
|
||||
MsgAPI.RENDER,
|
||||
public void listNotificationInterests(Interests interests) {
|
||||
interests.add(MsgAPI.RENDER,
|
||||
MsgAPI.SCENE_LOADED,
|
||||
PerformancePlugin.PANEL_OPEN
|
||||
};
|
||||
PerformancePlugin.PANEL_OPEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,8 @@ dependencies {
|
||||
implementation "com.kotcrab.vis:vis-ui:$visuiVersion"
|
||||
implementation "net.onedaybeard.artemis:artemis-odb:$artemisVersion"
|
||||
|
||||
implementation "games.rednblack.puremvc:core:$pureMvcVersion"
|
||||
|
||||
implementation 'net.mountainblade:modular:1.0'
|
||||
|
||||
implementation project(":hyperlap2d-common-api")
|
||||
|
||||
+6
-7
@@ -5,9 +5,10 @@ import com.kotcrab.vis.ui.util.dialog.Dialogs;
|
||||
import games.rednblack.h2d.common.network.HttpDownloadUtility;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.network.model.GithubReleaseData;
|
||||
import games.rednblack.puremvc.Mediator;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
import games.rednblack.puremvc.util.Interests;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.mediator.Mediator;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -27,11 +28,9 @@ public class SkinComposerMediator extends Mediator<DownloadingDialog> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] listNotificationInterests() {
|
||||
return new String[]{
|
||||
SkinComposerPlugin.PANEL_OPEN,
|
||||
SkinComposerPlugin.DOWNLOAD_JAR
|
||||
};
|
||||
public void listNotificationInterests(Interests interests) {
|
||||
interests.add(SkinComposerPlugin.PANEL_OPEN,
|
||||
SkinComposerPlugin.DOWNLOAD_JAR);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.plugins.H2DPluginAdapter;
|
||||
import games.rednblack.h2d.common.view.SettingsNodeValue;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import org.puremvc.java.interfaces.IFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class SkinComposerSettings extends SettingsNodeValue<SkinComposerVO> {
|
||||
|
||||
@@ -13,7 +13,7 @@ public class SkinComposerSettings extends SettingsNodeValue<SkinComposerVO> {
|
||||
private final H2DPluginAdapter plugin;
|
||||
private boolean loaded = false;
|
||||
|
||||
public SkinComposerSettings(IFacade facade, H2DPluginAdapter plugin) {
|
||||
public SkinComposerSettings(Facade facade, H2DPluginAdapter plugin) {
|
||||
super("Skin Composer", facade);
|
||||
|
||||
this.plugin = plugin;
|
||||
|
||||
@@ -21,6 +21,8 @@ dependencies {
|
||||
|
||||
implementation "com.esotericsoftware.spine:spine-libgdx:$spineVersion"
|
||||
|
||||
implementation "games.rednblack.puremvc:core:$pureMvcVersion"
|
||||
|
||||
implementation 'net.mountainblade:modular:1.0'
|
||||
|
||||
implementation project(":hyperlap2d-common-api")
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
package games.rednblack.editor.plugin.tiled;
|
||||
|
||||
import org.puremvc.java.interfaces.IFacade;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
||||
import com.kotcrab.vis.ui.widget.VisLabel;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
@@ -35,6 +33,7 @@ import games.rednblack.h2d.common.UIDraggablePanel;
|
||||
import games.rednblack.h2d.common.view.ui.widget.imagetabbedpane.ImageTab;
|
||||
import games.rednblack.h2d.common.view.ui.widget.imagetabbedpane.ImageTabbedPane;
|
||||
import games.rednblack.h2d.common.view.ui.widget.imagetabbedpane.ImageTabbedPaneListener;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by mariam on 2/2/2016.
|
||||
@@ -49,7 +48,7 @@ public class TiledPanel extends UIDraggablePanel {
|
||||
public static final float SETTINGS_HEIGHT = 150f;
|
||||
|
||||
public TiledPlugin tiledPlugin;
|
||||
private IFacade facade;
|
||||
private Facade facade;
|
||||
|
||||
protected ImageTabbedPane tabbedPane;
|
||||
protected VisTable tabTable; //table inside of each tab
|
||||
@@ -249,7 +248,7 @@ public class TiledPanel extends UIDraggablePanel {
|
||||
this.engine = engine;
|
||||
}
|
||||
|
||||
public IFacade getFacade() {
|
||||
public Facade getFacade() {
|
||||
return facade;
|
||||
}
|
||||
}
|
||||
|
||||
+14
-15
@@ -24,8 +24,6 @@ import java.util.Iterator;
|
||||
|
||||
import games.rednblack.editor.renderer.data.TexturePackVO;
|
||||
import games.rednblack.h2d.extension.spine.SpineItemType;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.mediator.Mediator;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input;
|
||||
@@ -53,6 +51,9 @@ import games.rednblack.editor.renderer.factory.EntityFactory;
|
||||
import games.rednblack.editor.renderer.utils.ComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.ResourcePayloadObject;
|
||||
import games.rednblack.puremvc.Mediator;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
import games.rednblack.puremvc.util.Interests;
|
||||
|
||||
/**
|
||||
* Created by mariam on 2/2/2016.
|
||||
@@ -77,29 +78,27 @@ public class TiledPanelMediator extends Mediator<TiledPanel> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] listNotificationInterests() {
|
||||
return new String[]{
|
||||
MsgAPI.SCENE_LOADED,
|
||||
public void listNotificationInterests(Interests interests) {
|
||||
interests.add(MsgAPI.SCENE_LOADED,
|
||||
TiledPlugin.TILE_ADDED,
|
||||
TiledPlugin.TILE_SELECTED,
|
||||
TiledPlugin.ACTION_DELETE_TILE,
|
||||
TiledPlugin.ACTION_DELETE_TILE_ALL,
|
||||
TiledPlugin.ACTION_DELETE_TILE);
|
||||
interests.add(TiledPlugin.ACTION_DELETE_TILE_ALL,
|
||||
TiledPlugin.ACTION_SET_GRID_SIZE_FROM_LIST,
|
||||
TiledPlugin.ACTION_SET_OFFSET,
|
||||
TiledPlugin.OPEN_DROP_DOWN,
|
||||
TiledPlugin.AUTO_TILE_SELECTED,
|
||||
TiledPlugin.OPEN_DROP_DOWN);
|
||||
interests.add(TiledPlugin.AUTO_TILE_SELECTED,
|
||||
TiledPlugin.ACTION_DELETE_AUTO_TILE,
|
||||
TiledPlugin.AUTO_OPEN_DROP_DOWN,
|
||||
TiledPlugin.AUTO_FILL_TILES,
|
||||
TiledPlugin.ACTION_SETUP_ALTERNATIVES_AUTO_TILE,
|
||||
TiledPlugin.AUTO_FILL_TILES);
|
||||
interests.add(TiledPlugin.ACTION_SETUP_ALTERNATIVES_AUTO_TILE,
|
||||
TiledPlugin.GRID_CHANGED,
|
||||
SettingsTab.OK_BTN_CLICKED,
|
||||
TiledPlugin.ACTION_SET_GRID_SIZE_FROM_ITEM,
|
||||
MsgAPI.IMAGE_BUNDLE_DROP_SINGLE,
|
||||
TiledPlugin.ACTION_SET_GRID_SIZE_FROM_ITEM);
|
||||
interests.add(MsgAPI.IMAGE_BUNDLE_DROP_SINGLE,
|
||||
MsgAPI.ACTION_DELETE_IMAGE_RESOURCE,
|
||||
MsgAPI.TOOL_SELECTED,
|
||||
MsgAPI.ACTION_KEY_DOWN
|
||||
};
|
||||
MsgAPI.ACTION_KEY_DOWN);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
-7
@@ -2,8 +2,9 @@ package games.rednblack.editor.plugin.tiled.offset;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import games.rednblack.editor.plugin.tiled.TiledPlugin;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.mediator.Mediator;
|
||||
import games.rednblack.puremvc.Mediator;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
import games.rednblack.puremvc.util.Interests;
|
||||
|
||||
/**
|
||||
* Created by mariam on 5/12/16.
|
||||
@@ -23,12 +24,10 @@ public class OffsetPanelMediator extends Mediator<OffsetPanel> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] listNotificationInterests() {
|
||||
return new String[] {
|
||||
TiledPlugin.ACTION_OPEN_OFFSET_PANEL,
|
||||
public void listNotificationInterests(Interests interests) {
|
||||
interests.add(TiledPlugin.ACTION_OPEN_OFFSET_PANEL,
|
||||
TiledPlugin.TILE_GRID_OFFSET_ADDED,
|
||||
TiledPlugin.TILE_SELECTED
|
||||
};
|
||||
TiledPlugin.TILE_SELECTED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-2
@@ -3,8 +3,6 @@ package games.rednblack.editor.plugin.tiled.tools;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
@@ -13,6 +11,7 @@ import games.rednblack.editor.plugin.tiled.TiledPlugin;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.view.tools.Tool;
|
||||
import games.rednblack.h2d.common.vo.CursorData;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
/**
|
||||
* Created by mariam on 4/5/16.
|
||||
|
||||
+1
-1
@@ -1,7 +1,6 @@
|
||||
package games.rednblack.editor.plugin.tiled.tools;
|
||||
|
||||
import games.rednblack.h2d.extension.spine.SpineItemType;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
@@ -21,6 +20,7 @@ import games.rednblack.editor.renderer.utils.ComponentRetriever;
|
||||
import games.rednblack.h2d.common.command.TransformCommandBuilder;
|
||||
import games.rednblack.h2d.common.view.tools.Tool;
|
||||
import games.rednblack.h2d.common.vo.CursorData;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
/**
|
||||
* Created by mariam on 3/29/16.
|
||||
|
||||
+9
-11
@@ -1,11 +1,11 @@
|
||||
package games.rednblack.editor.plugin.tiled.view.dialog;
|
||||
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.mediator.Mediator;
|
||||
|
||||
import games.rednblack.editor.plugin.tiled.TiledPlugin;
|
||||
import games.rednblack.editor.plugin.tiled.data.AlternativeAutoTileVO;
|
||||
import games.rednblack.editor.plugin.tiled.data.AutoTileVO;
|
||||
import games.rednblack.puremvc.Mediator;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
import games.rednblack.puremvc.util.Interests;
|
||||
|
||||
/**
|
||||
* The mediator for messages for the alternatives.
|
||||
@@ -23,14 +23,12 @@ public class AlternativeAutoTileDialogMediator extends Mediator<AlternativeAutoT
|
||||
this.tiledPlugin = tiledPlugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] listNotificationInterests() {
|
||||
return new String[] {
|
||||
TiledPlugin.ACTION_SETUP_ALTERNATIVES_AUTO_TILE,
|
||||
TiledPlugin.ACTION_SAVE_ALTERNATIVES_AUTO_TILE,
|
||||
TiledPlugin.ACTION_RECALC_PERCENT_ALTERNATIVES_AUTO_TILE
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public void listNotificationInterests(Interests interests) {
|
||||
interests.add(TiledPlugin.ACTION_SETUP_ALTERNATIVES_AUTO_TILE,
|
||||
TiledPlugin.ACTION_SAVE_ALTERNATIVES_AUTO_TILE,
|
||||
TiledPlugin.ACTION_RECALC_PERCENT_ALTERNATIVES_AUTO_TILE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleNotification(INotification notification) {
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@ import com.kotcrab.vis.ui.widget.file.FileChooser;
|
||||
import games.rednblack.h2d.common.H2DDialog;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.widget.InputFileWidget;
|
||||
import org.puremvc.java.interfaces.IFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class ImportTileSetDialog extends H2DDialog {
|
||||
private static final String prefix = "games.rednblack.editor.plugin.tiled.view.dialog.ImportTileSetDialog";
|
||||
@@ -20,9 +20,9 @@ public class ImportTileSetDialog extends H2DDialog {
|
||||
private final VisValidatableTextField width, height;
|
||||
private final InputFileWidget imagePathField;
|
||||
private final VisTextButton importButton;
|
||||
private final IFacade facade;
|
||||
private final Facade facade;
|
||||
|
||||
public ImportTileSetDialog(IFacade facade) {
|
||||
public ImportTileSetDialog(Facade facade) {
|
||||
super("Import TileSet");
|
||||
this.facade = facade;
|
||||
|
||||
|
||||
+8
-9
@@ -7,9 +7,10 @@ import games.rednblack.editor.plugin.tiled.TiledPlugin;
|
||||
import games.rednblack.editor.renderer.data.TexturePackVO;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.plugins.PluginAPI;
|
||||
import org.puremvc.java.interfaces.IFacade;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.mediator.Mediator;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.Mediator;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
import games.rednblack.puremvc.util.Interests;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -19,17 +20,15 @@ public class ImportTileSetDialogMediator extends Mediator<ImportTileSetDialog> {
|
||||
|
||||
private final PluginAPI pluginAPI;
|
||||
|
||||
public ImportTileSetDialogMediator(PluginAPI pluginAPI, IFacade facade) {
|
||||
public ImportTileSetDialogMediator(PluginAPI pluginAPI, Facade facade) {
|
||||
super(NAME, new ImportTileSetDialog(facade));
|
||||
this.pluginAPI = pluginAPI;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] listNotificationInterests() {
|
||||
return new String[] {
|
||||
TiledPlugin.IMPORT_TILESET_PANEL_OPEN,
|
||||
ImportTileSetDialog.IMPORT_TILESET
|
||||
};
|
||||
public void listNotificationInterests(Interests interests) {
|
||||
interests.add(TiledPlugin.IMPORT_TILESET_PANEL_OPEN,
|
||||
ImportTileSetDialog.IMPORT_TILESET);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package games.rednblack.editor;
|
||||
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import org.puremvc.java.patterns.facade.Facade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
@@ -12,7 +12,7 @@ public class ConsoleInterceptor extends PrintStream {
|
||||
|
||||
public ConsoleInterceptor(OutputStream out) {
|
||||
super(out, true);
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
facade = Facade.getInstance();
|
||||
}
|
||||
|
||||
public void setPrefix(String prefix) {
|
||||
|
||||
@@ -31,10 +31,10 @@ import games.rednblack.editor.splash.SplashScreenAdapter;
|
||||
import games.rednblack.editor.view.ui.panel.ImportPanel;
|
||||
import games.rednblack.editor.view.ui.widget.actors.basic.WhitePixel;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.interfaces.IProxy;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import org.puremvc.java.interfaces.IProxy;
|
||||
import org.puremvc.java.patterns.observer.Notification;
|
||||
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
@@ -42,12 +42,10 @@ public class HyperLap2D implements IProxy, ApplicationListener, Lwjgl3WindowList
|
||||
private static final String TAG = HyperLap2D.class.getCanonicalName();
|
||||
public static final String NAME = TAG;
|
||||
|
||||
private HyperLap2DFacade facade;
|
||||
private Facade facade;
|
||||
private Object data;
|
||||
|
||||
private final Notification renderNotification;
|
||||
|
||||
public HyperLap2DFacade getFacade() {
|
||||
public Facade getFacade() {
|
||||
return facade;
|
||||
}
|
||||
|
||||
@@ -56,20 +54,19 @@ public class HyperLap2D implements IProxy, ApplicationListener, Lwjgl3WindowList
|
||||
private final SettingsManager settingsManager;
|
||||
|
||||
public HyperLap2D(SettingsManager settingsManager) {
|
||||
renderNotification = new Notification(MsgAPI.RENDER, null, null);
|
||||
this.settingsManager = settingsManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
facade = Facade.getInstance();
|
||||
facade.registerProxy(settingsManager);
|
||||
facade.registerProxy(this);
|
||||
}
|
||||
|
||||
private void startup() {
|
||||
facade.startup();
|
||||
sendNotification(MsgAPI.CREATE);
|
||||
facade.sendNotification(MsgAPI.STARTUP);
|
||||
facade.sendNotification(MsgAPI.CREATE);
|
||||
facade.sendNotification(SplashScreenAdapter.CLOSE_SPLASH, "Initializing...");
|
||||
Lwjgl3Graphics graphics = (Lwjgl3Graphics)Gdx.graphics;
|
||||
|
||||
@@ -79,55 +76,38 @@ public class HyperLap2D implements IProxy, ApplicationListener, Lwjgl3WindowList
|
||||
int width = w.get(0);
|
||||
int height = h.get(0);
|
||||
|
||||
sendNotification(MsgAPI.RESIZE, new int[]{width, height});
|
||||
facade.sendNotification(MsgAPI.RESIZE, new int[]{width, height});
|
||||
|
||||
startTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pause() {
|
||||
sendNotification(MsgAPI.PAUSE);
|
||||
facade.sendNotification(MsgAPI.PAUSE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resume() {
|
||||
sendNotification(MsgAPI.RESUME);
|
||||
facade.sendNotification(MsgAPI.RESUME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
renderNotification.setBody(Math.min(Gdx.graphics.getDeltaTime(), 0.1f));
|
||||
facade.notifyObservers(renderNotification);
|
||||
facade.sendNotification(MsgAPI.RENDER, Math.min(Gdx.graphics.getDeltaTime(), 0.1f));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resize(int width, int height) {
|
||||
sendNotification(MsgAPI.RESIZE, new int[]{width, height});
|
||||
facade.sendNotification(MsgAPI.RESIZE, new int[]{width, height});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
sendNotification(MsgAPI.DISPOSE);
|
||||
facade.sendNotification(MsgAPI.DISPOSE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendNotification(String notificationName, Object body, String type) {
|
||||
System.out.println("sendNotification: " + System.currentTimeMillis() + " " + type);
|
||||
facade.sendNotification(notificationName, body, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendNotification(String notificationName, Object body) {
|
||||
facade.sendNotification(notificationName, body);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendNotification(String notificationName) {
|
||||
facade.sendNotification(notificationName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProxyName() {
|
||||
public String getName() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@@ -136,11 +116,6 @@ public class HyperLap2D implements IProxy, ApplicationListener, Lwjgl3WindowList
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegister() {
|
||||
ConsoleInterceptor errInterceptor = new ConsoleInterceptor(System.err);
|
||||
|
||||
@@ -10,6 +10,7 @@ import games.rednblack.editor.splash.SplashScreenAdapter;
|
||||
import games.rednblack.editor.utils.AppConfig;
|
||||
import games.rednblack.editor.utils.HyperLap2DUtils;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
|
||||
public class HyperLap2DApp extends ApplicationAdapter {
|
||||
@@ -41,7 +42,7 @@ public class HyperLap2DApp extends ApplicationAdapter {
|
||||
public void create() {
|
||||
Lwjgl3ApplicationGLESFix app = (Lwjgl3ApplicationGLESFix) Gdx.app;
|
||||
|
||||
StandardWidgetsFactory.init(HyperLap2DFacade.getInstance());
|
||||
StandardWidgetsFactory.init(Facade.getInstance());
|
||||
|
||||
Lwjgl3ApplicationConfiguration config2 = new Lwjgl3ApplicationConfiguration();
|
||||
config2.setWindowedMode(467, 385);
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
* ******************************************************************************
|
||||
* * Copyright 2015 See AUTHORS file.
|
||||
* *
|
||||
* * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* * you may not use this file except in compliance with the License.
|
||||
* * You may obtain a copy of the License at
|
||||
* *
|
||||
* * http://www.apache.org/licenses/LICENSE-2.0
|
||||
* *
|
||||
* * Unless required by applicable law or agreed to in writing, software
|
||||
* * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* * See the License for the specific language governing permissions and
|
||||
* * limitations under the License.
|
||||
* *****************************************************************************
|
||||
*/
|
||||
|
||||
package games.rednblack.editor;
|
||||
|
||||
import games.rednblack.editor.controller.StartupCommand;
|
||||
import games.rednblack.editor.splash.SplashMediator;
|
||||
import games.rednblack.h2d.common.HyperLog;
|
||||
import org.puremvc.java.patterns.facade.Facade;
|
||||
import org.puremvc.java.patterns.observer.Notification;
|
||||
|
||||
/**
|
||||
* Created by sargis on 3/30/15.
|
||||
*/
|
||||
public class HyperLap2DFacade extends Facade {
|
||||
public static final String STARTUP = "startup";
|
||||
private static HyperLap2DFacade instance = null;
|
||||
|
||||
protected HyperLap2DFacade() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Facade Singleton Factory method
|
||||
*
|
||||
* @return The Singleton instance of the Facade
|
||||
*/
|
||||
public synchronized static HyperLap2DFacade getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new HyperLap2DFacade();
|
||||
instance.registerMediator(new SplashMediator());
|
||||
HyperLog.setFacade(instance);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void startup() {
|
||||
notifyObservers(new Notification(STARTUP, null, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initializeFacade() {
|
||||
super.initializeFacade();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initializeController() {
|
||||
super.initializeController();
|
||||
registerCommand(STARTUP, StartupCommand::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initializeModel() {
|
||||
super.initializeModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initializeView() {
|
||||
super.initializeView();
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,12 @@ package games.rednblack.editor;
|
||||
import com.badlogic.gdx.Graphics;
|
||||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationGLESFix;
|
||||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
|
||||
import games.rednblack.editor.controller.StartupCommand;
|
||||
import games.rednblack.editor.proxy.SettingsManager;
|
||||
import games.rednblack.editor.splash.SplashMediator;
|
||||
import games.rednblack.h2d.common.HyperLog;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
|
||||
import java.io.*;
|
||||
@@ -26,7 +31,10 @@ public class Main {
|
||||
//Increase default lwjgl stack size
|
||||
System.setProperty("org.lwjgl.system.stackSize", "256");
|
||||
|
||||
HyperLap2DFacade.getInstance();
|
||||
Facade instance = Facade.getInstance();
|
||||
instance.registerMediator(new SplashMediator());
|
||||
instance.registerCommand(MsgAPI.STARTUP, StartupCommand.class);
|
||||
HyperLog.setFacade(instance);
|
||||
|
||||
Graphics.DisplayMode dm = Lwjgl3ApplicationConfiguration.getDisplayMode();
|
||||
|
||||
|
||||
@@ -18,14 +18,13 @@
|
||||
|
||||
package games.rednblack.editor.controller;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.*;
|
||||
import games.rednblack.editor.controller.commands.component.*;
|
||||
import games.rednblack.editor.controller.commands.resource.*;
|
||||
import games.rednblack.editor.splash.SplashScreenAdapter;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.command.SimpleCommand;
|
||||
import games.rednblack.puremvc.commands.SimpleCommand;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/28/2015.
|
||||
@@ -35,96 +34,96 @@ public class BootstrapCommand extends SimpleCommand {
|
||||
@Override
|
||||
public void execute(INotification notification) {
|
||||
super.execute(notification);
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
|
||||
facade.sendNotification(SplashScreenAdapter.UPDATE_SPLASH, "Loading Commands...");
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_CUT, CutItemsCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_COPY, CopyItemsCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_PASTE, PasteItemsCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE, DeleteItemsCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CREATE_ITEM, CreateItemCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CAMERA_CHANGE_COMPOSITE, CompositeCameraChangeCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CREATE_PRIMITIVE, CreatePrimitiveCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CREATE_STICKY_NOTE, CreateStickyNoteCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CREATE_STICKY_NOTE, CreateStickyNoteCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_REMOVE_STICKY_NOTE, RemoveStickyNoteCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_MODIFY_STICKY_NOTE, ModifyStickyNoteCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CUT, CutItemsCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_COPY, CopyItemsCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_PASTE, PasteItemsCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE, DeleteItemsCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_CREATE_ITEM, CreateItemCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_CAMERA_CHANGE_COMPOSITE, CompositeCameraChangeCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_CREATE_PRIMITIVE, CreatePrimitiveCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_CREATE_STICKY_NOTE, CreateStickyNoteCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_CREATE_STICKY_NOTE, CreateStickyNoteCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_REMOVE_STICKY_NOTE, RemoveStickyNoteCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_MODIFY_STICKY_NOTE, ModifyStickyNoteCommand.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_LAYER, DeleteLayerCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_NEW_LAYER, NewLayerCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_SWAP_LAYERS, LayerSwapCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_JUMP_LAYERS, LayerJumpCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_RENAME_LAYER, RenameLayerCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_LAYER, DeleteLayerCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_NEW_LAYER, NewLayerCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_SWAP_LAYERS, LayerSwapCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_JUMP_LAYERS, LayerJumpCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_RENAME_LAYER, RenameLayerCommand.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_ADD_COMPONENT, AddComponentToItemCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_REMOVE_COMPONENT, RemoveComponentFromItemCommand::new);
|
||||
facade.registerCommand(MsgAPI.CUSTOM_VARIABLE_MODIFY, CustomVariableModifyCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_ADD_COMPONENT, AddComponentToItemCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_REMOVE_COMPONENT, RemoveComponentFromItemCommand.class);
|
||||
facade.registerCommand(MsgAPI.CUSTOM_VARIABLE_MODIFY, CustomVariableModifyCommand.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_ITEMS_MOVE_TO, ItemsMoveCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_ITEMS_MOVE_TO, ItemsMoveCommand.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_ITEM_AND_CHILDREN_TO, ItemChildrenTransformCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_ITEM_AND_CHILDREN_TO, ItemChildrenTransformCommand.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_ITEM_TRANSFORM_TO, ItemTransformCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_REPLACE_REGION_DATA, ReplaceRegionCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_REPLACE_SPRITE_ANIMATION_DATA, ReplaceSpriteAnimationCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_REPLACE_SPINE_ANIMATION_DATA, ReplaceSpineCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_ADD_TO_LIBRARY, AddToLibraryCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_ADD_TO_LIBRARY_ACTION, AddToLibraryAction::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CHANGE_LIBRARY_ACTION, ChangeLibraryActionCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CONVERT_TO_BUTTON, ConvertToButtonCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_GROUP_ITEMS, ConvertToCompositeCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_ITEM_TRANSFORM_TO, ItemTransformCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_REPLACE_REGION_DATA, ReplaceRegionCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_REPLACE_SPRITE_ANIMATION_DATA, ReplaceSpriteAnimationCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_REPLACE_SPINE_ANIMATION_DATA, ReplaceSpineCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_ADD_TO_LIBRARY, AddToLibraryCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_ADD_TO_LIBRARY_ACTION, AddToLibraryAction.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_CHANGE_LIBRARY_ACTION, ChangeLibraryActionCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_CONVERT_TO_BUTTON, ConvertToButtonCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_GROUP_ITEMS, ConvertToCompositeCommand.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_SET_SELECTION, SetSelectionCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_ADD_SELECTION, AddSelectionCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_RELEASE_SELECTION, ReleaseSelectionCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_SET_SELECTION, SetSelectionCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_ADD_SELECTION, AddSelectionCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_RELEASE_SELECTION, ReleaseSelectionCommand.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_RULER_POSITION, ChangeRulerPositionCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CHANGE_POLYGON_VERTEX_POSITION, ChangePolygonVertexPositionCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_POLYGON_VERTEX, DeletePolygonVertexCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CHANGE_ORIGIN_POSITION, ChangeOriginPointPosition::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_CENTER_ORIGIN_POSITION, CenterOriginPointCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_RULER_POSITION, ChangeRulerPositionCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_CHANGE_POLYGON_VERTEX_POSITION, ChangePolygonVertexPositionCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_POLYGON_VERTEX, DeletePolygonVertexCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_CHANGE_ORIGIN_POSITION, ChangeOriginPointPosition.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_CENTER_ORIGIN_POSITION, CenterOriginPointCommand.class);
|
||||
|
||||
// DATA MODIFY by components
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_SCENE_DATA, UpdateSceneDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_ITEM_DATA, UpdateEntityComponentsCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_LABEL_DATA, UpdateLabelDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_LIGHT_DATA, UpdateLightDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_COMPOSITE_DATA, UpdateCompositeDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_PARTICLE_DATA, UpdateParticleDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_TALOS_DATA, UpdateTalosDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_BODY_LIGHT_DATA, UpdateLightBodyDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_CIRCLE_SHAPE, UpdateCircleShapeCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_PHYSICS_BODY_DATA, UpdatePhysicsDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_SENSOR_DATA, UpdateSensorDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_SHADER_DATA, UpdateShaderDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_IMAGE_ITEM_DATA, UpdateImageItemDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_SPRITE_ANIMATION_DATA, UpdateSpriteAnimationDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_SPINE_ANIMATION_DATA, UpdateSpineDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_SCENE_DATA, UpdateSceneDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_ITEM_DATA, UpdateEntityComponentsCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_LABEL_DATA, UpdateLabelDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_LIGHT_DATA, UpdateLightDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_COMPOSITE_DATA, UpdateCompositeDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_PARTICLE_DATA, UpdateParticleDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_TALOS_DATA, UpdateTalosDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_BODY_LIGHT_DATA, UpdateLightBodyDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_CIRCLE_SHAPE, UpdateCircleShapeCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_PHYSICS_BODY_DATA, UpdatePhysicsDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_SENSOR_DATA, UpdateSensorDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_SHADER_DATA, UpdateShaderDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_IMAGE_ITEM_DATA, UpdateImageItemDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_SPRITE_ANIMATION_DATA, UpdateSpriteAnimationDataCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_SPINE_ANIMATION_DATA, UpdateSpineDataCommand.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_MESH_DATA, UpdatePolygonVerticesCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_POLYGON_DATA, UpdatePolygonDataCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_MESH_DATA, UpdatePolygonVerticesCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_UPDATE_POLYGON_DATA, UpdatePolygonDataCommand.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_EXPORT_PROJECT, ExportProjectCommand::new);
|
||||
facade.registerCommand(MsgAPI.SAVE_EXPORT_PATH, SaveExportPathCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_EXPORT_PROJECT, ExportProjectCommand.class);
|
||||
facade.registerCommand(MsgAPI.SAVE_EXPORT_PATH, SaveExportPathCommand.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.ACTION_PLUGIN_PROXY_COMMAND, PluginItemCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_PLUGIN_PROXY_COMMAND, PluginItemCommand.class);
|
||||
|
||||
// Resources
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_IMAGE_RESOURCE, DeleteImageResource::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_TINY_VG_RESOURCE, DeleteTinyVGResource::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_SHADER, DeleteShaderCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_LIBRARY_ITEM, DeleteLibraryItem::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_LIBRARY_ACTION, DeleteLibraryAction::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DUPLICATE_LIBRARY_ACTION, DuplicateLibraryAction::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_EXPORT_LIBRARY_ITEM, ExportLibraryItemCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_EXPORT_ACTION_ITEM, ExportActionCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_RENAME_ACTION_ITEM, RenameLibraryActionCommand::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_PARTICLE_EFFECT, DeleteParticleEffect::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_TALOS_VFX, DeleteTalosVFX::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_SPINE_ANIMATION_RESOURCE, DeleteSpineAnimation::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_SPRITE_ANIMATION_RESOURCE, DeleteSpriteAnimation::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_MULTIPLE_RESOURCE, DeleteMultipleResources::new);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_IMAGE_RESOURCE, DeleteImageResource.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_TINY_VG_RESOURCE, DeleteTinyVGResource.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_SHADER, DeleteShaderCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_LIBRARY_ITEM, DeleteLibraryItem.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_LIBRARY_ACTION, DeleteLibraryAction.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DUPLICATE_LIBRARY_ACTION, DuplicateLibraryAction.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_EXPORT_LIBRARY_ITEM, ExportLibraryItemCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_EXPORT_ACTION_ITEM, ExportActionCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_RENAME_ACTION_ITEM, RenameLibraryActionCommand.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_PARTICLE_EFFECT, DeleteParticleEffect.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_TALOS_VFX, DeleteTalosVFX.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_SPINE_ANIMATION_RESOURCE, DeleteSpineAnimation.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_SPRITE_ANIMATION_RESOURCE, DeleteSpriteAnimation.class);
|
||||
facade.registerCommand(MsgAPI.ACTION_DELETE_MULTIPLE_RESOURCE, DeleteMultipleResources.class);
|
||||
|
||||
facade.registerCommand(MsgAPI.SHOW_NOTIFICATION, ShowNotificationCommand::new);
|
||||
facade.registerCommand(MsgAPI.SHOW_NOTIFICATION, ShowNotificationCommand.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.GL20;
|
||||
import games.rednblack.editor.utils.AppConfig;
|
||||
import games.rednblack.h2d.common.HyperLog;
|
||||
import games.rednblack.puremvc.commands.SimpleCommand;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.command.SimpleCommand;
|
||||
|
||||
public class BootstrapInfoCommand extends SimpleCommand {
|
||||
|
||||
|
||||
@@ -18,16 +18,16 @@
|
||||
|
||||
package games.rednblack.editor.controller;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.PluginManager;
|
||||
import games.rednblack.editor.proxy.SettingsManager;
|
||||
import games.rednblack.editor.splash.SplashScreenAdapter;
|
||||
import games.rednblack.h2d.common.plugins.H2DPlugin;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.commands.SimpleCommand;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
import net.mountainblade.modular.Module;
|
||||
import net.mountainblade.modular.ModuleManager;
|
||||
import net.mountainblade.modular.impl.DefaultModuleManager;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.command.SimpleCommand;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@@ -37,7 +37,6 @@ public class BootstrapPlugins extends SimpleCommand {
|
||||
|
||||
public void execute(INotification notification) {
|
||||
super.execute(notification);
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
|
||||
SettingsManager settingsManager = facade.retrieveProxy(SettingsManager.NAME);
|
||||
if (!settingsManager.editorConfigVO.enablePlugins)
|
||||
|
||||
@@ -18,12 +18,11 @@
|
||||
|
||||
package games.rednblack.editor.controller;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.*;
|
||||
import games.rednblack.editor.splash.SplashScreenAdapter;
|
||||
import games.rednblack.h2d.common.proxy.CursorManager;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.command.SimpleCommand;
|
||||
import games.rednblack.puremvc.commands.SimpleCommand;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
/**
|
||||
* Created by sargis on 4/1/15.
|
||||
@@ -32,7 +31,7 @@ public class BootstrapProxyCommand extends SimpleCommand {
|
||||
@Override
|
||||
public void execute(INotification notification) {
|
||||
super.execute(notification);
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
|
||||
facade.sendNotification(SplashScreenAdapter.UPDATE_SPLASH, "Loading Proxies...");
|
||||
|
||||
facade.registerProxy(new WindowTitleManager());
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
package games.rednblack.editor.controller;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.splash.SplashScreenAdapter;
|
||||
import games.rednblack.editor.view.HyperLap2DScreenMediator;
|
||||
import games.rednblack.editor.view.menu.HyperLap2DMenuBarMediator;
|
||||
@@ -29,8 +28,8 @@ import games.rednblack.editor.view.ui.box.*;
|
||||
import games.rednblack.editor.view.ui.box.bottom.*;
|
||||
import games.rednblack.editor.view.ui.dialog.*;
|
||||
import games.rednblack.editor.view.ui.panel.*;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.command.SimpleCommand;
|
||||
import games.rednblack.puremvc.commands.SimpleCommand;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
/**
|
||||
* Created by sargis on 4/1/15.
|
||||
@@ -39,7 +38,7 @@ public class BootstrapViewCommand extends SimpleCommand {
|
||||
@Override
|
||||
public void execute(INotification notification) {
|
||||
super.execute(notification);
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
|
||||
facade.sendNotification(SplashScreenAdapter.UPDATE_SPLASH, "Loading Views...");
|
||||
|
||||
facade.registerMediator(new HyperLap2DScreenMediator());
|
||||
|
||||
@@ -18,9 +18,8 @@
|
||||
|
||||
package games.rednblack.editor.controller;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import org.puremvc.java.patterns.command.SimpleCommand;
|
||||
import games.rednblack.puremvc.commands.SimpleCommand;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/28/2015.
|
||||
@@ -31,6 +30,5 @@ public class SandboxCommand extends SimpleCommand {
|
||||
|
||||
public SandboxCommand() {
|
||||
sandbox = Sandbox.getInstance();
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package games.rednblack.editor.controller;
|
||||
|
||||
import org.puremvc.java.patterns.command.MacroCommand;
|
||||
import games.rednblack.puremvc.commands.MacroCommand;
|
||||
|
||||
/**
|
||||
* Created by sargis on 3/30/15.
|
||||
@@ -28,10 +28,10 @@ public class StartupCommand extends MacroCommand {
|
||||
protected void initializeMacroCommand() {
|
||||
super.initializeMacroCommand();
|
||||
|
||||
addSubCommand(BootstrapProxyCommand::new);
|
||||
addSubCommand(BootstrapViewCommand::new);
|
||||
addSubCommand(BootstrapInfoCommand::new);
|
||||
addSubCommand(BootstrapCommand::new);
|
||||
addSubCommand(BootstrapPlugins::new);
|
||||
addSubCommand(new BootstrapProxyCommand());
|
||||
addSubCommand(new BootstrapViewCommand());
|
||||
addSubCommand(new BootstrapInfoCommand());
|
||||
addSubCommand(new BootstrapCommand());
|
||||
addSubCommand(new BootstrapPlugins());
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.artemis.Component;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by CyberJoe on 7/2/2015.
|
||||
@@ -29,8 +29,8 @@ public class AddComponentToItemCommand extends EntityModifyRevertibleCommand {
|
||||
Component newComponent = Sandbox.getInstance().getEngine().edit(entity).create(component);
|
||||
sandbox.getEngine().inject(newComponent);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(DONE, entity);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(DONE, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,8 +38,8 @@ public class AddComponentToItemCommand extends EntityModifyRevertibleCommand {
|
||||
Sandbox.getInstance().getEngine().edit(entity).remove(component);
|
||||
Sandbox.getInstance().getEngine().process();
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(DONE, entity);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(DONE, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object[] payload(int entity, Class<? extends Component> component) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.data.GraphVO;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class AddToLibraryAction extends NonRevertibleCommand {
|
||||
|
||||
@@ -17,7 +17,7 @@ public class AddToLibraryAction extends NonRevertibleCommand {
|
||||
GraphVO data = (GraphVO) payload[1];
|
||||
libraryActions.put(key, data);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.LIBRARY_ACTIONS_UPDATED);
|
||||
Facade.getInstance().sendNotification(MsgAPI.LIBRARY_ACTIONS_UPDATED);
|
||||
}
|
||||
|
||||
public static Object[] getPayload(String key, GraphVO data) {
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.renderer.components.MainItemComponent;
|
||||
import games.rednblack.editor.renderer.data.CompositeItemVO;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class AddToLibraryCommand extends HistoricRevertibleCommand {
|
||||
MainItemComponent mainItemComponent = SandboxComponentRetriever.get(item, MainItemComponent.class);
|
||||
|
||||
if(createdLibraryItemName.length() > 0) {
|
||||
ProjectManager projectManager = HyperLap2DFacade.getInstance().retrieveProxy(ProjectManager.NAME);
|
||||
ProjectManager projectManager = Facade.getInstance().retrieveProxy(ProjectManager.NAME);
|
||||
HashMap<String, CompositeItemVO> libraryItems = projectManager.currentProjectInfoVO.libraryItems;
|
||||
|
||||
if (libraryItems.containsKey(createdLibraryItemName)) {
|
||||
@@ -74,7 +74,7 @@ public class AddToLibraryCommand extends HistoricRevertibleCommand {
|
||||
|
||||
@Override
|
||||
public void undoAction() {
|
||||
ProjectManager projectManager = HyperLap2DFacade.getInstance().retrieveProxy(ProjectManager.NAME);
|
||||
ProjectManager projectManager = Facade.getInstance().retrieveProxy(ProjectManager.NAME);
|
||||
HashMap<String, CompositeItemVO> libraryItems = projectManager.currentProjectInfoVO.libraryItems;
|
||||
|
||||
if(createdLibraryItemName.length() > 0) {
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.components.DimensionsComponent;
|
||||
import games.rednblack.editor.renderer.components.TransformComponent;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.command.TransformCommandBuilder;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class CenterOriginPointCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class CenterOriginPointCommand extends EntityModifyRevertibleCommand {
|
||||
originY = dimensionsComponent.polygon.getBoundingRectangle().height * 0.5f;
|
||||
}
|
||||
commandBuilder.setOrigin(originX, originY);
|
||||
commandBuilder.execute(HyperLap2DFacade.getInstance());
|
||||
commandBuilder.execute(Facade.getInstance());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,6 +38,6 @@ public class CenterOriginPointCommand extends EntityModifyRevertibleCommand {
|
||||
TransformCommandBuilder commandBuilder = new TransformCommandBuilder();
|
||||
commandBuilder.begin(entity, sandbox.getEngine());
|
||||
commandBuilder.setOrigin(backupOrigin.x, backupOrigin.y);
|
||||
commandBuilder.execute(HyperLap2DFacade.getInstance());
|
||||
commandBuilder.execute(Facade.getInstance());
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,6 +1,5 @@
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.SandboxCommand;
|
||||
import games.rednblack.editor.renderer.components.TransformComponent;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
@@ -8,7 +7,8 @@ import games.rednblack.editor.view.ui.validator.FloatInputValidator;
|
||||
import games.rednblack.h2d.common.command.TransformCommandBuilder;
|
||||
import games.rednblack.h2d.common.view.ui.dialog.MultipleInputDialog;
|
||||
import games.rednblack.h2d.common.view.ui.listener.MultipleInputDialogListener;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
public class ChangeOriginPointPosition extends SandboxCommand {
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ChangeOriginPointPosition extends SandboxCommand {
|
||||
TransformCommandBuilder commandBuilder = new TransformCommandBuilder();
|
||||
commandBuilder.begin(entity, sandbox.getEngine());
|
||||
commandBuilder.setOrigin(Float.parseFloat(input[0]), Float.parseFloat(input[1]));
|
||||
commandBuilder.execute(HyperLap2DFacade.getInstance());
|
||||
commandBuilder.execute(Facade.getInstance());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -3,7 +3,6 @@ package games.rednblack.editor.controller.commands;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.IntSet;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.SandboxCommand;
|
||||
import games.rednblack.editor.controller.commands.component.UpdatePolygonVerticesCommand;
|
||||
import games.rednblack.editor.renderer.components.shape.PolygonShapeComponent;
|
||||
@@ -14,7 +13,8 @@ import games.rednblack.editor.view.ui.validator.FloatInputValidator;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.view.ui.dialog.MultipleInputDialog;
|
||||
import games.rednblack.h2d.common.view.ui.listener.MultipleInputDialogListener;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
public class ChangePolygonVertexPositionCommand extends SandboxCommand {
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ChangePolygonVertexPositionCommand extends SandboxCommand {
|
||||
|
||||
if (polygonShapeComponent.openEnded) {
|
||||
UpdatePolygonVerticesCommand.payload(currentCommandPayload, polygonShapeComponent.vertices, polygonShapeComponent.polygonizedVertices);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_UPDATE_MESH_DATA, currentCommandPayload);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_UPDATE_MESH_DATA, currentCommandPayload);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ChangePolygonVertexPositionCommand extends SandboxCommand {
|
||||
polygonShapeComponent.polygonizedVertices = PolygonUtils.polygonize(polygonShapeComponent.vertices.toArray());
|
||||
|
||||
UpdatePolygonVerticesCommand.payload(currentCommandPayload, polygonShapeComponent.vertices, polygonShapeComponent.polygonizedVertices);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_UPDATE_MESH_DATA, currentCommandPayload);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_UPDATE_MESH_DATA, currentCommandPayload);
|
||||
} else {
|
||||
points.get(anchor).set(backup);
|
||||
}
|
||||
|
||||
+5
-5
@@ -19,7 +19,6 @@
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.factory.ItemFactory;
|
||||
import games.rednblack.editor.renderer.components.DimensionsComponent;
|
||||
import games.rednblack.editor.renderer.components.TransformComponent;
|
||||
@@ -29,6 +28,7 @@ import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.editor.view.ui.FollowersUIMediator;
|
||||
import games.rednblack.editor.view.ui.box.UILayerBoxMediator;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -99,15 +99,15 @@ public class ConvertToCompositeCommand extends EntityModifyRevertibleCommand {
|
||||
sandbox.getEngine().process();
|
||||
|
||||
//let everyone know
|
||||
HyperLap2DFacade.getInstance().sendNotification(DONE);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.NEW_ITEM_ADDED, entity);
|
||||
Facade.getInstance().sendNotification(DONE);
|
||||
Facade.getInstance().sendNotification(MsgAPI.NEW_ITEM_ADDED, entity);
|
||||
sandbox.getSelector().setSelection(entity, true);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undoAction() {
|
||||
FollowersUIMediator followersUIMediator = HyperLap2DFacade.getInstance().retrieveMediator(FollowersUIMediator.NAME);
|
||||
FollowersUIMediator followersUIMediator = Facade.getInstance().retrieveMediator(FollowersUIMediator.NAME);
|
||||
|
||||
//get the entity
|
||||
int entity = EntityUtils.getByUniqueId(entityId);
|
||||
@@ -139,7 +139,7 @@ public class ConvertToCompositeCommand extends EntityModifyRevertibleCommand {
|
||||
sandbox.getEngine().delete(entity);
|
||||
sandbox.getEngine().process();
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(DONE);
|
||||
Facade.getInstance().sendNotification(DONE);
|
||||
|
||||
sandbox.getSelector().setSelections(children, true);
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.components.NodeComponent;
|
||||
import games.rednblack.editor.renderer.components.ZIndexComponent;
|
||||
import games.rednblack.editor.renderer.factory.EntityFactory;
|
||||
@@ -27,6 +26,7 @@ import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.editor.view.ui.FollowersUIMediator;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@@ -60,7 +60,7 @@ public class CreateItemCommand extends EntityModifyRevertibleCommand {
|
||||
zindexComponent.setZIndex(nodeComponent.children.size);
|
||||
|
||||
sandbox.getEngine().process();
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.NEW_ITEM_ADDED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.NEW_ITEM_ADDED, entity);
|
||||
|
||||
Set<Integer> items = new HashSet<>();
|
||||
items.add(entity);
|
||||
@@ -72,7 +72,7 @@ public class CreateItemCommand extends EntityModifyRevertibleCommand {
|
||||
int entity = EntityUtils.getByUniqueId(entityId);
|
||||
serializedEntity = EntityUtils.getJsonStringFromEntity(entity);
|
||||
|
||||
FollowersUIMediator followersUIMediator = HyperLap2DFacade.getInstance().retrieveMediator(FollowersUIMediator.NAME);
|
||||
FollowersUIMediator followersUIMediator = Facade.getInstance().retrieveMediator(FollowersUIMediator.NAME);
|
||||
followersUIMediator.removeFollower(entity);
|
||||
|
||||
sandbox.getEngine().delete(entity);
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.data.CompositeItemVO;
|
||||
import games.rednblack.editor.renderer.utils.HyperJson;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -54,7 +54,7 @@ public class CutItemsCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
sandbox.getEngine().process();
|
||||
for (int entity : newEntitiesList) {
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.NEW_ITEM_ADDED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.NEW_ITEM_ADDED, entity);
|
||||
}
|
||||
|
||||
sandbox.getSelector().setSelections(newEntitiesList, true);
|
||||
|
||||
@@ -20,12 +20,12 @@ package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.data.CompositeItemVO;
|
||||
import games.rednblack.editor.renderer.utils.HyperJson;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.view.ui.FollowersUIMediator;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@@ -59,7 +59,7 @@ public class DeleteItemsCommand extends EntityModifyRevertibleCommand {
|
||||
public void doAction() {
|
||||
backup();
|
||||
|
||||
FollowersUIMediator followersUIMediator = HyperLap2DFacade.getInstance().retrieveMediator(FollowersUIMediator.NAME);
|
||||
FollowersUIMediator followersUIMediator = Facade.getInstance().retrieveMediator(FollowersUIMediator.NAME);
|
||||
for (Integer entityId : entityIdsToDelete) {
|
||||
int item = EntityUtils.getByUniqueId(entityId);
|
||||
followersUIMediator.removeFollower(item);
|
||||
@@ -81,7 +81,7 @@ public class DeleteItemsCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
sandbox.getEngine().process();
|
||||
for (int entity : newEntitiesList) {
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.NEW_ITEM_ADDED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.NEW_ITEM_ADDED, entity);
|
||||
}
|
||||
|
||||
sandbox.getSelector().setSelections(newEntitiesList, true);
|
||||
|
||||
+3
-3
@@ -3,7 +3,6 @@ package games.rednblack.editor.controller.commands;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.kotcrab.vis.ui.util.dialog.Dialogs;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.SandboxCommand;
|
||||
import games.rednblack.editor.controller.commands.component.UpdatePolygonVerticesCommand;
|
||||
import games.rednblack.editor.renderer.components.shape.PolygonShapeComponent;
|
||||
@@ -11,7 +10,8 @@ import games.rednblack.editor.utils.poly.PolygonUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.editor.view.ui.followers.PolygonFollower;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
public class DeletePolygonVertexCommand extends SandboxCommand {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class DeletePolygonVertexCommand extends SandboxCommand {
|
||||
}
|
||||
|
||||
UpdatePolygonVerticesCommand.payload(currentCommandPayload, polygonShapeComponent.vertices, polygonShapeComponent.polygonizedVertices);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_UPDATE_MESH_DATA, currentCommandPayload);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_UPDATE_MESH_DATA, currentCommandPayload);
|
||||
|
||||
follower.update();
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,6 @@
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.renderer.components.MainItemComponent;
|
||||
import games.rednblack.editor.renderer.components.NodeComponent;
|
||||
@@ -27,6 +26,7 @@ import games.rednblack.editor.renderer.data.CompositeItemVO;
|
||||
import games.rednblack.editor.renderer.factory.EntityFactory;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -55,7 +55,7 @@ public abstract class EntityModifyRevertibleCommand extends HistoricRevertibleCo
|
||||
String link = mainItemComponent.libraryLink;
|
||||
|
||||
if(link != null && link.length() > 0) {
|
||||
ProjectManager projectManager = HyperLap2DFacade.getInstance().retrieveProxy(ProjectManager.NAME);
|
||||
ProjectManager projectManager = Facade.getInstance().retrieveProxy(ProjectManager.NAME);
|
||||
HashMap<String, CompositeItemVO> libraryItems = projectManager.currentProjectInfoVO.libraryItems;
|
||||
if (libraryItems.containsKey(mainItemComponent.libraryLink)) {
|
||||
CompositeItemVO itemVO = new CompositeItemVO();
|
||||
|
||||
@@ -21,7 +21,7 @@ package games.rednblack.editor.controller.commands;
|
||||
import games.rednblack.editor.controller.SandboxCommand;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
public class ExportProjectCommand extends SandboxCommand {
|
||||
|
||||
|
||||
+3
-3
@@ -2,12 +2,12 @@ package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.components.DimensionsComponent;
|
||||
import games.rednblack.editor.renderer.components.TransformComponent;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -85,7 +85,7 @@ public class ItemChildrenTransformCommand extends EntityModifyRevertibleCommand
|
||||
transformComponent.x = newPos.x;
|
||||
transformComponent.y = newPos.y;
|
||||
}
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -99,7 +99,7 @@ public class ItemChildrenTransformCommand extends EntityModifyRevertibleCommand
|
||||
transformComponent.x = oldPosition.x;
|
||||
transformComponent.y = oldPosition.y;
|
||||
}
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
private void setState(TransformComponent tC, Vector2 position, DimensionsComponent dC, Vector2 size) {
|
||||
|
||||
@@ -2,12 +2,12 @@ package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.components.DimensionsComponent;
|
||||
import games.rednblack.editor.renderer.components.TransformComponent;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by Osman on 01.08.2015.
|
||||
@@ -47,7 +47,7 @@ public class ItemTransformCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
EntityUtils.refreshComponents(entity);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,6 +80,6 @@ public class ItemTransformCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
EntityUtils.refreshComponents(entity);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.components.TransformComponent;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -60,7 +60,7 @@ public class ItemsMoveCommand extends EntityModifyRevertibleCommand {
|
||||
transformComponent.y = newLocation.y;
|
||||
|
||||
// pining UI to update current item properties tools
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity, TAG);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity, TAG);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ItemsMoveCommand extends EntityModifyRevertibleCommand {
|
||||
transformComponent.y = prevLocation.y;
|
||||
|
||||
// pining UI to update current item properties tools
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity, TAG);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity, TAG);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@ import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.proxy.SettingsManager;
|
||||
import games.rednblack.editor.renderer.data.CompositeItemVO;
|
||||
import games.rednblack.editor.renderer.data.GraphVO;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import games.rednblack.puremvc.Notification;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -36,7 +37,7 @@ public abstract class NonRevertibleCommand extends SandboxCommand {
|
||||
@Override
|
||||
public void execute(INotification notification) {
|
||||
commandManager = facade.retrieveProxy(CommandManager.NAME);
|
||||
this.notification = notification;
|
||||
this.notification = ((Notification) notification).copy();
|
||||
if (showConfirmDialog) {
|
||||
Dialogs.showConfirmDialog(sandbox.getUIStage(),
|
||||
confirmDialogTitle(), confirmDialogMessage(),
|
||||
|
||||
@@ -21,7 +21,6 @@ package games.rednblack.editor.controller.commands;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.components.TransformComponent;
|
||||
import games.rednblack.editor.renderer.components.ZIndexComponent;
|
||||
import games.rednblack.editor.renderer.data.CompositeItemVO;
|
||||
@@ -34,6 +33,7 @@ import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.editor.view.ui.FollowersUIMediator;
|
||||
import games.rednblack.editor.view.ui.box.UILayerBoxMediator;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@@ -73,7 +73,7 @@ public class PasteItemsCommand extends EntityModifyRevertibleCommand {
|
||||
ZIndexComponent zIndexComponent = SandboxComponentRetriever.get(entity, ZIndexComponent.class);
|
||||
// UILayerBoxMediator layerBoxMediator = facade.retrieveMediator(UILayerBoxMediator.NAME);
|
||||
zIndexComponent.layerName = layerBoxMediator.getCurrentSelectedLayerName();
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.NEW_ITEM_ADDED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.NEW_ITEM_ADDED, entity);
|
||||
pastedEntityIds.add(EntityUtils.getEntityId(entity));
|
||||
}
|
||||
sandbox.getSelector().setSelections(newEntitiesList, true);
|
||||
@@ -81,7 +81,7 @@ public class PasteItemsCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@Override
|
||||
public void undoAction() {
|
||||
FollowersUIMediator followersUIMediator = HyperLap2DFacade.getInstance().retrieveMediator(FollowersUIMediator.NAME);
|
||||
FollowersUIMediator followersUIMediator = Facade.getInstance().retrieveMediator(FollowersUIMediator.NAME);
|
||||
for (Integer entityId : pastedEntityIds) {
|
||||
int entity = EntityUtils.getByUniqueId(entityId);
|
||||
followersUIMediator.removeFollower(entity);
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.artemis.Component;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.runtime.ComponentCloner;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by CyberJoe on 7/2/2015.
|
||||
@@ -32,8 +32,8 @@ public class RemoveComponentFromItemCommand extends EntityModifyRevertibleComman
|
||||
sandbox.getEngine().edit(entity).remove(component.getClass());
|
||||
sandbox.getEngine().process();
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(DONE, entity);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(DONE, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
|
||||
Sandbox.getInstance().getSceneControl().sceneLoader.getRenderer().removeSpecialEntity(entity);
|
||||
}
|
||||
@@ -45,8 +45,8 @@ public class RemoveComponentFromItemCommand extends EntityModifyRevertibleComman
|
||||
ComponentCloner.set(newComponent, component);
|
||||
}
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(DONE, entity);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(DONE, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object[] payload(int entity, Class<? extends Component> componentClass) {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import com.kotcrab.vis.ui.util.dialog.Dialogs;
|
||||
import com.kotcrab.vis.ui.util.dialog.InputDialogAdapter;
|
||||
import games.rednblack.editor.controller.SandboxCommand;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
public class RenameLibraryActionCommand extends SandboxCommand {
|
||||
private static final String CLASS_NAME = "games.rednblack.editor.controller.commands.resource.RenameActionCommand";
|
||||
|
||||
@@ -20,7 +20,8 @@ package games.rednblack.editor.controller.commands;
|
||||
|
||||
import games.rednblack.editor.controller.SandboxCommand;
|
||||
import games.rednblack.editor.proxy.CommandManager;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import games.rednblack.puremvc.Notification;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
public abstract class RevertibleCommand extends SandboxCommand {
|
||||
|
||||
@@ -33,7 +34,7 @@ public abstract class RevertibleCommand extends SandboxCommand {
|
||||
@Override
|
||||
public void execute(INotification notification) {
|
||||
commandManager = facade.retrieveProxy(CommandManager.NAME);
|
||||
this.notification = notification;
|
||||
this.notification = ((Notification) notification).copy();;
|
||||
callDoAction();
|
||||
stateDone = true;
|
||||
if(!isCancelled) commandManager.addCommand(this);
|
||||
|
||||
@@ -20,7 +20,7 @@ package games.rednblack.editor.controller.commands;
|
||||
|
||||
import games.rednblack.editor.controller.SandboxCommand;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 11/12/2015.
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package games.rednblack.editor.controller.commands;
|
||||
import com.kotcrab.vis.ui.widget.toast.MessageToast;
|
||||
import games.rednblack.editor.controller.SandboxCommand;
|
||||
import games.rednblack.h2d.common.HyperLog;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
public class ShowNotificationCommand extends SandboxCommand {
|
||||
private static final String CLASS_NAME = "games.rednblack.editor.controller.commands.ShowNotificationCommand";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
|
||||
/**
|
||||
* Created by CyberJoe on 7/25/2015.
|
||||
|
||||
+2
-2
@@ -20,11 +20,11 @@ package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.artemis.Component;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.runtime.ComponentCloner;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 6/3/2015.
|
||||
@@ -53,7 +53,7 @@ public class UpdateEntityComponentsCommand extends EntityModifyRevertibleCommand
|
||||
|
||||
EntityUtils.refreshComponents(entity);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-3
@@ -2,12 +2,12 @@ package games.rednblack.editor.controller.commands;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.components.shape.PolygonShapeComponent;
|
||||
import games.rednblack.editor.utils.poly.PolygonUtils;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdatePolygonDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class UpdatePolygonDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
checkPolygon(polygonShapeComponent);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -41,7 +41,7 @@ public class UpdatePolygonDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
checkPolygon(polygonShapeComponent);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
private void checkPolygon(PolygonShapeComponent polygonShapeComponent) {
|
||||
|
||||
+3
-3
@@ -1,7 +1,6 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.DimensionsComponent;
|
||||
import games.rednblack.editor.renderer.components.TextureRegionComponent;
|
||||
@@ -11,6 +10,7 @@ import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class ReplaceRegionCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ReplaceRegionCommand extends EntityModifyRevertibleCommand {
|
||||
transformComponent.originX = size.width / 2;
|
||||
transformComponent.originY = size.height / 2;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -65,6 +65,6 @@ public class ReplaceRegionCommand extends EntityModifyRevertibleCommand {
|
||||
transformComponent.originX = size.width / 2;
|
||||
transformComponent.originY = size.height / 2;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,7 +1,6 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import com.esotericsoftware.spine.*;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.DimensionsComponent;
|
||||
import games.rednblack.editor.renderer.components.TransformComponent;
|
||||
@@ -9,6 +8,7 @@ import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.extension.spine.SpineComponent;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class ReplaceSpineCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ReplaceSpineCommand extends EntityModifyRevertibleCommand {
|
||||
spineComponent.currentAnimationName = currentAnimName;
|
||||
spineComponent.setAnimation(currentAnimName);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,6 +85,6 @@ public class ReplaceSpineCommand extends EntityModifyRevertibleCommand {
|
||||
spineComponent.currentAnimationName = currentAnimName;
|
||||
spineComponent.setAnimation(currentAnimName);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -3,7 +3,6 @@ package games.rednblack.editor.controller.commands.component;
|
||||
import com.badlogic.gdx.graphics.g2d.Animation;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.DimensionsComponent;
|
||||
import games.rednblack.editor.renderer.components.TextureRegionComponent;
|
||||
@@ -16,6 +15,7 @@ import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class ReplaceSpriteAnimationCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ReplaceSpriteAnimationCommand extends EntityModifyRevertibleCommand
|
||||
transformComponent.originX = size.width / 2;
|
||||
transformComponent.originY = size.height / 2;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -94,6 +94,6 @@ public class ReplaceSpriteAnimationCommand extends EntityModifyRevertibleCommand
|
||||
transformComponent.originX = size.width / 2;
|
||||
transformComponent.originY = size.height / 2;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.shape.CircleShapeComponent;
|
||||
import games.rednblack.editor.renderer.components.physics.PhysicsBodyComponent;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdateCircleShapeCommand extends EntityModifyRevertibleCommand {
|
||||
private int entityId;
|
||||
@@ -29,7 +29,7 @@ public class UpdateCircleShapeCommand extends EntityModifyRevertibleCommand {
|
||||
if (physicsBodyComponent != null)
|
||||
physicsBodyComponent.scheduleRefresh();
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -43,7 +43,7 @@ public class UpdateCircleShapeCommand extends EntityModifyRevertibleCommand {
|
||||
if (physicsBodyComponent != null)
|
||||
physicsBodyComponent.scheduleRefresh();
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object payload(int entity, float radius) {
|
||||
|
||||
+3
-3
@@ -1,6 +1,5 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.CompositeTransformComponent;
|
||||
import games.rednblack.editor.renderer.components.MainItemComponent;
|
||||
@@ -8,6 +7,7 @@ import games.rednblack.editor.renderer.data.CompositeItemVO;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdateCompositeDataCommand extends EntityModifyRevertibleCommand {
|
||||
private Integer entityId;
|
||||
@@ -28,7 +28,7 @@ public class UpdateCompositeDataCommand extends EntityModifyRevertibleCommand {
|
||||
transformComponent.scissorsEnabled = vo.scissorsEnabled;
|
||||
transformComponent.renderToFBO = vo.renderToFBO;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
|
||||
if (!transformComponent.renderToFBO) {
|
||||
String tag = SandboxComponentRetriever.get(entity, MainItemComponent.class).itemIdentifier;
|
||||
@@ -45,7 +45,7 @@ public class UpdateCompositeDataCommand extends EntityModifyRevertibleCommand {
|
||||
transformComponent.scissorsEnabled = backup.scissorsEnabled;
|
||||
transformComponent.renderToFBO = backup.renderToFBO;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
|
||||
if (!transformComponent.renderToFBO) {
|
||||
String tag = SandboxComponentRetriever.get(entity, MainItemComponent.class).itemIdentifier;
|
||||
|
||||
+3
-3
@@ -1,6 +1,5 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.DimensionsComponent;
|
||||
import games.rednblack.editor.renderer.components.TextureRegionComponent;
|
||||
@@ -8,6 +7,7 @@ import games.rednblack.editor.renderer.data.SimpleImageVO;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdateImageItemDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -31,7 +31,7 @@ public class UpdateImageItemDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
updateEntity(entity);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -44,7 +44,7 @@ public class UpdateImageItemDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
updateEntity(entity);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
private void updateEntity(int entity) {
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.light.LightBodyComponent;
|
||||
import games.rednblack.editor.renderer.data.LightBodyDataVO;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdateLightBodyDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class UpdateLightBodyDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
lightComponent.scheduleRefresh();
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -69,7 +69,7 @@ public class UpdateLightBodyDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
lightComponent.scheduleRefresh();
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object payload(int entity, LightBodyDataVO vo) {
|
||||
|
||||
+3
-3
@@ -18,13 +18,13 @@
|
||||
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.light.LightObjectComponent;
|
||||
import games.rednblack.editor.renderer.data.LightVO;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdateLightDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -56,7 +56,7 @@ public class UpdateLightDataCommand extends EntityModifyRevertibleCommand {
|
||||
lightObjectComponent.isSoft = vo.isSoft;
|
||||
lightObjectComponent.isActive = vo.isActive;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,7 +77,7 @@ public class UpdateLightDataCommand extends EntityModifyRevertibleCommand {
|
||||
lightObjectComponent.isActive = backup.isActive;
|
||||
lightObjectComponent.isSoft = backup.isSoft;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object payload(int entity, LightVO vo) {
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.particle.ParticleComponent;
|
||||
import games.rednblack.editor.renderer.data.ParticleEffectVO;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdateParticleDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class UpdateParticleDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
particleComponent.particleEffect.setPosition(0, 0);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,7 +40,7 @@ public class UpdateParticleDataCommand extends EntityModifyRevertibleCommand {
|
||||
particleComponent.transform = backup.transform;
|
||||
particleComponent.autoStart = backup.autoStart;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object payload(int entity, ParticleEffectVO vo) {
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.physics.PhysicsBodyComponent;
|
||||
import games.rednblack.editor.renderer.data.PhysicsBodyDataVO;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdatePhysicsDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class UpdatePhysicsDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
physicsComponent.scheduleRefresh();
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,7 +81,7 @@ public class UpdatePhysicsDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
physicsComponent.scheduleRefresh();
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object payload(int entity, PhysicsBodyDataVO vo) {
|
||||
|
||||
+3
-3
@@ -2,13 +2,13 @@ package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.TextureRegionComponent;
|
||||
import games.rednblack.editor.renderer.components.shape.PolygonShapeComponent;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdatePolygonVerticesCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class UpdatePolygonVerticesCommand extends EntityModifyRevertibleCommand
|
||||
if (textureRegionComponent != null)
|
||||
textureRegionComponent.executeRefresh(entity);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class UpdatePolygonVerticesCommand extends EntityModifyRevertibleCommand
|
||||
if (textureRegionComponent != null)
|
||||
textureRegionComponent.executeRefresh(entity);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object[] payloadInitialState(int entity) {
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.physics.SensorComponent;
|
||||
import games.rednblack.editor.renderer.data.SensorDataVO;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Update command for the sensor data.
|
||||
@@ -43,7 +43,7 @@ public class UpdateSensorDataCommand extends EntityModifyRevertibleCommand {
|
||||
sensorComponent.rightSpanPercent = vo.rightSpanPercent;
|
||||
sensorComponent.topSpanPercent = vo.topSpanPercent;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -61,7 +61,7 @@ public class UpdateSensorDataCommand extends EntityModifyRevertibleCommand {
|
||||
sensorComponent.rightSpanPercent = backup.rightSpanPercent;
|
||||
sensorComponent.topSpanPercent = backup.topSpanPercent;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object payload(int entity, SensorDataVO vo) {
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.h2d.extension.spine.SpineVO;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.extension.spine.SpineComponent;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdateSpineDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class UpdateSpineDataCommand extends EntityModifyRevertibleCommand {
|
||||
spineComponent.setAnimation(vo.currentAnimationName);
|
||||
spineComponent.setSkin(vo.currentSkinName);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -43,7 +43,7 @@ public class UpdateSpineDataCommand extends EntityModifyRevertibleCommand {
|
||||
spineComponent.setAnimation(backup.currentAnimationName);
|
||||
spineComponent.setSkin(backup.currentSkinName);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object payload(int entity, SpineVO vo) {
|
||||
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.Animation;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.editor.renderer.components.sprite.SpriteAnimationComponent;
|
||||
import games.rednblack.editor.renderer.components.sprite.SpriteAnimationStateComponent;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by CyberJoe on 6/18/2015.
|
||||
@@ -41,7 +41,7 @@ public class UpdateSpriteAnimationDataCommand extends EntityModifyRevertibleComm
|
||||
spriteAnimationComponent.playMode = playMode;
|
||||
spriteAnimationStateComponent.set(spriteAnimationComponent);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,7 +55,7 @@ public class UpdateSpriteAnimationDataCommand extends EntityModifyRevertibleComm
|
||||
spriteAnimationComponent.playMode = previousPlayMode;
|
||||
spriteAnimationStateComponent.set(spriteAnimationComponent);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object payload(int entity, int fps, String animName, Animation.PlayMode playMode) {
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package games.rednblack.editor.controller.commands.component;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.EntityModifyRevertibleCommand;
|
||||
import games.rednblack.h2d.extension.talos.TalosVO;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.utils.runtime.SandboxComponentRetriever;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.extension.talos.TalosComponent;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class UpdateTalosDataCommand extends EntityModifyRevertibleCommand {
|
||||
|
||||
@@ -27,7 +27,7 @@ public class UpdateTalosDataCommand extends EntityModifyRevertibleCommand {
|
||||
talosComponent.transform = vo.transform;
|
||||
talosComponent.effect.setPosition(0, 0);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,7 +38,7 @@ public class UpdateTalosDataCommand extends EntityModifyRevertibleCommand {
|
||||
talosComponent.effect.setPosition(0, 0);
|
||||
talosComponent.transform = backup.transform;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ITEM_DATA_UPDATED, entity);
|
||||
}
|
||||
|
||||
public static Object payload(int entity, TalosVO vo) {
|
||||
|
||||
+3
-3
@@ -3,7 +3,6 @@ package games.rednblack.editor.controller.commands.resource;
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import com.kotcrab.vis.ui.util.dialog.Dialogs;
|
||||
import com.kotcrab.vis.ui.util.dialog.InputDialogListener;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.AddToLibraryAction;
|
||||
import games.rednblack.editor.controller.commands.NonRevertibleCommand;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
@@ -12,6 +11,7 @@ import games.rednblack.editor.renderer.utils.HyperJson;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.editor.view.ui.validator.StringNameValidator;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class DuplicateLibraryAction extends NonRevertibleCommand {
|
||||
public void doAction() {
|
||||
String libraryActionName = notification.getBody();
|
||||
|
||||
ProjectManager projectManager = HyperLap2DFacade.getInstance().retrieveProxy(ProjectManager.NAME);
|
||||
ProjectManager projectManager = Facade.getInstance().retrieveProxy(ProjectManager.NAME);
|
||||
HashMap<String, GraphVO> libraryActions = projectManager.currentProjectInfoVO.libraryActions;
|
||||
|
||||
GraphVO actionToDuplicate = libraryActions.get(libraryActionName);
|
||||
@@ -41,7 +41,7 @@ public class DuplicateLibraryAction extends NonRevertibleCommand {
|
||||
GraphVO duplicated = json.fromJson(GraphVO.class, json.toJson(actionToDuplicate));
|
||||
|
||||
Object[] payload = AddToLibraryAction.getPayload(input, duplicated);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_ADD_TO_LIBRARY_ACTION, payload);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_ADD_TO_LIBRARY_ACTION, payload);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,11 +23,11 @@ import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import com.badlogic.gdx.utils.JsonReader;
|
||||
import com.badlogic.gdx.utils.JsonWriter;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.data.migrations.IVersionMigrator;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.renderer.data.ProjectInfoVO;
|
||||
import games.rednblack.h2d.common.vo.ProjectVO;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
@@ -42,12 +42,12 @@ public class VersionMigTo005 implements IVersionMigrator {
|
||||
|
||||
private Json json = new Json();
|
||||
private JsonReader jsonReader = new JsonReader();
|
||||
private HyperLap2DFacade facade;
|
||||
private Facade facade;
|
||||
private ProjectManager projectManager;
|
||||
|
||||
@Override
|
||||
public void setProject(String path, ProjectVO vo, ProjectInfoVO projectInfoVO) {
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
facade = Facade.getInstance();
|
||||
projectManager = facade.retrieveProxy(ProjectManager.NAME);
|
||||
projectPath = path;
|
||||
json.setOutputType(JsonWriter.OutputType.json);
|
||||
|
||||
@@ -24,11 +24,11 @@ import com.badlogic.gdx.utils.Json;
|
||||
import com.badlogic.gdx.utils.JsonReader;
|
||||
import com.badlogic.gdx.utils.JsonValue;
|
||||
import com.badlogic.gdx.utils.JsonWriter;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.data.migrations.IVersionMigrator;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.renderer.data.ProjectInfoVO;
|
||||
import games.rednblack.h2d.common.vo.ProjectVO;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
@@ -44,12 +44,12 @@ public class VersionMigTo009 implements IVersionMigrator {
|
||||
|
||||
private Json json = new Json();
|
||||
private JsonReader jsonReader = new JsonReader();
|
||||
private HyperLap2DFacade facade;
|
||||
private Facade facade;
|
||||
private ProjectManager projectManager;
|
||||
|
||||
@Override
|
||||
public void setProject(String path, ProjectVO vo, ProjectInfoVO projectInfoVO) {
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
facade = Facade.getInstance();
|
||||
projectManager = facade.retrieveProxy(ProjectManager.NAME);
|
||||
projectPath = path;
|
||||
json.setOutputType(JsonWriter.OutputType.json);
|
||||
|
||||
@@ -2,7 +2,7 @@ package games.rednblack.editor.event;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 7/2/2015.
|
||||
@@ -23,6 +23,6 @@ public class ButtonToNotificationListener extends ClickListener{
|
||||
|
||||
public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
|
||||
super.touchUp(event, x, y, pointer, button);
|
||||
HyperLap2DFacade.getInstance().sendNotification(notificationName, payload);
|
||||
Facade.getInstance().sendNotification(notificationName, payload);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package games.rednblack.editor.event;
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||
import com.kotcrab.vis.ui.widget.VisCheckBox;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/16/2015.
|
||||
@@ -41,7 +41,7 @@ public class CheckBoxChangeListener extends ChangeListener {
|
||||
|
||||
@Override
|
||||
public void changed(ChangeEvent changeEvent, Actor actor) {
|
||||
HyperLap2DFacade facade = HyperLap2DFacade.getInstance();
|
||||
Facade facade = Facade.getInstance();
|
||||
facade.sendNotification(eventName, ((VisCheckBox) actor).isChecked(), type);
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ package games.rednblack.editor.event;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/29/2015.
|
||||
@@ -35,7 +35,7 @@ public class ClickNotifier extends ClickListener {
|
||||
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
HyperLap2DFacade facade = HyperLap2DFacade.getInstance();
|
||||
Facade facade = Facade.getInstance();
|
||||
facade.sendNotification(eventName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ package games.rednblack.editor.event;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.view.ui.widget.EditableSelectBox;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/30/2015.
|
||||
@@ -38,7 +38,7 @@ public class EditableSelectBoxChangeListener extends ChangeListener {
|
||||
|
||||
@Override
|
||||
public void changed(ChangeEvent changeEvent, Actor actor) {
|
||||
HyperLap2DFacade facade = HyperLap2DFacade.getInstance();
|
||||
Facade facade = Facade.getInstance();
|
||||
String selected = ((EditableSelectBox) actor).getSelected();
|
||||
if(!lastSelected.equals(selected)) {
|
||||
lastSelected = selected;
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.badlogic.gdx.scenes.scene2d.EventListener;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.FocusListener;
|
||||
import com.kotcrab.vis.ui.widget.VisTextField;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/15/2015.
|
||||
@@ -98,7 +98,7 @@ public class KeyboardListener implements EventListener {
|
||||
|
||||
lastValue = target.getText();
|
||||
|
||||
HyperLap2DFacade facade = HyperLap2DFacade.getInstance();
|
||||
Facade facade = Facade.getInstance();
|
||||
facade.sendNotification(eventName, target.getText());
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package games.rednblack.editor.event;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by CyberJoe on 4/21/2015.
|
||||
@@ -14,7 +14,7 @@ public class MenuItemListener extends ChangeListener {
|
||||
private final String menuType;
|
||||
private final Object data;
|
||||
|
||||
private HyperLap2DFacade facade;
|
||||
private final Facade facade;
|
||||
|
||||
public MenuItemListener(String menuCommand) {
|
||||
this(menuCommand, null, null);
|
||||
@@ -29,7 +29,7 @@ public class MenuItemListener extends ChangeListener {
|
||||
this.data = data;
|
||||
this.menuType = menuType;
|
||||
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
facade = Facade.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,7 +21,7 @@ package games.rednblack.editor.event;
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||
import com.kotcrab.vis.ui.widget.spinner.Spinner;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 6/12/2015.
|
||||
@@ -36,7 +36,7 @@ public class NumberSelectorOverlapListener extends ChangeListener {
|
||||
|
||||
@Override
|
||||
public void changed(ChangeEvent event, Actor actor) {
|
||||
HyperLap2DFacade facade = HyperLap2DFacade.getInstance();
|
||||
Facade facade = Facade.getInstance();
|
||||
facade.sendNotification(eventName, ((Spinner)actor).getTextField().getText());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package games.rednblack.editor.event;
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||
import com.kotcrab.vis.ui.widget.VisSelectBox;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/16/2015.
|
||||
@@ -38,7 +38,7 @@ public class SelectBoxChangeListener extends ChangeListener {
|
||||
|
||||
@Override
|
||||
public void changed(ChangeEvent changeEvent, Actor actor) {
|
||||
HyperLap2DFacade facade = HyperLap2DFacade.getInstance();
|
||||
Facade facade = Facade.getInstance();
|
||||
String selected = (String) ((VisSelectBox) actor).getSelected();
|
||||
if(!lastSelected.equals(selected)) {
|
||||
lastSelected = selected;
|
||||
|
||||
@@ -3,8 +3,6 @@ package games.rednblack.editor.factory;
|
||||
import com.badlogic.gdx.math.MathUtils;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Pools;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.PasteItemsCommand;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.proxy.ResourceManager;
|
||||
import games.rednblack.editor.renderer.SceneLoader;
|
||||
@@ -21,6 +19,7 @@ import games.rednblack.h2d.common.factory.IFactory;
|
||||
import games.rednblack.h2d.extension.spine.SpineItemType;
|
||||
import games.rednblack.h2d.extension.talos.TalosItemType;
|
||||
import games.rednblack.h2d.extension.tinyvg.TinyVGItemType;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -48,7 +47,7 @@ public class ItemFactory implements IFactory {
|
||||
}
|
||||
|
||||
private boolean setEssentialData(MainItemVO vo, Vector2 position) {
|
||||
UILayerBoxMediator layerBoxMediator = HyperLap2DFacade.getInstance().retrieveMediator(UILayerBoxMediator.NAME);
|
||||
UILayerBoxMediator layerBoxMediator = Facade.getInstance().retrieveMediator(UILayerBoxMediator.NAME);
|
||||
String layerName = layerBoxMediator.getCurrentSelectedLayerName();
|
||||
|
||||
if(layerName == null) return false;
|
||||
@@ -66,7 +65,7 @@ public class ItemFactory implements IFactory {
|
||||
}
|
||||
|
||||
private boolean setEssentialData(ComponentFactory.InitialData vo, Vector2 position) {
|
||||
UILayerBoxMediator layerBoxMediator = HyperLap2DFacade.getInstance().retrieveMediator(UILayerBoxMediator.NAME);
|
||||
UILayerBoxMediator layerBoxMediator = Facade.getInstance().retrieveMediator(UILayerBoxMediator.NAME);
|
||||
String layerName = layerBoxMediator.getCurrentSelectedLayerName();
|
||||
|
||||
if(layerName == null) return false;
|
||||
@@ -94,7 +93,7 @@ public class ItemFactory implements IFactory {
|
||||
data.data = regionName;
|
||||
|
||||
createdEntity = entityFactory.createEntity(sandbox.getCurrentViewingEntity(), EntityFactory.IMAGE_TYPE, data);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
|
||||
Pools.free(data);
|
||||
return true;
|
||||
@@ -114,7 +113,7 @@ public class ItemFactory implements IFactory {
|
||||
data.data = regionName;
|
||||
|
||||
createdEntity = entityFactory.createEntity(sandbox.getCurrentViewingEntity(), EntityFactory.NINE_PATCH, data);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
|
||||
Pools.free(data);
|
||||
return true;
|
||||
@@ -130,7 +129,7 @@ public class ItemFactory implements IFactory {
|
||||
data.data = animationName;
|
||||
|
||||
createdEntity = entityFactory.createEntity(sandbox.getCurrentViewingEntity(), EntityFactory.SPRITE_TYPE, data);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
|
||||
Pools.free(data);
|
||||
return true;
|
||||
@@ -146,7 +145,7 @@ public class ItemFactory implements IFactory {
|
||||
data.data = animationName;
|
||||
|
||||
createdEntity = entityFactory.createEntity(sandbox.getCurrentViewingEntity(), SpineItemType.SPINE_TYPE, data);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
|
||||
Pools.free(data);
|
||||
return true;
|
||||
@@ -163,14 +162,14 @@ public class ItemFactory implements IFactory {
|
||||
params[0] = shape.clone().vertices;
|
||||
params[1] = shape.clone().polygonizedVertices;
|
||||
createdEntity = entityFactory.createEntity(sandbox.getCurrentViewingEntity(), EntityFactory.COLOR_PRIMITIVE, data);
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
Pools.free(data);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean createItemFromLibrary(String libraryName, Vector2 position) {
|
||||
ProjectManager projectManager = HyperLap2DFacade.getInstance().retrieveProxy(ProjectManager.NAME);
|
||||
ProjectManager projectManager = Facade.getInstance().retrieveProxy(ProjectManager.NAME);
|
||||
HashMap<String, CompositeItemVO> libraryItems = projectManager.currentProjectInfoVO.libraryItems;
|
||||
|
||||
CompositeItemVO itemVO = libraryItems.get(libraryName);
|
||||
@@ -183,7 +182,7 @@ public class ItemFactory implements IFactory {
|
||||
MainItemComponent mainItemComponent = SandboxComponentRetriever.get(createdEntity, MainItemComponent.class);
|
||||
mainItemComponent.libraryLink = libraryName;
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, createdEntity);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -213,7 +212,7 @@ public class ItemFactory implements IFactory {
|
||||
|
||||
int entity = entityFactory.createEntity(sandbox.getCurrentViewingEntity(), EntityFactory.LIGHT_TYPE, data);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, entity);
|
||||
|
||||
Pools.free(data);
|
||||
return entity;
|
||||
@@ -233,7 +232,7 @@ public class ItemFactory implements IFactory {
|
||||
data.data = name;
|
||||
int entity = entityFactory.createEntity(sandbox.getCurrentViewingEntity(), TinyVGItemType.TINYVG_TYPE, data);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, entity);
|
||||
Pools.free(data);
|
||||
return entity;
|
||||
}
|
||||
@@ -252,7 +251,7 @@ public class ItemFactory implements IFactory {
|
||||
data.data = particleName;
|
||||
int entity = entityFactory.createEntity(sandbox.getCurrentViewingEntity(), EntityFactory.PARTICLE_TYPE, data);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, entity);
|
||||
Pools.free(data);
|
||||
return entity;
|
||||
}
|
||||
@@ -271,7 +270,7 @@ public class ItemFactory implements IFactory {
|
||||
data.data = particleName;
|
||||
int entity = entityFactory.createEntity(sandbox.getCurrentViewingEntity(), TalosItemType.TALOS_TYPE, data);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, entity);
|
||||
|
||||
Pools.free(data);
|
||||
return entity;
|
||||
@@ -283,7 +282,7 @@ public class ItemFactory implements IFactory {
|
||||
Pools.free(data);
|
||||
return -1;
|
||||
}
|
||||
HyperLap2DFacade facade = HyperLap2DFacade.getInstance();
|
||||
Facade facade = Facade.getInstance();
|
||||
ResourceManager resourceManager = facade.retrieveProxy(ResourceManager.NAME);
|
||||
|
||||
resourceManager.prepareEmbeddingFont(textSettings.getFontFamily(), textSettings.getFontSize(), false);
|
||||
@@ -298,7 +297,7 @@ public class ItemFactory implements IFactory {
|
||||
|
||||
int entity = entityFactory.createEntity(sandbox.getCurrentViewingEntity(), EntityFactory.LABEL_TYPE, data);
|
||||
|
||||
HyperLap2DFacade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, entity);
|
||||
Facade.getInstance().sendNotification(MsgAPI.ACTION_CREATE_ITEM, entity);
|
||||
Pools.free(data);
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.badlogic.gdx.math.Vector3;
|
||||
import com.badlogic.gdx.physics.box2d.Box2DDebugRenderer;
|
||||
import com.badlogic.gdx.utils.viewport.ExtendViewport;
|
||||
import com.badlogic.gdx.utils.viewport.Viewport;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.proxy.ResolutionManager;
|
||||
import games.rednblack.editor.proxy.ResourceManager;
|
||||
@@ -25,7 +24,7 @@ import games.rednblack.h2d.extension.talos.TalosItemType;
|
||||
import games.rednblack.h2d.extension.tinyvg.TinyVGItemType;
|
||||
import games.rednblack.h2d.extension.typinglabel.TypingLabelItemType;
|
||||
import games.rednblack.h2d.extension.spine.SpineItemType;
|
||||
import org.puremvc.java.interfaces.IFacade;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
|
||||
public class LivePreviewScreen extends ScreenAdapter implements GestureDetector.GestureListener {
|
||||
private final Vector3 vec3Zero = new Vector3(0, 0, 0);
|
||||
@@ -37,7 +36,7 @@ public class LivePreviewScreen extends ScreenAdapter implements GestureDetector.
|
||||
private final ProjectManager projectManager;
|
||||
|
||||
private final Box2DDebugRenderer mBox2DDebugRenderer;
|
||||
private final IFacade facade = HyperLap2DFacade.getInstance();
|
||||
private final Facade facade = Facade.getInstance();
|
||||
private final Color bgColor;
|
||||
|
||||
private final OrthographicCamera mCamera;
|
||||
|
||||
@@ -18,11 +18,10 @@
|
||||
|
||||
package games.rednblack.editor.proxy;
|
||||
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.HistoricRevertibleCommand;
|
||||
import games.rednblack.editor.controller.commands.RevertibleCommand;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import org.puremvc.java.patterns.proxy.Proxy;
|
||||
import games.rednblack.puremvc.Proxy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -36,13 +35,7 @@ public class CommandManager extends Proxy {
|
||||
final private ArrayList<RevertibleCommand> commands = new ArrayList<>();
|
||||
|
||||
public CommandManager() {
|
||||
super(NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegister() {
|
||||
super.onRegister();
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
super(NAME, null);
|
||||
}
|
||||
|
||||
public void addCommand(RevertibleCommand revertibleCommand) {
|
||||
|
||||
@@ -4,13 +4,13 @@ import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Preferences;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.AppConfig;
|
||||
import games.rednblack.editor.utils.NativeDialogs;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.Proxy;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
import org.puremvc.java.patterns.proxy.Proxy;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
@@ -34,13 +34,12 @@ public class FontManager extends Proxy {
|
||||
private HashMap<String, String> systemFontMap = new HashMap<>();
|
||||
|
||||
public FontManager() {
|
||||
super(NAME);
|
||||
super(NAME, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegister() {
|
||||
super.onRegister();
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
prefs = Gdx.app.getPreferences(cache_name);
|
||||
generateFontsMap();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.scenes.scene2d.Stage;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.kotcrab.vis.ui.widget.VisImageButton;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.controller.commands.PluginItemCommand;
|
||||
import games.rednblack.editor.factory.ItemFactory;
|
||||
import games.rednblack.editor.renderer.SceneLoader;
|
||||
@@ -51,8 +50,8 @@ import games.rednblack.h2d.common.vo.CursorData;
|
||||
import games.rednblack.h2d.common.vo.EditorConfigVO;
|
||||
import games.rednblack.h2d.common.vo.ProjectVO;
|
||||
import games.rednblack.h2d.common.vo.SceneConfigVO;
|
||||
import org.puremvc.java.interfaces.IFacade;
|
||||
import org.puremvc.java.patterns.proxy.Proxy;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.Proxy;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -69,8 +68,7 @@ public class PluginManager extends Proxy implements PluginAPI {
|
||||
private HashSet<Integer> pluginEntities;
|
||||
|
||||
public PluginManager() {
|
||||
super(NAME);
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
super(NAME, null);
|
||||
}
|
||||
|
||||
public H2DPlugin registerPlugin(H2DPlugin plugin) {
|
||||
@@ -135,7 +133,7 @@ public class PluginManager extends Proxy implements PluginAPI {
|
||||
|
||||
@Override
|
||||
public void removeFollower(int entity) {
|
||||
FollowersUIMediator followersUIMediator = HyperLap2DFacade.getInstance().retrieveMediator(FollowersUIMediator.NAME);
|
||||
FollowersUIMediator followersUIMediator = Facade.getInstance().retrieveMediator(FollowersUIMediator.NAME);
|
||||
followersUIMediator.removeFollower(entity);
|
||||
}
|
||||
|
||||
@@ -206,7 +204,7 @@ public class PluginManager extends Proxy implements PluginAPI {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFacade getFacade() {
|
||||
public Facade getFacade() {
|
||||
return facade;
|
||||
}
|
||||
|
||||
@@ -258,7 +256,7 @@ public class PluginManager extends Proxy implements PluginAPI {
|
||||
|
||||
@Override
|
||||
public void setCursor(CursorData cursorData, TextureRegion region) {
|
||||
CursorManager cursorManager = HyperLap2DFacade.getInstance().retrieveProxy(CursorManager.NAME);
|
||||
CursorManager cursorManager = Facade.getInstance().retrieveProxy(CursorManager.NAME);
|
||||
cursorManager.setCursor(cursorData, region);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import com.kotcrab.vis.ui.util.dialog.Dialogs;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.data.manager.PreferencesManager;
|
||||
import games.rednblack.editor.data.migrations.ProjectVersionMigrator;
|
||||
import games.rednblack.editor.renderer.data.*;
|
||||
@@ -45,6 +44,8 @@ import games.rednblack.h2d.common.ProgressHandler;
|
||||
import games.rednblack.h2d.common.vo.ProjectVO;
|
||||
import games.rednblack.h2d.common.vo.SceneConfigVO;
|
||||
import games.rednblack.h2d.common.vo.TexturePackerVO;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.Proxy;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.io.monitor.FileAlterationListener;
|
||||
@@ -52,7 +53,6 @@ import org.apache.commons.io.monitor.FileAlterationListenerAdaptor;
|
||||
import org.apache.commons.io.monitor.FileAlterationMonitor;
|
||||
import org.apache.commons.io.monitor.FileAlterationObserver;
|
||||
import org.lwjgl.util.tinyfd.TinyFileDialogs;
|
||||
import org.puremvc.java.patterns.proxy.Proxy;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -87,7 +87,7 @@ public class ProjectManager extends Proxy {
|
||||
private String currentProjectPath;
|
||||
|
||||
public ProjectManager() {
|
||||
super(NAME);
|
||||
super(NAME, null);
|
||||
}
|
||||
|
||||
private ProjectExportSettings projectExportSettings;
|
||||
@@ -98,7 +98,6 @@ public class ProjectManager extends Proxy {
|
||||
@Override
|
||||
public void onRegister() {
|
||||
super.onRegister();
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
|
||||
projectExportSettings = new ProjectExportSettings();
|
||||
livePreviewSettings = new LivePreviewSettings();
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.ObjectMap;
|
||||
import com.kotcrab.vis.ui.util.dialog.Dialogs;
|
||||
import com.mortennobel.imagescaling.ResampleOp;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.data.ProjectInfoVO;
|
||||
import games.rednblack.editor.renderer.data.ResolutionEntryVO;
|
||||
import games.rednblack.editor.renderer.data.TexturePackVO;
|
||||
@@ -34,9 +33,10 @@ import games.rednblack.editor.utils.NinePatchUtils;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.ProgressHandler;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.Proxy;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.puremvc.java.patterns.proxy.Proxy;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
@@ -63,7 +63,7 @@ public class ResolutionManager extends Proxy {
|
||||
private ProgressHandler handler;
|
||||
|
||||
public ResolutionManager() {
|
||||
super(NAME);
|
||||
super(NAME, null);
|
||||
}
|
||||
|
||||
public static BufferedImage imageResize(File file, float ratio) {
|
||||
@@ -132,7 +132,6 @@ public class ResolutionManager extends Proxy {
|
||||
@Override
|
||||
public void onRegister() {
|
||||
super.onRegister();
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
}
|
||||
|
||||
public void createNewResolution(ResolutionEntryVO resolutionEntryVO) {
|
||||
@@ -153,7 +152,7 @@ public class ResolutionManager extends Proxy {
|
||||
if (resizeWarnings > 0) {
|
||||
Dialogs.showOKDialog(Sandbox.getInstance().getUIStage(), "Warning", resizeWarnings + " images were not resized for smaller resolutions due to already small size ( < 3px )");
|
||||
}
|
||||
HyperLap2DFacade.getInstance().sendNotification(RESOLUTION_LIST_CHANGED);
|
||||
Facade.getInstance().sendNotification(RESOLUTION_LIST_CHANGED);
|
||||
});
|
||||
executor.execute(() -> {
|
||||
try {
|
||||
@@ -371,7 +370,7 @@ public class ResolutionManager extends Proxy {
|
||||
|
||||
ProjectInfoVO projectInfo = projectManager.getCurrentProjectInfoVO();
|
||||
projectInfo.resolutions.removeValue(resolutionEntryVO, false);
|
||||
HyperLap2DFacade.getInstance().sendNotification(RESOLUTION_LIST_CHANGED);
|
||||
Facade.getInstance().sendNotification(RESOLUTION_LIST_CHANGED);
|
||||
projectManager.saveCurrentProject();
|
||||
projectManager.openProjectAndLoadAllData(projectManager.getCurrentProjectPath(), "orig");
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.talosvfx.talos.runtime.ParticleEffectDescriptor;
|
||||
import com.talosvfx.talos.runtime.utils.ShaderDescriptor;
|
||||
import com.talosvfx.talos.runtime.utils.VectorField;
|
||||
import dev.lyze.gdxtinyvg.TinyVG;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.data.*;
|
||||
import games.rednblack.editor.renderer.resources.FontSizePair;
|
||||
import games.rednblack.editor.renderer.resources.IResourceRetriever;
|
||||
@@ -33,9 +32,9 @@ import games.rednblack.h2d.extension.talos.ResourceRetrieverAssetProvider;
|
||||
import games.rednblack.h2d.extension.talos.TalosItemType;
|
||||
import games.rednblack.h2d.extension.tinyvg.TinyVGItemType;
|
||||
import games.rednblack.h2d.extension.tinyvg.TinyVGUtils;
|
||||
import games.rednblack.puremvc.Proxy;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.puremvc.java.patterns.proxy.Proxy;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
@@ -72,13 +71,12 @@ public class ResourceManager extends Proxy implements IResourceRetriever {
|
||||
private PixmapPacker fontPacker;
|
||||
|
||||
public ResourceManager() {
|
||||
super(NAME);
|
||||
super(NAME, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegister() {
|
||||
super.onRegister();
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
resolutionManager = facade.retrieveProxy(ResolutionManager.NAME);
|
||||
settingsManager = facade.retrieveProxy(SettingsManager.NAME);
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@ import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.data.CompositeItemVO;
|
||||
import games.rednblack.editor.renderer.data.MainItemVO;
|
||||
import games.rednblack.editor.renderer.data.SceneVO;
|
||||
import games.rednblack.editor.renderer.utils.HyperJson;
|
||||
import games.rednblack.puremvc.Proxy;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.puremvc.java.patterns.proxy.Proxy;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -43,13 +42,7 @@ public class SceneDataManager extends Proxy {
|
||||
public static final String NAME = TAG;
|
||||
|
||||
public SceneDataManager() {
|
||||
super(NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegister() {
|
||||
super.onRegister();
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
super(NAME, null);
|
||||
}
|
||||
|
||||
public SceneVO createNewScene(String name) {
|
||||
|
||||
@@ -3,15 +3,15 @@ package games.rednblack.editor.proxy;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import games.rednblack.editor.CustomExceptionHandler;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.Main;
|
||||
import games.rednblack.editor.renderer.utils.HyperJson;
|
||||
import games.rednblack.editor.utils.HyperLap2DUtils;
|
||||
import games.rednblack.editor.utils.KeyBindingsLayout;
|
||||
import games.rednblack.h2d.common.vo.EditorConfigVO;
|
||||
import games.rednblack.puremvc.Facade;
|
||||
import games.rednblack.puremvc.Proxy;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.puremvc.java.patterns.proxy.Proxy;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.List;
|
||||
@@ -29,14 +29,13 @@ public class SettingsManager extends Proxy {
|
||||
public File cacheDir;
|
||||
|
||||
public SettingsManager() {
|
||||
super(NAME);
|
||||
super(NAME, null);
|
||||
initWorkspace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegister() {
|
||||
super.onRegister();
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
KeyBindingsLayout.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package games.rednblack.editor.proxy;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.view.ui.UIWindowTitle;
|
||||
import games.rednblack.editor.view.ui.UIWindowTitleMediator;
|
||||
import org.puremvc.java.patterns.proxy.Proxy;
|
||||
import games.rednblack.puremvc.Proxy;
|
||||
|
||||
public class WindowTitleManager extends Proxy {
|
||||
private static final String TAG = WindowTitleManager.class.getCanonicalName();
|
||||
@@ -13,13 +12,7 @@ public class WindowTitleManager extends Proxy {
|
||||
private String currentWindowTitle = "";
|
||||
|
||||
public WindowTitleManager() {
|
||||
super(NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegister() {
|
||||
super.onRegister();
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
super(NAME, null);
|
||||
}
|
||||
|
||||
public void setWindowTitle(String title) {
|
||||
|
||||
@@ -3,15 +3,15 @@ package games.rednblack.editor.splash;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import games.rednblack.editor.HyperLap2DApp;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.renderer.utils.Version;
|
||||
import games.rednblack.editor.utils.AppConfig;
|
||||
import games.rednblack.h2d.common.network.HttpDownloadUtility;
|
||||
import games.rednblack.h2d.common.network.model.GithubReleaseData;
|
||||
import games.rednblack.h2d.common.network.model.SnapshotReleaseData;
|
||||
import games.rednblack.puremvc.Mediator;
|
||||
import games.rednblack.puremvc.interfaces.INotification;
|
||||
import games.rednblack.puremvc.util.Interests;
|
||||
import org.lwjgl.util.tinyfd.TinyFileDialogs;
|
||||
import org.puremvc.java.interfaces.INotification;
|
||||
import org.puremvc.java.patterns.mediator.Mediator;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
@@ -26,17 +26,9 @@ public class SplashMediator extends Mediator<Object> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegister() {
|
||||
super.onRegister();
|
||||
facade = HyperLap2DFacade.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] listNotificationInterests() {
|
||||
return new String[]{
|
||||
SplashScreenAdapter.UPDATE_SPLASH,
|
||||
SplashScreenAdapter.CLOSE_SPLASH
|
||||
};
|
||||
public void listNotificationInterests(Interests interests) {
|
||||
interests.add(SplashScreenAdapter.UPDATE_SPLASH,
|
||||
SplashScreenAdapter.CLOSE_SPLASH);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user