Make StandardWidgetsFactory public for plugins
This commit is contained in:
Binary file not shown.
+3
-20
@@ -16,7 +16,7 @@
|
||||
* *****************************************************************************
|
||||
*/
|
||||
|
||||
package games.rednblack.editor.proxy;
|
||||
package games.rednblack.h2d.common.proxy;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.Cursor;
|
||||
@@ -24,6 +24,7 @@ import com.badlogic.gdx.graphics.Pixmap;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.puremvc.patterns.proxy.BaseProxy;
|
||||
import games.rednblack.h2d.common.view.ui.Cursors;
|
||||
import games.rednblack.h2d.common.vo.CursorData;
|
||||
|
||||
/**
|
||||
@@ -33,31 +34,13 @@ public class CursorManager extends BaseProxy {
|
||||
private static final String TAG = CursorManager.class.getCanonicalName();
|
||||
public static final String NAME = TAG;
|
||||
|
||||
public static CursorData NORMAL = new CursorData(Cursor.SystemCursor.Arrow);
|
||||
public static CursorData CROSS = new CursorData("cross", 14, 14);
|
||||
public static CursorData TEXT = new CursorData(Cursor.SystemCursor.Ibeam);
|
||||
public static CursorData TEXT_TOOL = new CursorData("label-tool", 15, 17);
|
||||
public static CursorData FINGER = new CursorData("fingerpoint", 16, 9);
|
||||
public static CursorData EYEDROPPER = new CursorData("eyedropper", 10, 23);
|
||||
public static CursorData HAND = new CursorData(Cursor.SystemCursor.Hand);
|
||||
|
||||
public static CursorData ROTATION_LB = new CursorData("left-rotate-down", 15, 18);
|
||||
public static CursorData ROTATION_LT = new CursorData("left-rotate-up", 15, 15);
|
||||
public static CursorData ROTATION_RT = new CursorData("right-rotate-up", 18, 15);
|
||||
public static CursorData ROTATION_RB = new CursorData("right-rotate-down", 18, 18);
|
||||
|
||||
public static CursorData TRANSFORM_LEFT_RIGHT = new CursorData("left-down-up", 17, 16);
|
||||
public static CursorData TRANSFORM_RIGHT_LEFT = new CursorData("right-down-up", 17, 16);
|
||||
public static CursorData TRANSFORM_HORIZONTAL = new CursorData("left-right", 17, 16);
|
||||
public static CursorData TRANSFORM_VERTICAL = new CursorData("up-down", 17, 16);
|
||||
|
||||
private CursorData cursor;
|
||||
private CursorData overrideCursor = null;
|
||||
|
||||
public CursorManager() {
|
||||
super(NAME);
|
||||
|
||||
setCursor(NORMAL);
|
||||
setCursor(Cursors.NORMAL);
|
||||
}
|
||||
|
||||
public void setCursor(CursorData cursor, TextureRegion region) {
|
||||
@@ -0,0 +1,24 @@
|
||||
package games.rednblack.h2d.common.view.ui;
|
||||
|
||||
import com.badlogic.gdx.graphics.Cursor;
|
||||
import games.rednblack.h2d.common.vo.CursorData;
|
||||
|
||||
public class Cursors {
|
||||
public static CursorData NORMAL = new CursorData(Cursor.SystemCursor.Arrow);
|
||||
public static CursorData CROSS = new CursorData("cross", 14, 14);
|
||||
public static CursorData TEXT = new CursorData(Cursor.SystemCursor.Ibeam);
|
||||
public static CursorData TEXT_TOOL = new CursorData("label-tool", 15, 17);
|
||||
public static CursorData FINGER = new CursorData("fingerpoint", 16, 9);
|
||||
public static CursorData EYEDROPPER = new CursorData("eyedropper", 10, 23);
|
||||
public static CursorData HAND = new CursorData(Cursor.SystemCursor.Hand);
|
||||
|
||||
public static CursorData ROTATION_LB = new CursorData("left-rotate-down", 15, 18);
|
||||
public static CursorData ROTATION_LT = new CursorData("left-rotate-up", 15, 15);
|
||||
public static CursorData ROTATION_RT = new CursorData("right-rotate-up", 18, 15);
|
||||
public static CursorData ROTATION_RB = new CursorData("right-rotate-down", 18, 18);
|
||||
|
||||
public static CursorData TRANSFORM_LEFT_RIGHT = new CursorData("left-down-up", 17, 16);
|
||||
public static CursorData TRANSFORM_RIGHT_LEFT = new CursorData("right-down-up", 17, 16);
|
||||
public static CursorData TRANSFORM_HORIZONTAL = new CursorData("left-right", 17, 16);
|
||||
public static CursorData TRANSFORM_VERTICAL = new CursorData("up-down", 17, 16);
|
||||
}
|
||||
+19
-14
@@ -16,7 +16,7 @@
|
||||
* *****************************************************************************
|
||||
*/
|
||||
|
||||
package games.rednblack.editor.utils;
|
||||
package games.rednblack.h2d.common.view.ui;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
@@ -31,16 +31,21 @@ import com.kotcrab.vis.ui.util.InputValidator;
|
||||
import com.kotcrab.vis.ui.widget.*;
|
||||
import com.kotcrab.vis.ui.widget.spinner.IntSpinnerModel;
|
||||
import com.kotcrab.vis.ui.widget.spinner.Spinner;
|
||||
import games.rednblack.editor.proxy.CursorManager;
|
||||
import games.rednblack.editor.view.ui.widget.CursorListener;
|
||||
import games.rednblack.editor.view.ui.widget.ScrollFocusListener;
|
||||
import games.rednblack.editor.view.ui.widget.components.TintButton;
|
||||
import com.puremvc.patterns.facade.Facade;
|
||||
import games.rednblack.h2d.common.view.ui.listener.CursorListener;
|
||||
import games.rednblack.h2d.common.view.ui.listener.ScrollFocusListener;
|
||||
import games.rednblack.h2d.common.view.ui.widget.TintButton;
|
||||
|
||||
/**
|
||||
* Creates standard widgets like labels or text fields with provided standard HyperLap2D specific visual style.
|
||||
*/
|
||||
public class StandardWidgetsFactory {
|
||||
|
||||
private static Facade facade;
|
||||
public static void init(Facade f) {
|
||||
facade = f;
|
||||
}
|
||||
|
||||
private StandardWidgetsFactory() {
|
||||
}
|
||||
|
||||
@@ -65,7 +70,7 @@ public class StandardWidgetsFactory {
|
||||
|
||||
public static VisTextField createTextField(String style) {
|
||||
VisTextField visTextField = new VisTextField("", style);
|
||||
visTextField.addListener(new CursorListener(CursorManager.TEXT));
|
||||
visTextField.addListener(new CursorListener(Cursors.TEXT, facade));
|
||||
return visTextField;
|
||||
}
|
||||
|
||||
@@ -74,7 +79,7 @@ public class StandardWidgetsFactory {
|
||||
Skin skin = VisUI.getSkin();
|
||||
visTextField.setStyle(skin.get(style, VisTextField.VisTextFieldStyle.class));
|
||||
if(textCursor)
|
||||
visTextField.addListener(new CursorListener(CursorManager.TEXT));
|
||||
visTextField.addListener(new CursorListener(Cursors.TEXT, facade));
|
||||
return visTextField;
|
||||
}
|
||||
|
||||
@@ -99,14 +104,14 @@ public class StandardWidgetsFactory {
|
||||
VisValidatableTextField visTextField = new VisValidatableTextField(inputValidator);
|
||||
Skin skin = VisUI.getSkin();
|
||||
visTextField.setStyle(skin.get(style, VisTextField.VisTextFieldStyle.class));
|
||||
visTextField.addListener(new CursorListener(CursorManager.TEXT));
|
||||
visTextField.addListener(new CursorListener(Cursors.TEXT, facade));
|
||||
return visTextField;
|
||||
}
|
||||
|
||||
public static VisValidatableTextField createValidableTextField (String style, InputValidator inputValidator, VisTextField.TextFieldFilter textFieldFilter) {
|
||||
VisValidatableTextField visTextField = createValidableTextField(style, inputValidator);
|
||||
visTextField.setTextFieldFilter(textFieldFilter);
|
||||
visTextField.addListener(new CursorListener(CursorManager.TEXT));
|
||||
visTextField.addListener(new CursorListener(Cursors.TEXT, facade));
|
||||
return visTextField;
|
||||
}
|
||||
|
||||
@@ -132,7 +137,7 @@ public class StandardWidgetsFactory {
|
||||
|
||||
public static VisTextArea createTextArea(String style) {
|
||||
VisTextArea visTextArea = new VisTextArea("", style);
|
||||
visTextArea.addListener(new CursorListener(CursorManager.TEXT));
|
||||
visTextArea.addListener(new CursorListener(Cursors.TEXT, facade));
|
||||
return visTextArea;
|
||||
}
|
||||
|
||||
@@ -142,7 +147,7 @@ public class StandardWidgetsFactory {
|
||||
|
||||
public static VisCheckBox createCheckBox(String text) {
|
||||
VisCheckBox visCheckBox = new VisCheckBox(text);
|
||||
visCheckBox.addListener(new CursorListener(CursorManager.FINGER));
|
||||
visCheckBox.addListener(new CursorListener(Cursors.FINGER, facade));
|
||||
return visCheckBox;
|
||||
}
|
||||
|
||||
@@ -153,7 +158,7 @@ public class StandardWidgetsFactory {
|
||||
public static <T> VisSelectBox<T> createSelectBox(String style, Class<T> type) {
|
||||
VisSelectBox<T> visSelectBox = new VisSelectBox<T>(style);
|
||||
visSelectBox.clearListeners();
|
||||
visSelectBox.addListener(new CursorListener(CursorManager.FINGER));
|
||||
visSelectBox.addListener(new CursorListener(Cursors.FINGER, facade));
|
||||
visSelectBox.addListener(new ClickListener() {
|
||||
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
|
||||
if (pointer == 0 && button != 0) return false;
|
||||
@@ -178,7 +183,7 @@ public class StandardWidgetsFactory {
|
||||
|
||||
public static TintButton createTintButton(int width, int height) {
|
||||
TintButton visCheckBox = new TintButton(width, height);
|
||||
visCheckBox.addListener(new CursorListener(CursorManager.EYEDROPPER));
|
||||
visCheckBox.addListener(new CursorListener(Cursors.EYEDROPPER, facade));
|
||||
return visCheckBox;
|
||||
}
|
||||
|
||||
@@ -212,7 +217,7 @@ public class StandardWidgetsFactory {
|
||||
|
||||
public static VisImageButton createImageButton(String style) {
|
||||
VisImageButton button = new VisImageButton(style);
|
||||
button.addListener(new CursorListener(CursorManager.FINGER));
|
||||
button.addListener(new CursorListener(Cursors.FINGER, facade));
|
||||
return button;
|
||||
}
|
||||
}
|
||||
+11
-14
@@ -16,34 +16,31 @@
|
||||
* *****************************************************************************
|
||||
*/
|
||||
|
||||
package games.rednblack.editor.view.ui.widget;
|
||||
package games.rednblack.h2d.common.view.ui.listener;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputListener;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.CursorManager;
|
||||
import com.puremvc.patterns.facade.Facade;
|
||||
import games.rednblack.h2d.common.proxy.CursorManager;
|
||||
import games.rednblack.h2d.common.vo.CursorData;
|
||||
|
||||
/**
|
||||
* Created by NateS
|
||||
*/
|
||||
public class CursorListener extends InputListener {
|
||||
private CursorData cursor;
|
||||
private CursorManager cursorManager;
|
||||
private final CursorData cursor;
|
||||
private final CursorManager cursorManager;
|
||||
|
||||
private CursorData prevCursor;
|
||||
|
||||
public CursorListener (CursorData cursor) {
|
||||
public CursorListener(CursorData cursor, Facade facade) {
|
||||
this.cursor = cursor;
|
||||
cursorManager = HyperLap2DFacade.getInstance().retrieveProxy(CursorManager.NAME);
|
||||
cursorManager = facade.retrieveProxy(CursorManager.NAME);
|
||||
}
|
||||
|
||||
public void enter (InputEvent event, float x, float y, int pointer, Actor fromActor) {
|
||||
@Override
|
||||
public void enter(InputEvent event, float x, float y, int pointer, Actor fromActor) {
|
||||
if (pointer == -1) cursorManager.setOverrideCursor(cursor);
|
||||
}
|
||||
|
||||
public void exit (InputEvent event, float x, float y, int pointer, Actor toActor) {
|
||||
@Override
|
||||
public void exit(InputEvent event, float x, float y, int pointer, Actor toActor) {
|
||||
if (pointer == -1) cursorManager.removeOverrideCursor();
|
||||
}
|
||||
}
|
||||
+1
-3
@@ -1,10 +1,8 @@
|
||||
package games.rednblack.editor.view.ui.widget;
|
||||
package games.rednblack.h2d.common.view.ui.listener;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputListener;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.SelectBox;
|
||||
|
||||
public class ScrollFocusListener extends InputListener {
|
||||
private Actor listenerActor;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package games.rednblack.editor.view.ui.widget.ui;
|
||||
package games.rednblack.h2d.common.view.ui.widget;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package games.rednblack.editor.view.ui.widget.ui;
|
||||
package games.rednblack.h2d.common.view.ui.widget;
|
||||
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
+2
-3
@@ -16,7 +16,7 @@
|
||||
* *****************************************************************************
|
||||
*/
|
||||
|
||||
package games.rednblack.editor.view.ui.widget;
|
||||
package games.rednblack.h2d.common.view.ui.widget;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
@@ -29,8 +29,7 @@ import com.kotcrab.vis.ui.widget.VisTextButton;
|
||||
import com.kotcrab.vis.ui.widget.VisTextField;
|
||||
import com.kotcrab.vis.ui.widget.file.FileChooser;
|
||||
import com.kotcrab.vis.ui.widget.file.FileChooserListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.widget.ui.HyperLapFileChooser;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by sargis on 4/3/15.
|
||||
+1
-3
@@ -16,8 +16,7 @@
|
||||
* *****************************************************************************
|
||||
*/
|
||||
|
||||
package games.rednblack.editor.view.ui.widget.components;
|
||||
|
||||
package games.rednblack.h2d.common.view.ui.widget;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.scenes.scene2d.Group;
|
||||
@@ -25,7 +24,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
|
||||
import com.kotcrab.vis.ui.VisUI;
|
||||
|
||||
|
||||
/**
|
||||
* Created by azakhary on 7/8/2014.
|
||||
*/
|
||||
+6
-5
@@ -1,25 +1,26 @@
|
||||
package games.rednblack.editor.plugin.skincomposer;
|
||||
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import com.kotcrab.vis.ui.widget.VisCheckBox;
|
||||
import com.puremvc.patterns.facade.Facade;
|
||||
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;
|
||||
|
||||
public class SkinComposerSettings extends SettingsNodeValue<SkinComposerVO> {
|
||||
|
||||
private final VisCheckBox alwaysCheckUpdates;
|
||||
private H2DPluginAdapter plugin;
|
||||
private Json json = new Json();
|
||||
private final H2DPluginAdapter plugin;
|
||||
|
||||
public SkinComposerSettings(Facade facade, H2DPluginAdapter plugin) {
|
||||
super("Skin Composer", facade);
|
||||
|
||||
this.plugin = plugin;
|
||||
|
||||
alwaysCheckUpdates = new VisCheckBox("Always check for updates");
|
||||
getContentTable().add(alwaysCheckUpdates).left().row();
|
||||
getContentTable().add("Updates").left().row();
|
||||
getContentTable().addSeparator();
|
||||
alwaysCheckUpdates = StandardWidgetsFactory.createCheckBox("Always check for updates");
|
||||
getContentTable().add(alwaysCheckUpdates).left().padTop(5).padLeft(8).row();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.puremvc.patterns.facade.SimpleFacade;
|
||||
import com.puremvc.patterns.observer.BaseNotification;
|
||||
import games.rednblack.editor.controller.StartupCommand;
|
||||
import games.rednblack.editor.splash.SplashMediator;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by sargis on 3/30/15.
|
||||
@@ -71,6 +72,7 @@ public class HyperLap2DFacade extends SimpleFacade {
|
||||
|
||||
@Override
|
||||
protected void initializeView() {
|
||||
StandardWidgetsFactory.init(this);
|
||||
super.initializeView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.puremvc.patterns.observer.Notification;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.*;
|
||||
import games.rednblack.editor.splash.SplashScreenAdapter;
|
||||
import games.rednblack.h2d.common.proxy.CursorManager;
|
||||
|
||||
/**
|
||||
* Created by sargis on 4/1/15.
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import games.rednblack.editor.proxy.ResourceManager;
|
||||
import games.rednblack.editor.renderer.data.*;
|
||||
import games.rednblack.editor.utils.ImportUtils;
|
||||
import games.rednblack.editor.utils.ZipUtils;
|
||||
import games.rednblack.editor.view.ui.widget.ui.HyperLapFileChooser;
|
||||
import games.rednblack.h2d.common.view.ui.widget.HyperLapFileChooser;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.vo.ExportMapperVO;
|
||||
import games.rednblack.h2d.common.vo.ExportMapperVO.ExportedAsset;
|
||||
|
||||
@@ -30,6 +30,7 @@ import games.rednblack.h2d.common.IItemCommand;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.plugins.H2DPlugin;
|
||||
import games.rednblack.h2d.common.plugins.PluginAPI;
|
||||
import games.rednblack.h2d.common.proxy.CursorManager;
|
||||
import games.rednblack.h2d.common.view.tools.Tool;
|
||||
import com.kotcrab.vis.ui.widget.VisImageButton;
|
||||
import com.puremvc.patterns.facade.Facade;
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.kotcrab.vis.ui.widget.file.FileTypeFilter;
|
||||
import games.rednblack.editor.proxy.SettingsManager;
|
||||
import games.rednblack.editor.view.ui.widget.ui.HyperLapFileChooser;
|
||||
import games.rednblack.h2d.common.view.ui.widget.HyperLapFileChooser;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import com.kotcrab.vis.ui.widget.file.FileChooser;
|
||||
import com.kotcrab.vis.ui.widget.file.FileChooserAdapter;
|
||||
|
||||
@@ -4,11 +4,12 @@ import com.badlogic.ashley.core.Entity;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import games.rednblack.editor.proxy.CursorManager;
|
||||
import games.rednblack.h2d.common.proxy.CursorManager;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.proxy.ResourceManager;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.h2d.common.view.ui.Cursors;
|
||||
import games.rednblack.h2d.common.vo.SceneConfigVO;
|
||||
|
||||
/**
|
||||
@@ -40,7 +41,7 @@ public class PanTool extends SimpleTool {
|
||||
@Override
|
||||
public void initTool() {
|
||||
CursorManager cursorManager = HyperLap2DFacade.getInstance().retrieveProxy(CursorManager.NAME);
|
||||
cursorManager.setCursor(CursorManager.HAND);
|
||||
cursorManager.setCursor(Cursors.HAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,7 @@ import com.badlogic.gdx.utils.viewport.Viewport;
|
||||
import com.kotcrab.vis.ui.util.OsUtils;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.CursorManager;
|
||||
import games.rednblack.h2d.common.proxy.CursorManager;
|
||||
import games.rednblack.editor.renderer.components.DimensionsComponent;
|
||||
import games.rednblack.editor.renderer.components.ParentNodeComponent;
|
||||
import games.rednblack.editor.renderer.components.TransformComponent;
|
||||
@@ -37,6 +37,7 @@ import games.rednblack.editor.renderer.utils.ComponentRetriever;
|
||||
import games.rednblack.editor.utils.EntityBounds;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.h2d.common.view.ui.Cursors;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -97,7 +98,7 @@ public class SelectionTool extends SimpleTool {
|
||||
|
||||
// set cursor
|
||||
CursorManager cursorManager = HyperLap2DFacade.getInstance().retrieveProxy(CursorManager.NAME);
|
||||
cursorManager.setCursor(CursorManager.NORMAL);
|
||||
cursorManager.setCursor(Cursors.NORMAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,15 +19,14 @@
|
||||
package games.rednblack.editor.view.stage.tools;
|
||||
|
||||
import com.badlogic.ashley.core.Entity;
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.kotcrab.vis.ui.util.OsUtils;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.factory.ItemFactory;
|
||||
import games.rednblack.editor.proxy.CursorManager;
|
||||
import games.rednblack.h2d.common.proxy.CursorManager;
|
||||
import games.rednblack.editor.renderer.factory.EntityFactory;
|
||||
import games.rednblack.h2d.common.view.ui.Cursors;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/30/2015.
|
||||
@@ -72,7 +71,7 @@ public class TextTool extends ItemDropTool {
|
||||
public void initTool() {
|
||||
super.initTool();
|
||||
CursorManager cursorManager = HyperLap2DFacade.getInstance().retrieveProxy(CursorManager.NAME);
|
||||
cursorManager.setCursor(CursorManager.TEXT_TOOL);
|
||||
cursorManager.setCursor(Cursors.TEXT_TOOL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,14 +21,12 @@ package games.rednblack.editor.view.stage.tools;
|
||||
import com.badlogic.ashley.core.Entity;
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.NumberUtils;
|
||||
import com.kotcrab.vis.ui.util.OsUtils;
|
||||
import games.rednblack.editor.renderer.components.PolygonComponent;
|
||||
import games.rednblack.editor.view.stage.tools.transformStrategy.*;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import com.puremvc.patterns.observer.Notification;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.CursorManager;
|
||||
import games.rednblack.h2d.common.proxy.CursorManager;
|
||||
import games.rednblack.editor.renderer.components.TransformComponent;
|
||||
import games.rednblack.editor.renderer.factory.EntityFactory;
|
||||
import games.rednblack.editor.renderer.utils.ComponentRetriever;
|
||||
@@ -38,6 +36,7 @@ import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.editor.view.ui.FollowersUIMediator;
|
||||
import games.rednblack.editor.view.ui.followers.FollowerTransformationListener;
|
||||
import games.rednblack.editor.view.ui.followers.NormalSelectionFollower;
|
||||
import games.rednblack.h2d.common.view.ui.Cursors;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@@ -96,7 +95,7 @@ public class TransformTool extends SelectionTool implements FollowerTransformati
|
||||
|
||||
// set cursor
|
||||
cursorManager = HyperLap2DFacade.getInstance().retrieveProxy(CursorManager.NAME);
|
||||
cursorManager.setCursor(CursorManager.CROSS);
|
||||
cursorManager.setCursor(Cursors.CROSS);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -210,49 +209,49 @@ public class TransformTool extends SelectionTool implements FollowerTransformati
|
||||
public void anchorMouseEnter(NormalSelectionFollower follower, int anchor, float x, float y) {
|
||||
switch (anchor) {
|
||||
case NormalSelectionFollower.ROTATION_LB:
|
||||
cursorManager.setCursor(CursorManager.ROTATION_LB);
|
||||
cursorManager.setCursor(Cursors.ROTATION_LB);
|
||||
break;
|
||||
case NormalSelectionFollower.ROTATION_LT:
|
||||
cursorManager.setCursor(CursorManager.ROTATION_LT);
|
||||
cursorManager.setCursor(Cursors.ROTATION_LT);
|
||||
break;
|
||||
case NormalSelectionFollower.ROTATION_RT:
|
||||
cursorManager.setCursor(CursorManager.ROTATION_RT);
|
||||
cursorManager.setCursor(Cursors.ROTATION_RT);
|
||||
break;
|
||||
case NormalSelectionFollower.ROTATION_RB:
|
||||
cursorManager.setCursor(CursorManager.ROTATION_RB);
|
||||
cursorManager.setCursor(Cursors.ROTATION_RB);
|
||||
break;
|
||||
case NormalSelectionFollower.LB:
|
||||
cursorManager.setCursor(CursorManager.TRANSFORM_LEFT_RIGHT);
|
||||
cursorManager.setCursor(Cursors.TRANSFORM_LEFT_RIGHT);
|
||||
break;
|
||||
case NormalSelectionFollower.L:
|
||||
cursorManager.setCursor(CursorManager.TRANSFORM_HORIZONTAL);
|
||||
cursorManager.setCursor(Cursors.TRANSFORM_HORIZONTAL);
|
||||
break;
|
||||
case NormalSelectionFollower.LT:
|
||||
cursorManager.setCursor(CursorManager.TRANSFORM_RIGHT_LEFT);
|
||||
cursorManager.setCursor(Cursors.TRANSFORM_RIGHT_LEFT);
|
||||
break;
|
||||
case NormalSelectionFollower.T:
|
||||
cursorManager.setCursor(CursorManager.TRANSFORM_VERTICAL);
|
||||
cursorManager.setCursor(Cursors.TRANSFORM_VERTICAL);
|
||||
break;
|
||||
case NormalSelectionFollower.RT:
|
||||
cursorManager.setCursor(CursorManager.TRANSFORM_LEFT_RIGHT);
|
||||
cursorManager.setCursor(Cursors.TRANSFORM_LEFT_RIGHT);
|
||||
break;
|
||||
case NormalSelectionFollower.R:
|
||||
cursorManager.setCursor(CursorManager.TRANSFORM_HORIZONTAL);
|
||||
cursorManager.setCursor(Cursors.TRANSFORM_HORIZONTAL);
|
||||
break;
|
||||
case NormalSelectionFollower.RB:
|
||||
cursorManager.setCursor(CursorManager.TRANSFORM_RIGHT_LEFT);
|
||||
cursorManager.setCursor(Cursors.TRANSFORM_RIGHT_LEFT);
|
||||
break;
|
||||
case NormalSelectionFollower.B:
|
||||
cursorManager.setCursor(CursorManager.TRANSFORM_VERTICAL);
|
||||
cursorManager.setCursor(Cursors.TRANSFORM_VERTICAL);
|
||||
break;
|
||||
default:
|
||||
cursorManager.setCursor(CursorManager.NORMAL);
|
||||
cursorManager.setCursor(Cursors.NORMAL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void anchorMouseExit(NormalSelectionFollower follower, int anchor, float x, float y) {
|
||||
cursorManager.setCursor(CursorManager.CROSS);
|
||||
cursorManager.setCursor(Cursors.CROSS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.kotcrab.vis.ui.VisUI;
|
||||
import com.kotcrab.vis.ui.widget.VisScrollPane;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.box.*;
|
||||
|
||||
public class UIBottomMenuBar extends VisTable {
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import com.kotcrab.vis.ui.widget.VisImageButton;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by sargis on 4/10/15.
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.HorizontalGroup;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import com.kotcrab.vis.ui.widget.VisImageTextButton;
|
||||
import com.kotcrab.vis.ui.widget.VisScrollPane;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by CyberJoe on 4/22/2015.
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
package games.rednblack.editor.view.ui.box;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.kotcrab.vis.ui.util.Validators;
|
||||
import com.kotcrab.vis.ui.widget.VisCheckBox;
|
||||
@@ -26,7 +25,7 @@ import com.kotcrab.vis.ui.widget.VisLabel;
|
||||
import com.kotcrab.vis.ui.widget.VisValidatableTextField;
|
||||
import games.rednblack.editor.event.CheckBoxChangeListener;
|
||||
import games.rednblack.editor.event.KeyboardListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/15/2015.
|
||||
|
||||
@@ -37,7 +37,7 @@ import games.rednblack.editor.renderer.components.NodeComponent;
|
||||
import games.rednblack.editor.renderer.components.ZIndexComponent;
|
||||
import games.rednblack.editor.renderer.factory.EntityFactory;
|
||||
import games.rednblack.editor.renderer.utils.ComponentRetriever;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.utils.runtime.EntityUtils;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.event.KeyboardListener;
|
||||
import games.rednblack.editor.renderer.data.LayerItemVO;
|
||||
import games.rednblack.editor.utils.InputFilters;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/17/2015.
|
||||
|
||||
@@ -3,7 +3,7 @@ package games.rednblack.editor.view.ui.box;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import com.kotcrab.vis.ui.widget.VisTextButton;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
public class UILivePreviewBox extends UIBaseBox {
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ package games.rednblack.editor.view.ui.box;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.kotcrab.vis.ui.widget.VisScrollPane;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.properties.UIAbstractProperties;
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.kotcrab.vis.ui.widget.VisTextButton;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.ResolutionManager;
|
||||
import games.rednblack.editor.renderer.data.ResolutionEntryVO;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
public class UIResolutionBox extends UIBaseBox {
|
||||
private static final String prefix = "games.rednblack.editor.view.ui.box.UIResolutionBox";
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.kotcrab.vis.ui.widget.VisSelectBox;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.renderer.data.SceneVO;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
|
||||
public class UISceneBox extends UIBaseBox {
|
||||
|
||||
@@ -26,7 +26,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import com.kotcrab.vis.ui.widget.VisImageButton;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.tools.Tool;
|
||||
|
||||
public class UIToolBox extends VisTable {
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.kotcrab.vis.ui.widget.VisImageButton;
|
||||
import com.kotcrab.vis.ui.widget.VisTextField;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.event.KeyboardListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by sargis on 4/27/15.
|
||||
|
||||
+1
-2
@@ -19,11 +19,10 @@
|
||||
package games.rednblack.editor.view.ui.box.resourcespanel;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.kotcrab.vis.ui.widget.VisScrollPane;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.box.resourcespanel.draggable.DraggableResource;
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.kotcrab.vis.ui.widget.VisScrollPane;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.box.resourcespanel.draggable.DraggableResource;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.kotcrab.vis.ui.widget.VisScrollPane;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.box.resourcespanel.draggable.DraggableResource;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.kotcrab.vis.ui.widget.VisScrollPane;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.box.resourcespanel.draggable.DraggableResource;
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import com.kotcrab.vis.ui.widget.VisTextField;
|
||||
import com.kotcrab.vis.ui.widget.tabbedpane.Tab;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by sargis on 5/4/15.
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.box.resourcespanel.draggable.box.BoxItemResource;
|
||||
import games.rednblack.h2d.common.ResourcePayloadObject;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
|
||||
-2
@@ -24,8 +24,6 @@ import com.badlogic.gdx.scenes.scene2d.Group;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputListener;
|
||||
import com.puremvc.patterns.facade.SimpleFacade;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.box.UIResourcesBoxMediator;
|
||||
import games.rednblack.editor.view.ui.widget.actors.basic.PixelRect;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.editor.view.ui.box.resourcespanel.draggable.DraggableResourceView;
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.kotcrab.vis.ui.widget.VisImage;
|
||||
import com.kotcrab.vis.ui.widget.VisScrollPane;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.utils.AppConfig;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.H2DDialog;
|
||||
|
||||
public class AboutDialog extends H2DDialog {
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.kotcrab.vis.ui.widget.VisRadioButton;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import com.kotcrab.vis.ui.widget.VisTextButton;
|
||||
import com.kotcrab.vis.ui.widget.VisTextField;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.validator.StringNameValidator;
|
||||
import games.rednblack.h2d.common.H2DDialog;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
|
||||
@@ -24,14 +24,13 @@ import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.Stage;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.H2DDialog;
|
||||
import com.kotcrab.vis.ui.util.form.SimpleFormValidator;
|
||||
import com.kotcrab.vis.ui.widget.*;
|
||||
import com.kotcrab.vis.ui.widget.file.FileChooser;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.view.ui.validator.StringNameValidator;
|
||||
import games.rednblack.editor.view.ui.widget.InputFileWidget;
|
||||
import games.rednblack.h2d.common.view.ui.widget.InputFileWidget;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
||||
@@ -7,9 +7,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Tree;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import com.kotcrab.vis.ui.widget.*;
|
||||
import com.puremvc.patterns.facade.Facade;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.H2DDialog;
|
||||
import games.rednblack.h2d.common.view.SettingsNodeValue;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.kotcrab.vis.ui.VisUI;
|
||||
import com.puremvc.patterns.observer.Notification;
|
||||
import games.rednblack.editor.view.ui.widget.actors.basic.PixelRect;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.CursorManager;
|
||||
import games.rednblack.h2d.common.proxy.CursorManager;
|
||||
import games.rednblack.editor.view.stage.tools.TransformTool;
|
||||
import games.rednblack.editor.view.ui.widget.EmptyTarget;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ package games.rednblack.editor.view.ui.panel;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.scenes.scene2d.*;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
@@ -33,7 +32,7 @@ import com.kotcrab.vis.ui.widget.VisTextField;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.h2d.common.UIDraggablePanel;
|
||||
import games.rednblack.editor.renderer.utils.CustomVariables;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 5/12/2015.
|
||||
|
||||
@@ -22,9 +22,7 @@ import java.util.Map;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.kotcrab.vis.ui.widget.VisImageButton;
|
||||
import com.kotcrab.vis.ui.widget.VisLabel;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import com.kotcrab.vis.ui.widget.VisTextButton;
|
||||
import com.kotcrab.vis.ui.widget.VisTextField;
|
||||
@@ -34,7 +32,7 @@ import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.view.ui.validator.EmptyOrDefaultValidator;
|
||||
import games.rednblack.h2d.common.UIDraggablePanel;
|
||||
import games.rednblack.editor.renderer.data.FrameRange;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 5/12/2015.
|
||||
|
||||
@@ -36,7 +36,7 @@ import games.rednblack.h2d.common.ProgressHandler;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.view.stage.UIStage;
|
||||
import games.rednblack.editor.view.ui.widget.ui.HyperLapFileChooser;
|
||||
import games.rednblack.h2d.common.view.ui.widget.HyperLapFileChooser;
|
||||
|
||||
import java.awt.dnd.DropTargetDragEvent;
|
||||
import java.awt.dnd.DropTargetDropEvent;
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.badlogic.gdx.utils.Align;
|
||||
import games.rednblack.h2d.common.UIDraggablePanel;
|
||||
import com.kotcrab.vis.ui.widget.*;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import com.kotcrab.vis.ui.VisUI;
|
||||
import com.kotcrab.vis.ui.widget.CollapsibleWidget;
|
||||
import com.kotcrab.vis.ui.widget.VisImageButton;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/15/2015.
|
||||
|
||||
@@ -7,9 +7,8 @@ import com.kotcrab.vis.ui.VisUI;
|
||||
import com.kotcrab.vis.ui.util.dialog.Dialogs;
|
||||
import com.kotcrab.vis.ui.widget.VisImageButton;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
|
||||
/**
|
||||
* Created by CyberJoe on 7/2/2015.
|
||||
|
||||
+2
-2
@@ -32,11 +32,11 @@ import com.kotcrab.vis.ui.VisUI;
|
||||
import com.kotcrab.vis.ui.util.Validators;
|
||||
import com.kotcrab.vis.ui.widget.*;
|
||||
import games.rednblack.editor.event.ButtonToNotificationListener;
|
||||
import games.rednblack.editor.view.ui.widget.components.TintButton;
|
||||
import games.rednblack.h2d.common.view.ui.widget.TintButton;
|
||||
import games.rednblack.editor.event.CheckBoxChangeListener;
|
||||
import games.rednblack.editor.event.KeyboardListener;
|
||||
import games.rednblack.editor.view.ui.properties.UIItemProperties;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/15/2015.
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.reflect.ClassReflection;
|
||||
import com.badlogic.gdx.utils.reflect.ReflectionException;
|
||||
import games.rednblack.editor.renderer.components.light.LightBodyComponent;
|
||||
import games.rednblack.editor.view.ui.widget.ui.HyperLapColorPicker;
|
||||
import games.rednblack.h2d.common.view.ui.widget.HyperLapColorPicker;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import com.kotcrab.vis.ui.widget.color.ColorPicker;
|
||||
import com.kotcrab.vis.ui.widget.color.ColorPickerAdapter;
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ package games.rednblack.editor.view.ui.properties.panels;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.kotcrab.vis.ui.widget.VisCheckBox;
|
||||
import games.rednblack.editor.event.CheckBoxChangeListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.properties.UIItemCollapsibleProperties;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package games.rednblack.editor.view.ui.properties.panels;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.kotcrab.vis.ui.widget.VisSelectBox;
|
||||
import games.rednblack.editor.event.SelectBoxChangeListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.properties.UIItemCollapsibleProperties;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import com.kotcrab.vis.ui.widget.spinner.IntSpinnerModel;
|
||||
import com.kotcrab.vis.ui.widget.spinner.Spinner;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.event.*;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.properties.UIItemCollapsibleProperties;
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -13,9 +13,9 @@ import games.rednblack.editor.event.CheckBoxChangeListener;
|
||||
import games.rednblack.editor.event.KeyboardListener;
|
||||
import games.rednblack.editor.event.NumberSelectorOverlapListener;
|
||||
import games.rednblack.editor.event.SelectBoxChangeListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.properties.UIRemovableProperties;
|
||||
import games.rednblack.editor.view.ui.widget.components.TintButton;
|
||||
import games.rednblack.h2d.common.view.ui.widget.TintButton;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import games.rednblack.editor.renderer.components.light.LightBodyComponent;
|
||||
import games.rednblack.editor.renderer.data.LightBodyDataVO;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.editor.view.ui.properties.UIItemPropertiesMediator;
|
||||
import games.rednblack.editor.view.ui.widget.ui.HyperLapColorPicker;
|
||||
import games.rednblack.h2d.common.view.ui.widget.HyperLapColorPicker;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import com.kotcrab.vis.ui.widget.spinner.Spinner;
|
||||
import games.rednblack.editor.event.CheckBoxChangeListener;
|
||||
import games.rednblack.editor.event.KeyboardListener;
|
||||
import games.rednblack.editor.event.NumberSelectorOverlapListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.properties.UIItemCollapsibleProperties;
|
||||
import games.rednblack.editor.renderer.data.LightVO;
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.event.CheckBoxChangeListener;
|
||||
import games.rednblack.editor.event.KeyboardListener;
|
||||
import games.rednblack.editor.event.SelectBoxChangeListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.properties.UIRemovableProperties;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ import com.kotcrab.vis.ui.widget.*;
|
||||
import com.kotcrab.vis.ui.widget.spinner.Spinner;
|
||||
import games.rednblack.editor.event.NumberSelectorOverlapListener;
|
||||
import games.rednblack.editor.event.SelectBoxChangeListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.widget.components.TintButton;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.widget.TintButton;
|
||||
import games.rednblack.editor.event.CheckBoxChangeListener;
|
||||
import games.rednblack.editor.event.KeyboardListener;
|
||||
import games.rednblack.editor.view.ui.properties.UIAbstractProperties;
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import com.kotcrab.vis.ui.widget.color.ColorPickerAdapter;
|
||||
import games.rednblack.editor.proxy.ResolutionManager;
|
||||
import games.rednblack.editor.renderer.data.LightsPropertiesVO;
|
||||
import games.rednblack.editor.renderer.data.ResolutionEntryVO;
|
||||
import games.rednblack.editor.view.ui.widget.ui.HyperLapColorPicker;
|
||||
import games.rednblack.h2d.common.view.ui.widget.HyperLapColorPicker;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import com.kotcrab.vis.ui.widget.VisLabel;
|
||||
import com.kotcrab.vis.ui.widget.VisSelectBox;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.event.SelectBoxChangeListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.properties.UIRemovableProperties;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import com.badlogic.gdx.utils.Align;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.kotcrab.vis.ui.widget.VisSelectBox;
|
||||
import games.rednblack.editor.event.SelectBoxChangeListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.properties.UIItemCollapsibleProperties;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import com.kotcrab.vis.ui.widget.spinner.IntSpinnerModel;
|
||||
import com.kotcrab.vis.ui.widget.spinner.Spinner;
|
||||
import games.rednblack.editor.event.NumberSelectorOverlapListener;
|
||||
import games.rednblack.editor.event.SelectBoxChangeListener;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.properties.UIItemCollapsibleProperties;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -2,7 +2,7 @@ package games.rednblack.editor.view.ui.settings;
|
||||
|
||||
import com.kotcrab.vis.ui.widget.VisCheckBox;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.view.SettingsNodeValue;
|
||||
import games.rednblack.h2d.common.vo.EditorConfigVO;
|
||||
|
||||
@@ -3,7 +3,7 @@ package games.rednblack.editor.view.ui.settings;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.kotcrab.vis.ui.widget.VisLabel;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.SettingsNodeValue;
|
||||
|
||||
public class PluginsSettings extends SettingsNodeValue<String> {
|
||||
|
||||
@@ -10,9 +10,8 @@ import com.kotcrab.vis.ui.widget.file.FileChooser;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.proxy.ProjectManager;
|
||||
import games.rednblack.editor.proxy.ResolutionManager;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.editor.view.ui.dialog.SettingsDialog;
|
||||
import games.rednblack.editor.view.ui.widget.InputFileWidget;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.widget.InputFileWidget;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.view.SettingsNodeValue;
|
||||
import games.rednblack.h2d.common.vo.ProjectVO;
|
||||
|
||||
@@ -2,7 +2,7 @@ package games.rednblack.editor.view.ui.settings;
|
||||
|
||||
import com.kotcrab.vis.ui.widget.VisCheckBox;
|
||||
import games.rednblack.editor.HyperLap2DFacade;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.MsgAPI;
|
||||
import games.rednblack.h2d.common.view.SettingsNodeValue;
|
||||
import games.rednblack.h2d.common.vo.EditorConfigVO;
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.badlogic.gdx.utils.Array;
|
||||
import com.kotcrab.vis.ui.widget.VisSelectBox;
|
||||
import com.kotcrab.vis.ui.widget.VisTable;
|
||||
import com.kotcrab.vis.ui.widget.VisTextField;
|
||||
import games.rednblack.editor.utils.StandardWidgetsFactory;
|
||||
import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory;
|
||||
|
||||
/**
|
||||
* Created by azakhary on 4/30/2015.
|
||||
|
||||
@@ -1,34 +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.view.ui.widget;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Group;
|
||||
import games.rednblack.editor.view.ui.widget.actors.GridView;
|
||||
import games.rednblack.editor.view.ui.widget.actors.ResolutionBounds;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
|
||||
public class SandboxUI extends Group {
|
||||
|
||||
public SandboxUI(Sandbox s) {
|
||||
GridView gridView = new GridView();
|
||||
addActor(gridView);
|
||||
ResolutionBounds resolutionBounds = new ResolutionBounds(s);
|
||||
addActor(resolutionBounds);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user