Created starting point of sheet editor -- about 50% done.

This commit is contained in:
Brendan Robert 2016-06-06 08:08:22 -05:00
parent 4810c72423
commit 22ad31e1ca
10 changed files with 417 additions and 392 deletions

View File

@ -0,0 +1,62 @@
/*
* 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 org.badvision.outlaweditor;
import java.io.IOException;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import org.badvision.outlaweditor.data.xml.Sheet;
import org.badvision.outlaweditor.ui.impl.SheetEditorControllerImpl;
/**
* Edit a spreadsheet of information
*/
public class SheetEditor {
private final Sheet sheet;
private Stage primaryStage;
private SheetEditorControllerImpl controller;
public SheetEditor(Sheet sheet) {
this.sheet=sheet;
}
public Sheet getSheet() {
return sheet;
}
public void show() {
primaryStage = new Stage();
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/SheetEditor.fxml"));
// Map<String, String> properties = new HashMap<>();
// fxmlLoader.setResources(SheetEditorControllerImpl.createResourceBundle(properties));
try {
AnchorPane node = (AnchorPane) fxmlLoader.load();
controller = fxmlLoader.getController();
controller.setEditor(this);
Scene s = new Scene(node);
primaryStage.setScene(s);
} catch (IOException exception) {
throw new RuntimeException(exception);
}
primaryStage.setOnCloseRequest((final WindowEvent t) -> {
t.consume();
});
primaryStage.show();
}
}

View File

@ -15,6 +15,7 @@ import javafx.fxml.FXML;
import javafx.scene.control.ListView;
import org.badvision.outlaweditor.GlobalEditor;
import org.badvision.outlaweditor.data.xml.Script;
import org.badvision.outlaweditor.data.xml.Sheet;
import org.badvision.outlaweditor.data.xml.UserType;
import org.badvision.outlaweditor.data.xml.Variable;
@ -30,6 +31,8 @@ public abstract class GlobalEditorTabController {
protected ListView<UserType> dataTypeList;
@FXML
protected ListView<Variable> variableList;
@FXML
protected ListView<Sheet> sheetList;
@FXML
abstract protected void onScriptAddPressed(ActionEvent event);
@ -44,6 +47,12 @@ public abstract class GlobalEditorTabController {
@FXML
abstract protected void onDataTypeClonePressed(ActionEvent event);
@FXML
abstract protected void onSheetAddPressed(ActionEvent event);
@FXML
abstract protected void onSheetDeletePressed(ActionEvent event);
@FXML
abstract protected void onSheetClonePressed(ActionEvent event);
@FXML
abstract protected void onVariableAddPressed(ActionEvent event);
@FXML
abstract protected void onVariableDeletePressed(ActionEvent event);
@ -56,10 +65,13 @@ public abstract class GlobalEditorTabController {
abstract public void redrawGlobalDataTypes();
abstract public void redrawGlobalSheets();
public void initialize() {
redrawGlobalScripts();
redrawGlobalVariables();
redrawGlobalDataTypes();
redrawGlobalSheets();
}
}

View File

@ -0,0 +1,45 @@
/*
* 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 org.badvision.outlaweditor.ui;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TableColumn;
import org.badvision.outlaweditor.data.xml.Sheet;
import org.badvision.outlaweditor.data.xml.UserType;
/**
*
*/
public abstract class SheetEditorController implements Initializable {
@FXML
protected ResourceBundle resources;
@FXML
protected URL location;
@FXML
protected TableColumn<UserType, String> addColumn;
@FXML
abstract public void addColumnAction(ActionEvent event);
@FXML
protected void initialize() {
assert addColumn != null : "fx:id=\"addColumn\" was not injected: check your FXML file 'SheetEditor.fxml'.";
}
}

View File

@ -7,7 +7,6 @@
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.badvision.outlaweditor.ui;
import java.beans.IntrospectionException;
@ -66,6 +65,7 @@ import org.badvision.outlaweditor.Application;
import static org.badvision.outlaweditor.Application.currentPlatform;
import org.badvision.outlaweditor.FileUtils;
import org.badvision.outlaweditor.MythosEditor;
import org.badvision.outlaweditor.SheetEditor;
import org.badvision.outlaweditor.apple.ImageDitherEngine;
import org.badvision.outlaweditor.data.DataUtilities;
import org.badvision.outlaweditor.data.TileUtils;
@ -74,6 +74,7 @@ import org.badvision.outlaweditor.data.xml.GameData;
import org.badvision.outlaweditor.data.xml.Global;
import org.badvision.outlaweditor.data.xml.Scope;
import org.badvision.outlaweditor.data.xml.Script;
import org.badvision.outlaweditor.data.xml.Sheet;
import org.badvision.outlaweditor.data.xml.Tile;
import org.badvision.outlaweditor.data.xml.UserType;
import org.badvision.outlaweditor.data.xml.Variable;
@ -329,8 +330,8 @@ public class UIAction {
@Override
public String toString(String value) {
return value == null ? "String" : value;
}
}, "String","Boolean","Number"));
}
}, "String", "Boolean", "Number"));
attributeControls.put("comment", TextFieldTableCell.<Variable, String>forTableColumn(new DefaultStringConverter()));
controls.put("name", new ModalEditor.TextControl());
@ -340,6 +341,26 @@ public class UIAction {
return editor.editObject(type, controls, UserType.class, "User Type", "Edit and press OK, or Cancel to abort");
}
public static Sheet createAndEditSheet() throws IntrospectionException {
Sheet sheet = new Sheet();
sheet.setName("New Sheet");
if (Application.gameData.getGlobal().getSheets() == null) {
Application.gameData.getGlobal().setSheets(new Global.Sheets());
}
Application.gameData.getGlobal().getSheets().getSheet().add(sheet);
return editSheet(sheet);
}
public static Sheet editSheet(Sheet item) {
if (item == null) {
System.err.println("Requested to edit a null sheet object, ignoring!");
return null;
}
SheetEditor editor = new SheetEditor(item);
editor.show();
return item;
}
public static ImageConversionWizardController openImageConversionModal(Image image, ImageDitherEngine ditherEngine, int targetWidth, int targetHeight, ImageConversionPostAction postAction) {
FXMLLoader fxmlLoader = new FXMLLoader(UIAction.class.getResource("/imageConversionWizard.fxml"));
try {
@ -459,4 +480,7 @@ public class UIAction {
ft.setOnFinished(callback);
ft.play();
}
private UIAction() {
}
}

View File

@ -7,7 +7,6 @@
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.badvision.outlaweditor.ui.impl;
import java.beans.IntrospectionException;
@ -24,6 +23,7 @@ import org.badvision.outlaweditor.Application;
import org.badvision.outlaweditor.TransferHelper;
import org.badvision.outlaweditor.data.DataUtilities;
import org.badvision.outlaweditor.data.xml.Script;
import org.badvision.outlaweditor.data.xml.Sheet;
import org.badvision.outlaweditor.data.xml.UserType;
import org.badvision.outlaweditor.data.xml.Variable;
import org.badvision.outlaweditor.ui.GlobalEditorTabController;
@ -98,6 +98,28 @@ public class GlobalEditorTabControllerImpl extends GlobalEditorTabController {
updateItem(getItem(), false);
}
});
sheetList.setCellFactory((listView) -> new ListCell<Sheet>() {
@Override
protected void updateItem(Sheet item, boolean empty) {
super.updateItem(item, empty);
if (empty || item == null) {
setText("");
} else {
setText(item.getName());
if (item.getComment() != null && !(item.getComment().isEmpty())) {
setTooltip(new Tooltip(item.getComment()));
}
setFont(Font.font(null, FontWeight.BOLD, 12.0));
}
}
@Override
public void startEdit() {
UIAction.editSheet(getItem());
cancelEdit();
updateItem(getItem(), false);
}
});
}
@Override
@ -187,6 +209,52 @@ public class GlobalEditorTabControllerImpl extends GlobalEditorTabController {
}
}
@Override
protected void onSheetAddPressed(ActionEvent event) {
try {
UIAction.createAndEditSheet();
redrawGlobalSheets();
} catch (IntrospectionException ex) {
Logger.getLogger(GlobalEditorTabControllerImpl.class.getName()).log(Level.SEVERE, null, ex);
}
}
@Override
protected void onSheetDeletePressed(ActionEvent event) {
Sheet sheet = sheetList.getSelectionModel().getSelectedItem();
if (sheet != null) {
UIAction.confirm(
"Are you sure you want to delete the sheet "
+ sheet.getName()
+ "? There is no undo for this!",
() -> {
Application.gameData.getGlobal().getSheets().getSheet().remove(sheet);
redrawGlobalSheets();
}, null);
}
}
@Override
protected void onSheetClonePressed(ActionEvent event) {
Sheet source = sheetList.getSelectionModel().getSelectedItem();
if (source == null) {
String message = "First select a sheet and then press Clone";
UIAction.alert(message);
} else {
try {
Sheet sheet = TransferHelper.cloneObject(source, Sheet.class, "sheet");
sheet.setName(source.getName() + " CLONE");
Sheet newVar = UIAction.editSheet(sheet);
Application.gameData.getGlobal().getSheets().getSheet().add(newVar);
redrawGlobalSheets();
} catch (JAXBException ex) {
Logger.getLogger(GlobalEditorTabControllerImpl.class.getName()).log(Level.SEVERE, null, ex);
UIAction.alert("Error occured when attempting clone operation:\n" + ex.getMessage());
}
}
}
@Override
protected void onVariableAddPressed(ActionEvent event) {
try {
@ -268,4 +336,15 @@ public class GlobalEditorTabControllerImpl extends GlobalEditorTabController {
dataTypeList.getItems().clear();
}
}
@Override
public void redrawGlobalSheets() {
DataUtilities.ensureGlobalExists();
if (sheetList.getItems() != null && Application.gameData.getGlobal().getSheets() != null) {
DataUtilities.sortNamedEntities(Application.gameData.getGlobal().getSheets().getSheet());
sheetList.getItems().setAll(Application.gameData.getGlobal().getSheets().getSheet());
} else {
sheetList.getItems().clear();
}
}
}

View File

@ -0,0 +1,45 @@
/*
* Copyright 2016 org.badvision.
*
* 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 org.badvision.outlaweditor.ui.impl;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import org.badvision.outlaweditor.SheetEditor;
import org.badvision.outlaweditor.ui.SheetEditorController;
public class SheetEditorControllerImpl extends SheetEditorController {
private SheetEditor editor;
/**
* Initializes the controller class.
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
super.initialize();
}
public void setEditor(SheetEditor editor) {
this.editor = editor;
// editor.getSheet().
}
@Override
public void addColumnAction(ActionEvent event) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
}

View File

@ -1,280 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.net.*?>
<?import java.util.*?>
<?import javafx.collections.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="500.0" prefWidth="800.0" styleClass="mainFxmlClass" xmlns:fx="http://javafx.com/fxml" fx:controller="org.badvision.outlaweditor.ApplicationUIControllerImpl">
<children>
<VBox prefHeight="500.0" prefWidth="800.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<MenuBar>
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" onAction="#onFileOpen" text="Open" />
<MenuItem mnemonicParsing="false" onAction="#onFileSave" text="Save" />
<MenuItem mnemonicParsing="false" onAction="#onFileSaveAs" text="Save As..." />
<MenuItem mnemonicParsing="false" onAction="#onFileQuit" text="Quit" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" onAction="#onEditSelect" text="Select" />
<MenuItem mnemonicParsing="false" onAction="#onEditCopy" text="Copy" />
<MenuItem mnemonicParsing="false" onAction="#onEditPaste" text="Paste" />
<Menu mnemonicParsing="false" text="Change Platform">
<items>
<MenuItem mnemonicParsing="false" onAction="#onChangePlatformAppleSolid" text="Apple (solid)" />
<MenuItem mnemonicParsing="false" onAction="#onChangePlatformAppleText" text="Apple (text-friendly)" />
<MenuItem mnemonicParsing="false" onAction="#onChangePlatformAppleDHGRSolid" text="Apple (DHGR solid)" />
<MenuItem mnemonicParsing="false" onAction="#onChangePlatformAppleDHGRText" text="Apple (DHGR text)" />
<MenuItem mnemonicParsing="false" onAction="#onChangePlatformC64" text="C64" />
</items>
</Menu>
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" onAction="#onHelpAbout" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
<TabPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="455.0" prefWidth="676.9998779296875" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS">
<tabs>
<Tab onSelectionChanged="#tileTabActivated" text="Tiles">
<content>
<AnchorPane id="tilesTab" minHeight="0.0" minWidth="0.0" prefHeight="420.0000999999975" prefWidth="677.0">
<children>
<VBox prefHeight="420.0000999999975" prefWidth="677.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<ToolBar prefWidth="686.0">
<items>
<Label text="Tile:" />
<ComboBox fx:id="tileSelector" minWidth="125.0" onAction="#onCurrentTileSelected">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="Item 1" />
<String fx:value="Item 2" />
<String fx:value="Item 3" />
</FXCollections>
</items>
</ComboBox>
<Button mnemonicParsing="false" onAction="#onTileCreatePressed" text="Create new" />
<Button mnemonicParsing="false" onAction="#onTileExportPressed" text="Export" />
<Button mnemonicParsing="false" onAction="#onTileClonePressed" prefWidth="64.9998779296875" text="Clone" />
<Button mnemonicParsing="false" onAction="#onTileDeletePressed" text="Delete" />
<MenuButton mnemonicParsing="false" text="Tools">
<items>
<Menu mnemonicParsing="false" text="Pattern" fx:id="tilePatternMenu" />
<Menu mnemonicParsing="false" text="Draw mode">
<items>
<MenuItem mnemonicParsing="false" onAction="#tileBitMode" text="Bit Toggle" />
<MenuItem mnemonicParsing="false" onAction="#tileDraw1BitMode" text="1 bit-wide" />
<MenuItem mnemonicParsing="false" onAction="#tileDraw3BitMode" text="3 bit wide" />
</items>
</Menu>
<MenuItem mnemonicParsing="false" onAction="#tileShift" text="Shift..." />
</items>
</MenuButton>
</items>
</ToolBar>
<HBox prefHeight="387.0" prefWidth="677.0" VBox.vgrow="ALWAYS">
<children>
<AnchorPane id="imageDetailsPane" prefHeight="200.0" prefWidth="200.0">
<children>
<Label layoutX="4.0" layoutY="14.0" text="Name" />
<TextField id="" fx:id="tileNameField" layoutX="53.0" layoutY="11.0" prefWidth="147.0" />
<Label layoutX="4.0" layoutY="36.0" text="ID" />
<TextField fx:id="tileIdField" layoutX="53.0" layoutY="33.0" prefWidth="147.0" />
<Label layoutX="4.0" layoutY="58.0" text="Category" />
<TextField fx:id="tileCategoryField" layoutX="74.0" layoutY="55.0" prefWidth="126.0" />
<CheckBox fx:id="tileObstructionField" layoutX="4.0" layoutY="78.0" mnemonicParsing="false" text="Physical Obstruction" />
</children>
</AnchorPane>
<AnchorPane fx:id="tileEditorAnchorPane" prefHeight="387.0" prefWidth="477.0000999999975" HBox.hgrow="ALWAYS" />
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>
</content>
</Tab>
<Tab onSelectionChanged="#mapTabActivated" text="Maps">
<content>
<AnchorPane id="mapsTab" minHeight="0.0" minWidth="0.0">
<children>
<VBox prefHeight="200.0" prefWidth="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<ToolBar prefWidth="677.0">
<items>
<Label text="Map:" />
<ComboBox fx:id="mapSelect" minWidth="125.0" onAction="#onMapSelected">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="Item 1" />
<String fx:value="Item 2" />
<String fx:value="Item 3" />
</FXCollections>
</items>
</ComboBox>
<Button mnemonicParsing="false" onAction="#onMapCreatePressed" text="Create new" />
<Button mnemonicParsing="false" onAction="#onMapClonePressed" text="Clone" />
<Button mnemonicParsing="false" onAction="#onMapExportPressed" text="Export" />
<Button mnemonicParsing="false" onAction="#onMapDeletePressed" text="Delete" />
<Button mnemonicParsing="false" onAction="#onMapPreviewPressed" text="Preview" />
<MenuButton mnemonicParsing="false" text="Tools">
<items>
<Menu mnemonicParsing="false" text="Change tile" fx:id="mapSelectTile" />
<Menu mnemonicParsing="false" text="Draw mode">
<items>
<MenuItem mnemonicParsing="false" onAction="#mapDraw1" text="Radius 1" />
<MenuItem mnemonicParsing="false" onAction="#mapDraw3" text="Radius 3" />
<MenuItem mnemonicParsing="false" onAction="#mapDraw5" text="Radius 5" />
<MenuItem mnemonicParsing="false" onAction="#mapDrawFilledRectMode" text="Filled Rectangle" />
</items>
</Menu>
<MenuItem mnemonicParsing="false" onAction="#mapTogglePanZoom" text="Toggle pan/zoom controls" />
</items>
</MenuButton>
</items>
</ToolBar>
<HBox prefHeight="389.0" prefWidth="677.0" VBox.vgrow="ALWAYS">
<children>
<AnchorPane prefHeight="200.0" prefWidth="200.0" HBox.hgrow="NEVER">
<children>
<Label text="Name" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="14.0" />
<TextField id="mapNameFiled" fx:id="mapNameField" layoutX="53.0" layoutY="11.0" prefWidth="147.0" />
<TextField fx:id="mapWidthField" layoutX="53.0" layoutY="33.0" prefWidth="147.0" />
<Label layoutX="4.0" layoutY="36.0" text="Width" />
<TextField fx:id="mapHeightField" layoutX="53.0" layoutY="55.0" prefWidth="147.0" />
<Label layoutX="4.0" layoutY="58.0" text="Height" />
<CheckBox fx:id="mapWrapAround" contentDisplay="RIGHT" layoutX="4.0" layoutY="77.0" mnemonicParsing="false" text="Wrap at edges" />
<Separator layoutX="4.0" layoutY="101.0" prefWidth="189.0" />
<Label layoutX="4.0" layoutY="108.0" text="Scripts" />
<ScrollPane fitToHeight="true" fitToWidth="true" prefHeight="232.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="157.0">
<content>
<AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="200.0" prefWidth="200.0">
<children>
<ListView fx:id="mapScriptsList" onMouseClicked="onMapScriptClicked" prefHeight="217.0" prefWidth="199.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
<ToolBar layoutY="124.0" prefWidth="200.0">
<items>
<Button mnemonicParsing="false" onAction="#onMapScriptAddPressed" text="+" />
<Button mnemonicParsing="false" onAction="#onMapScriptDeletePressed" text="-" />
<Button mnemonicParsing="false" onAction="#onMapScriptClonePressed" text="Clone" />
</items>
</ToolBar>
</children>
</AnchorPane>
<AnchorPane fx:id="mapEditorAnchorPane" prefHeight="389.0" prefWidth="477.0000999999975" HBox.hgrow="SOMETIMES">
<children>
<Button alignment="TOP_CENTER" layoutX="265.0" mnemonicParsing="false" onAction="#scrollMapUp" styleClass="moveButton" text="Up" AnchorPane.topAnchor="5.0" />
<Button layoutY="185.0" mnemonicParsing="false" onAction="#scrollMapLeft" rotate="270.0" styleClass="moveButton" text="Left" AnchorPane.leftAnchor="-20.0" />
<Button layoutX="265.0" mnemonicParsing="false" onAction="#scrollMapDown" rotate="180.0" styleClass="moveButton" text="Down" AnchorPane.bottomAnchor="5.0" />
<Button layoutY="175.0" mnemonicParsing="false" onAction="#scrollMapRight" rotate="90.0" styleClass="moveButton" text="Right" AnchorPane.rightAnchor="-15.0" />
<Button mnemonicParsing="false" onAction="#mapZoomIn" styleClass="zoomInButton" text="+" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="5.0" />
<Button mnemonicParsing="false" onAction="#mapZoomOut" prefHeight="23.999908447265625" styleClass="zoomOutButton" text="-" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="30.0" />
</children>
</AnchorPane>
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>
</content>
</Tab>
<Tab onSelectionChanged="#imageTabActivated" text="Images">
<content>
<AnchorPane id="tilesTab" minHeight="0.0" minWidth="0.0" prefHeight="420.0" prefWidth="677.0">
<children>
<VBox prefHeight="420.0000999999975" prefWidth="677.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<ToolBar prefWidth="686.0">
<items>
<Label text="Image:" />
<ComboBox id="tileSelect" fx:id="imageSelector" onAction="#onImageSelected">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="Item 1" />
<String fx:value="Item 2" />
<String fx:value="Item 3" />
</FXCollections>
</items>
</ComboBox>
<Button mnemonicParsing="false" onAction="#onImageCreatePressed" text="Create new" />
<Button mnemonicParsing="false" onAction="#onImageClonePressed" text="Clone" />
<Button mnemonicParsing="false" onAction="#onImageExportPressed" text="Export" />
<Button mnemonicParsing="false" onAction="#onImageDeletePressed" text="Delete" />
<MenuButton mnemonicParsing="false" text="Tools">
<items>
<Menu mnemonicParsing="false" text="Pattern" fx:id="imagePatternMenu" />
<Menu mnemonicParsing="false" text="Draw mode">
<items>
<MenuItem mnemonicParsing="false" onAction="#imageBitMode" text="Bit Toggle mode" />
<MenuItem mnemonicParsing="false" onAction="#imageDraw1BitMode" text="1 bit-wide" />
<MenuItem mnemonicParsing="false" onAction="#imageDraw3BitMode" text="3 bit wide" />
<MenuItem mnemonicParsing="false" onAction="#imageDraw5BitMode" text="5 bit wide" />
<MenuItem mnemonicParsing="false" onAction="#imageDrawFilledRectMode" text="Filled Rectangle" />
</items>
</Menu>
<MenuItem mnemonicParsing="false" onAction="#imageTogglePanZoom" text="Toggle pan/zoom controls" />
<MenuItem mnemonicParsing="false" onAction="#imageShift" text="Shift..." />
</items>
</MenuButton>
</items>
</ToolBar>
<HBox prefHeight="387.0" prefWidth="677.0" VBox.vgrow="ALWAYS">
<children>
<AnchorPane id="imageDetailsPane" prefHeight="200.0" prefWidth="200.0">
<children>
<Label layoutX="4.0" layoutY="14.0" text="Name" />
<TextField id="" fx:id="imageNameField" layoutX="53.0" layoutY="11.0" prefWidth="147.0" />
<Label layoutX="4.0" layoutY="36.0" text="Category" />
<TextField id="tileCategoryField" fx:id="imageCategoryField" layoutX="74.0" layoutY="33.0" prefWidth="126.0" />
<TextField fx:id="imageWidthField" layoutY="55.0" prefWidth="145.0" AnchorPane.leftAnchor="53.0" AnchorPane.rightAnchor="0.0" />
<Label layoutX="4.0" layoutY="58.0" text="Width" />
<TextField id="imageWidthField" fx:id="imageHeightField" layoutX="53.0" layoutY="77.0" prefWidth="147.0" />
<Label layoutX="4.0" layoutY="83.0" text="Height" />
</children>
</AnchorPane>
<AnchorPane id="mapEditorAnchorPane" fx:id="imageEditorAnchorPane" prefHeight="389.0" prefWidth="477.0" HBox.hgrow="ALWAYS">
<children>
<Button layoutX="236.0" mnemonicParsing="false" onAction="#scrollImageUp" styleClass="moveButton" text="Up" AnchorPane.topAnchor="5.0" />
<Button layoutY="185.0" mnemonicParsing="false" onAction="#scrollImageLeft" rotate="270.0" styleClass="moveButton" text="Left" AnchorPane.leftAnchor="-20.0" />
<Button layoutX="236.0" mnemonicParsing="false" onAction="#scrollImageDown" rotate="180.0" styleClass="moveButton" text="Down" AnchorPane.bottomAnchor="5.0" />
<Button layoutY="175.0" mnemonicParsing="false" onAction="#scrollImageRight" rotate="90.0" styleClass="moveButton" text="Right" AnchorPane.rightAnchor="-15.0" />
<Button mnemonicParsing="false" onAction="#imageZoomIn" styleClass="zoomInButton" text="+" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="5.0" />
<Button mnemonicParsing="false" onAction="#imageZoomOut" prefHeight="23.999908447265625" styleClass="zoomOutButton" text="-" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="30.0" />
</children>
</AnchorPane>
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>
</content>
</Tab>
</tabs>
</TabPane>
</children>
</VBox>
<HBox layoutX="300.0" layoutY="200.0" prefHeight="100.0" prefWidth="200.0" />
</children>
<stylesheets>
<URL value="@styles/applicationui.css" />
</stylesheets>
</AnchorPane>

View File

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.net.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.web.*?>
<AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" styleClass="mainFxmlClass" xmlns:fx="http://javafx.com/fxml" fx:controller="org.badvision.outlaweditor.MythosScriptEditorController">
<!-- <stylesheets>
<URL value="@/styles/mythosscripteditor.css"/>
</stylesheets>-->
<children>
<MenuBar prefWidth="600.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<menus>
<Menu mnemonicParsing="false" text="MythosScript">
<items>
<MenuItem mnemonicParsing="false" text="Apply changes" fx:id="menuItemApplyChanges" />
<MenuItem mnemonicParsing="false" text="Abort changes" fx:id="menuItemAbortChanges" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Undo" fx:id="menuItemUndo" />
<MenuItem mnemonicParsing="false" text="Redo" fx:id="menuItemRedo" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="Mythos Script Help" fx:id="menuItemMythosHelp" />
<MenuItem mnemonicParsing="false" text="About Blockly" fx:id="menuItemAboutBlockly" />
</items>
</Menu>
</menus>
</MenuBar>
<WebView id="editorPanel" fx:id="editorView" prefHeight="376.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="24.0" />
</children>
</AnchorPane>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.net.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" styleClass="sheetEditor" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.40" fx:controller="org.badvision.outlaweditor.ui.impl.SheetEditorControllerImpl">
<stylesheets>
<URL value="@/styles/styles.css" />
</stylesheets>
<children>
<VBox layoutX="167.0" layoutY="63.0" prefHeight="200.0" prefWidth="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<MenuBar>
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" text="Import sheet" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
<ToolBar prefHeight="40.0" prefWidth="200.0">
<items>
<Button mnemonicParsing="false" text="Button" />
</items>
</ToolBar>
<TableView editable="true" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
<columns>
<TableColumn fx:id="addColumn" onEditCommit="#addColumnAction" prefWidth="75.0" sortable="false" text="+" />
</columns>
</TableView>
</children>
</VBox>
</children>
</AnchorPane>

View File

@ -7,78 +7,107 @@
<AnchorPane id="mapsTab" minHeight="0.0" minWidth="0.0" prefHeight="480.0" prefWidth="677.0" stylesheets="@styles/applicationui.css" xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.badvision.outlaweditor.ui.impl.GlobalEditorTabControllerImpl">
<children>
<HBox prefHeight="438.0" prefWidth="677.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<VBox HBox.hgrow="ALWAYS">
<children>
<Label text="Scripts" />
<ToolBar prefWidth="200.0">
<items>
<Button mnemonicParsing="false" onAction="#onScriptAddPressed" text="+" />
<Button mnemonicParsing="false" onAction="#onScriptDeletePressed" text="-" />
<Button mnemonicParsing="false" onAction="#onScriptClonePressed" text="Clone" />
</items>
</ToolBar>
<ScrollPane fitToHeight="true" fitToWidth="true" prefHeight="419.0" prefWidth="201.0">
<content>
<AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="95.0" prefWidth="198.0">
<children>
<ListView fx:id="globalScriptList" editable="true" prefHeight="130.0" prefWidth="199.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
<padding>
<Insets right="5.0" />
</padding>
</VBox>
<VBox layoutX="10.0" layoutY="10.0" HBox.hgrow="ALWAYS">
<children>
<Label text="Data Types" />
<ToolBar prefWidth="200.0">
<items>
<Button mnemonicParsing="false" onAction="#onDataTypeAddPressed" text="+" />
<Button mnemonicParsing="false" onAction="#onDataTypeDeletePressed" text="-" />
<Button mnemonicParsing="false" onAction="#onDataTypeClonePressed" text="Clone" />
</items>
</ToolBar>
<ScrollPane fitToHeight="true" fitToWidth="true" prefHeight="419.0" prefWidth="201.0">
<content>
<AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="95.0" prefWidth="198.0">
<children>
<ListView fx:id="dataTypeList" editable="true" prefHeight="130.0" prefWidth="199.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
<padding>
<Insets right="5.0" />
</padding>
</VBox>
<VBox layoutX="211.0" layoutY="10.0" HBox.hgrow="ALWAYS">
<children>
<VBox prefHeight="200.0" prefWidth="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<HBox spacing="5.0" VBox.vgrow="ALWAYS">
<children>
<VBox HBox.hgrow="ALWAYS">
<children>
<Label text="Scripts" />
<ToolBar prefWidth="200.0">
<items>
<Button mnemonicParsing="false" onAction="#onScriptAddPressed" text="+" />
<Button mnemonicParsing="false" onAction="#onScriptDeletePressed" text="-" />
<Button mnemonicParsing="false" onAction="#onScriptClonePressed" text="Clone" />
</items>
</ToolBar>
<ScrollPane fitToHeight="true" fitToWidth="true" prefHeight="419.0" prefWidth="201.0">
<content>
<AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="95.0" prefWidth="198.0">
<children>
<ListView fx:id="globalScriptList" editable="true" prefHeight="130.0" prefWidth="199.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
</VBox>
<VBox layoutX="10.0" layoutY="10.0" HBox.hgrow="ALWAYS">
<children>
<Label text="Data Types" />
<ToolBar prefWidth="200.0">
<items>
<Button mnemonicParsing="false" onAction="#onDataTypeAddPressed" text="+" />
<Button mnemonicParsing="false" onAction="#onDataTypeDeletePressed" text="-" />
<Button mnemonicParsing="false" onAction="#onDataTypeClonePressed" text="Clone" />
</items>
</ToolBar>
<ScrollPane fitToHeight="true" fitToWidth="true" prefHeight="419.0" prefWidth="201.0">
<content>
<AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="95.0" prefWidth="198.0">
<children>
<ListView fx:id="dataTypeList" editable="true" prefHeight="130.0" prefWidth="199.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
</VBox>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</HBox>
<HBox spacing="5.0" VBox.vgrow="ALWAYS">
<children>
<VBox HBox.hgrow="ALWAYS">
<children>
<Label text="Sheets" />
<ToolBar prefWidth="200.0">
<items>
<Button mnemonicParsing="false" onAction="#onSheetAddPressed" text="+" />
<Button mnemonicParsing="false" onAction="#onSheetDeletePressed" text="-" />
<Button mnemonicParsing="false" onAction="#onSheetClonePressed" text="Clone" />
</items>
</ToolBar>
<ScrollPane fitToHeight="true" fitToWidth="true" prefHeight="419.0" prefWidth="201.0">
<content>
<AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="95.0" prefWidth="198.0">
<children>
<ListView fx:id="sheetList" editable="true" prefHeight="130.0" prefWidth="199.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
</VBox>
<VBox HBox.hgrow="ALWAYS">
<children>
<Label text="Global Variables" />
<ToolBar prefWidth="200.0">
<items>
<Button mnemonicParsing="false" onAction="#onVariableAddPressed" text="+" />
<Button mnemonicParsing="false" onAction="#onVariableDeletePressed" text="-" />
<Button mnemonicParsing="false" onAction="#onVariableClonePressed" text="Clone" />
</items>
<items>
<Button mnemonicParsing="false" onAction="#onVariableAddPressed" text="+" />
<Button mnemonicParsing="false" onAction="#onVariableDeletePressed" text="-" />
<Button mnemonicParsing="false" onAction="#onVariableClonePressed" text="Clone" />
</items>
</ToolBar>
<ScrollPane fitToHeight="true" fitToWidth="true" prefHeight="419.0" prefWidth="201.0">
<content>
<AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="95.0" prefWidth="198.0">
<children>
<ListView fx:id="variableList" editable="true" prefHeight="130.0" prefWidth="199.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</content>
<content>
<AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="95.0" prefWidth="198.0">
<children>
<ListView fx:id="variableList" editable="true" prefHeight="130.0" prefWidth="199.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
</VBox>
</children>
</HBox>
</children>
</VBox>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" />
</padding>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>