Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
PhaserEditor2D committed Apr 21, 2023
2 parents a4d1e38 + e29ed86 commit 7350161
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## v3.60.1 - Apr 21, 2023

* Fixes plain object serialization (keyboard keys, colliders,...).

## v3.60.0 - Apr 16, 2023

* Fixes labels of the Size section in the Inspector view.
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 @@ -261,7 +261,7 @@ namespace phasereditor2d.ide {

/* program entry point */

export const VER = "3.60.0";
export const VER = "3.60.1";

async function main() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ namespace phasereditor2d.scene.ui.sceneobjects {
this._components = components;

this.setScope(ObjectScope.CLASS);

this._id = Phaser.Utils.String.UUID();
}

writeJSON(objData: core.json.IScenePlainObjectData) {
Expand All @@ -40,7 +42,7 @@ namespace phasereditor2d.scene.ui.sceneobjects {

readJSON(objData: core.json.IScenePlainObjectData) {

this._id = objData.id;
this._id = objData.id || Phaser.Utils.String.UUID();
this.setScope(colibri.core.json.read(objData, "scope", ObjectScope.CLASS));
this.setLabel(objData.label);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace phasereditor2d.scene.ui.sceneobjects {

export class KeyboardKeyComponent extends PlainObjectComponent<KeyboardKey> {
export class KeyboardKeyComponent extends PlainObjectComponent<KeyboardKey> {

static keyCode = SimpleProperty("keyCode", "SPACE", "Key Code", "The keycode of this key.", true);

constructor(obj: KeyboardKey) {
super(obj, KeyboardKeyComponent.keyCode);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ namespace phasereditor2d.scene.ui.sceneobjects {
dlg.addOpenButton("Select", (sel) => {

const value = sel[0];
const keys = this.getSelection();

console.log("set", value, "to", keys[0].getEditorSupport().getId());

this.getEditor().getUndoManager().add(
new SimpleOperation(this.getEditor(), this.getSelection(), KeyboardKeyComponent.keyCode, value));
new SimpleOperation(this.getEditor(), keys, KeyboardKeyComponent.keyCode, value));

}, false);

Expand Down

0 comments on commit 7350161

Please sign in to comment.