mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-11-18 23:07:53 +00:00
Finished changes to add 'sprite' and 'blocker' fields to tiles.
This commit is contained in:
parent
4f6b1ebd99
commit
e98b96cf57
@ -46,6 +46,8 @@ public class TileEditorTabControllerImpl extends TileEditorTabController {
|
|||||||
TileUtils.getId(t);
|
TileUtils.getId(t);
|
||||||
t.setName(getCurrentTile().getName() + " (clone)");
|
t.setName(getCurrentTile().getName() + " (clone)");
|
||||||
t.setObstruction(getCurrentTile().isObstruction());
|
t.setObstruction(getCurrentTile().isObstruction());
|
||||||
|
t.setSprite(getCurrentTile().isSprite());
|
||||||
|
t.setBlocker(getCurrentTile().isBlocker());
|
||||||
t.getCategory().addAll(getCurrentTile().getCategory());
|
t.getCategory().addAll(getCurrentTile().getCategory());
|
||||||
getCurrentTile().getDisplayData().stream().map((d) -> {
|
getCurrentTile().getDisplayData().stream().map((d) -> {
|
||||||
PlatformData p = new PlatformData();
|
PlatformData p = new PlatformData();
|
||||||
@ -132,6 +134,8 @@ public class TileEditorTabControllerImpl extends TileEditorTabController {
|
|||||||
assert tileIdField != null : "fx:id=\"tileIdField\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
assert tileIdField != null : "fx:id=\"tileIdField\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
||||||
assert tileNameField != null : "fx:id=\"tileNameField\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
assert tileNameField != null : "fx:id=\"tileNameField\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
||||||
assert tileObstructionField != null : "fx:id=\"tileObstructionField\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
assert tileObstructionField != null : "fx:id=\"tileObstructionField\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
||||||
|
assert tileSpriteField != null : "fx:id=\"tileSpriteField\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
||||||
|
assert tileBlockerField != null : "fx:id=\"tileBlockerField\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
||||||
assert tilePatternMenu != null : "fx:id=\"tilePatternMenu\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
assert tilePatternMenu != null : "fx:id=\"tilePatternMenu\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
||||||
assert tileSelector != null : "fx:id=\"tileSelector\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
assert tileSelector != null : "fx:id=\"tileSelector\" was not injected: check your FXML file 'tileEditorTab.fxml'.";
|
||||||
|
|
||||||
@ -181,24 +185,38 @@ public class TileEditorTabControllerImpl extends TileEditorTabController {
|
|||||||
bind(tileIdField.textProperty(), null);
|
bind(tileIdField.textProperty(), null);
|
||||||
bind(tileCategoryField.textProperty(), null);
|
bind(tileCategoryField.textProperty(), null);
|
||||||
bind(tileObstructionField.selectedProperty(), null);
|
bind(tileObstructionField.selectedProperty(), null);
|
||||||
|
bind(tileSpriteField.selectedProperty(), null);
|
||||||
|
bind(tileBlockerField.selectedProperty(), null);
|
||||||
bind(tileNameField.textProperty(), null);
|
bind(tileNameField.textProperty(), null);
|
||||||
tileIdField.setDisable(true);
|
tileIdField.setDisable(true);
|
||||||
tileCategoryField.setDisable(true);
|
tileCategoryField.setDisable(true);
|
||||||
tileObstructionField.setDisable(true);
|
tileObstructionField.setDisable(true);
|
||||||
|
tileSpriteField.setDisable(true);
|
||||||
|
tileBlockerField.setDisable(true);
|
||||||
tileNameField.setDisable(true);
|
tileNameField.setDisable(true);
|
||||||
setCurrentTileEditor(null);
|
setCurrentTileEditor(null);
|
||||||
} else {
|
} else {
|
||||||
if (t.isObstruction() == null) {
|
if (t.isObstruction() == null) {
|
||||||
t.setObstruction(false);
|
t.setObstruction(false);
|
||||||
}
|
}
|
||||||
|
if (t.isSprite() == null) {
|
||||||
|
t.setSprite(false);
|
||||||
|
}
|
||||||
|
if (t.isBlocker() == null) {
|
||||||
|
t.setBlocker(false);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
tileIdField.setDisable(false);
|
tileIdField.setDisable(false);
|
||||||
tileCategoryField.setDisable(false);
|
tileCategoryField.setDisable(false);
|
||||||
tileObstructionField.setDisable(false);
|
tileObstructionField.setDisable(false);
|
||||||
|
tileSpriteField.setDisable(false);
|
||||||
|
tileBlockerField.setDisable(false);
|
||||||
tileNameField.setDisable(false);
|
tileNameField.setDisable(false);
|
||||||
bind(tileIdField.textProperty(), stringProp(t, "id"));
|
bind(tileIdField.textProperty(), stringProp(t, "id"));
|
||||||
bind(tileCategoryField.textProperty(), categoryProp(t, "category"));
|
bind(tileCategoryField.textProperty(), categoryProp(t, "category"));
|
||||||
bind(tileObstructionField.selectedProperty(), boolProp(t, "obstruction"));
|
bind(tileObstructionField.selectedProperty(), boolProp(t, "obstruction"));
|
||||||
|
bind(tileSpriteField.selectedProperty(), boolProp(t, "sprite"));
|
||||||
|
bind(tileBlockerField.selectedProperty(), boolProp(t, "blocker"));
|
||||||
bind(tileNameField.textProperty(), stringProp(t, "name"));
|
bind(tileNameField.textProperty(), stringProp(t, "name"));
|
||||||
TileEditor editor = Application.currentPlatform.tileEditor.newInstance();
|
TileEditor editor = Application.currentPlatform.tileEditor.newInstance();
|
||||||
editor.setEntity(t);
|
editor.setEntity(t);
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
<xs:extension base="tns:image">
|
<xs:extension base="tns:image">
|
||||||
<xs:attribute name="id" type="xs:string" use="required"/>
|
<xs:attribute name="id" type="xs:string" use="required"/>
|
||||||
<xs:attribute name="obstruction" type="xs:boolean"/>
|
<xs:attribute name="obstruction" type="xs:boolean"/>
|
||||||
|
<xs:attribute name="sprite" type="xs:boolean"/>
|
||||||
|
<xs:attribute name="blocker" type="xs:boolean"/>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
Loading…
Reference in New Issue
Block a user