Skip to content

Commit

Permalink
Merge pull request #56 from PhaserEditor2D/develop
Browse files Browse the repository at this point in the history
Merge develop changes for v3.3.1
  • Loading branch information
PhaserEditor2D authored Jul 14, 2020
2 parents 781686a + bbc33f2 commit e6f6c1f
Show file tree
Hide file tree
Showing 21 changed files with 8,182 additions and 7,006 deletions.
2 changes: 2 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This repository contains all the client code. This means that you can modify it

The main two reasons you may find to build the client code are: you are contributing to the code or you want to try the in-development version.

([In this repo](https://github.com/PhaserEditor2D/PhaserEditor2D-v3-build-develop) we provide a script to perform the following steps automatically)

## 1) Download the source code

First, you have to clone this repo to get the source code (you need a [Git client](https://git-scm.com/) installed).
Expand Down
27 changes: 20 additions & 7 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
# Change Log

## Version 3.3.0 - July 1, 2020.
## Version 3.3.1 - July 15, 2020

## Added
### Added

* Phaser 3.24.1 support.

### Fixed

* [#52](https://github.com/PhaserEditor2D/PhaserEditor2D-v3/issues/52) Moving objects with arrow keys is not updating the properties in the Inspector view.
* [#54](https://github.com/PhaserEditor2D/PhaserEditor2D-v3/issues/54) Asset Pack Editor: fixes delete items with context menu Delete option.
* Fixes Asset Pack file selection dialog in **Compiler Scene Settings**.
* FileEditor clears undo history when a file is modified in an external editor.

### Version 3.3.0 - July 1, 2020.

### Added

* Asset Pack: allows to import SVG files as HTML Image.
* Asset Pack: adds an Open button to the File Key section.
Expand All @@ -23,12 +36,12 @@
* [#41](https://github.com/PhaserEditor2D/PhaserEditor2D-v3/issues/41) Scene Editor: zoom in/out buttons.


## Modified
### Modified

* Improved Asset Pack File section in Inspector view.
* [#44](https://github.com/PhaserEditor2D/PhaserEditor2D-v3/issues/44) Workbench: does not validate if there is an `index.html` file in the root folder.

## Fixed
### Fixed

* Fixes menu vertical positioning when there is few space at the top.
* Scene Editor: shows message when a prefab is not found.
Expand All @@ -39,7 +52,7 @@

## Version 3.2.0 - June 14, 2020

## Added
### Added

* [#32](https://github.com/PhaserEditor2D/PhaserEditor2D-v3/issues/32) In-App update. With `PhaserEditor2D -update` the server downloads the latest version and replace the old files with the new files. With `PhaserEditor2D -download`, the server downloads the latest version zip, and you can install it manually.
* Prefab user properties. You can add user properties to prefabs and change the values in the prefab instances.
Expand All @@ -51,7 +64,7 @@
* Open Visual Studio Code command in main menu. Bound to the `Ctrl+Alt+U` key.
* A Comment Dialog (`Ctrl+Alt+Space`), to write messages in presentations or video-recording.

## Modified
### Modified

* Files view: the context menu **New** option does not open the **New File** dialog. Now it is a sub-menu with the shortcuts to create a new file of any supported content type.
* Scene Editor: the translate and rotate manipulators set integer values to objects.
Expand All @@ -60,7 +73,7 @@
* Scene Editor: auto creates a container when add new objects to a prefab scene.
* Scene Editor: removes redundant `sceneType` attribute in scene file serialization.

## Fixed
### Fixed

* Don't activate the editor when clicking on the close button.
* Image Editor: registers the right content type association.
Expand Down
1 change: 1 addition & 0 deletions scripts/help-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function makeHelpFile(members, outputPath) {
if (name in docsMap) {
outputMap[name] = docsMap[name];
} else {
console.log("Cannot find name " + name);
throw new Error("Cannot find name: " + name);
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/editor/plugins/colibri/src/ui/controls/Action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace colibri.ui.controls {

if (this._commandId) {

Platform.getWorkbench().getCommandManager().executeCommand(this._commandId, false);
Platform.getWorkbench().getCommandManager().executeCommand(this._commandId);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ namespace colibri.ui.controls.viewers {
export class ArrayTreeContentProvider implements ITreeContentProvider {

getRoots(input: any): any[] {
// ok, we assume the input is an array

if (!Array.isArray(input)) {
return [];
}

return input;
}

Expand Down
35 changes: 15 additions & 20 deletions source/editor/plugins/colibri/src/ui/ide/FileEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,28 @@ namespace colibri.ui.ide {
export abstract class FileEditor extends EditorPart {

private _onFileStorageListener: io.ChangeListenerFunc;
private _isSaving: boolean;
private _savingThisEditor: boolean;

constructor(id: string) {
super(id);

this._isSaving = false;

this._onFileStorageListener = change => {

this.onFileStorageChanged(change);

};

Workbench.getWorkbench().getFileStorage().addChangeListener(this._onFileStorageListener);
}

async save() {

this._isSaving = true;

try {

await super.save();

} finally {
this._savingThisEditor = true;

this._isSaving = false;
}
}

protected isSaving() {
return this._isSaving;
await super.save();
}

protected onFileStorageChanged(change: io.FileStorageChange) {
private onFileStorageChanged(change: io.FileStorageChange) {

const editorFile = this.getInput();

Expand All @@ -49,9 +38,15 @@ namespace colibri.ui.ide {

} else if (change.isModified(editorFileFullName)) {

if (!this._isSaving) {
if (this._savingThisEditor) {

this._savingThisEditor = false;

} else {

this.getUndoManager().clear();

this.onEditorInputContentChanged();
this.onEditorInputContentChangedByExternalEditor();
}

} else if (change.wasRenamed(editorFileFullName)) {
Expand All @@ -66,7 +61,7 @@ namespace colibri.ui.ide {
// nothing
}

protected abstract onEditorInputContentChanged();
protected abstract onEditorInputContentChangedByExternalEditor();

onPartClosed() {

Expand Down
6 changes: 6 additions & 0 deletions source/editor/plugins/colibri/src/ui/ide/undo/UndoManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ namespace colibri.ui.ide.undo {
await op.execute();
}

clear() {

this._undoList = [];
this._redoList = [];
}

undo() {

if (this._undoList.length > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ namespace phasereditor2d.code.ui.editors {
}
}

protected async onEditorInputContentChanged() {
protected async onEditorInputContentChangedByExternalEditor() {

if (CodePlugin.getInstance().isAdvancedJSEditor()) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace phasereditor2d.files.ui.actions {

import controls = colibri.ui.controls;
import io = colibri.core.io;

export class DeleteFilesAction extends colibri.ui.ide.actions.ViewerViewAction<views.FilesView> {
Expand Down
2 changes: 1 addition & 1 deletion source/editor/plugins/phasereditor2d.ide/src/IDEPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ namespace phasereditor2d.ide {

/* program entry point */

export const VER = "3.3.0";
export const VER = "3.3.1";

async function main() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace phasereditor2d.images.ui.editors {
webContentTypes.core.CONTENT_TYPE_IMAGE, () => new ImageEditor()));
}

protected onEditorInputContentChanged() {
protected onEditorInputContentChangedByExternalEditor() {
// empty
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Phaser.Loader.LoaderPlugin.atlas(atlasURL)": "The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".",
"Phaser.Loader.LoaderPlugin.atlas(atlasURL)": "The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, a well formed JSON object.",
"Phaser.Loader.LoaderPlugin.atlas(textureURL)": "The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".",
"Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig.normalMap": "The filename of an associated normal map. It uses the same path and url to load as the texture image.",
"Phaser.Loader.LoaderPlugin.atlasXML(atlasURL)": "The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `<key>.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".",
Expand Down Expand Up @@ -30,7 +30,7 @@
"Phaser.Loader.LoaderPlugin.text(url)": "The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".",
"Phaser.Loader.LoaderPlugin.glsl(url)": "The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.glsl`, i.e. if `key` was \"alien\" then the URL will be \"alien.glsl\".",
"Phaser.Loader.LoaderPlugin.html(url)": "The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.html`, i.e. if `key` was \"alien\" then the URL will be \"alien.html\".",
"Phaser.Loader.LoaderPlugin.json(url)": "The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".",
"Phaser.Loader.LoaderPlugin.json(url)": "The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.",
"Phaser.Loader.LoaderPlugin.xml(url)": "The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".",
"Phaser.Types.Textures.SpriteSheetConfig.frameWidth": "The fixed width of each frame.",
"Phaser.Types.Textures.SpriteSheetConfig.frameHeight": "The fixed height of each frame. If not set it will use the frameWidth as the height.",
Expand All @@ -44,7 +44,7 @@
"Phaser.Types.Loader.FileTypes.SVGSizeConfig.height": "An optional height. The SVG will be resized to this size before being rendered to a texture.",
"Phaser.Loader.LoaderPlugin.tilemapCSV(url)": "The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.csv`, i.e. if `key` was \"alien\" then the URL will be \"alien.csv\".",
"Phaser.Loader.LoaderPlugin.tilemapImpact(url)": "The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".",
"Phaser.Loader.LoaderPlugin.tilemapTiledJSON(url)": "The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".",
"Phaser.Loader.LoaderPlugin.tilemapTiledJSON(url)": "The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, a well formed JSON object.",
"Phaser.Loader.LoaderPlugin.unityAtlas(atlasURL)": "The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `<key>.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".",
"Phaser.Loader.LoaderPlugin.unityAtlas(textureURL)": "The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".",
"Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig.normalMap": "The filename of an associated normal map. It uses the same path and url to load as the texture image.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ namespace phasereditor2d.pack.ui.editor {
}
}

protected onEditorInputContentChanged() {
protected onEditorInputContentChangedByExternalEditor() {

this.updateContent();
}
Expand Down
Loading

0 comments on commit e6f6c1f

Please sign in to comment.