Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
PhaserEditor2D committed Jul 2, 2023
2 parents 15610b4 + 28556e1 commit f0403ef
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 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.62.1, Jun 30, 2023

* Fixes KeyCode user property editor.

## v3.62.0, Jun 29, 2023

* New Event user property.
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 @@ -323,7 +323,7 @@ namespace phasereditor2d.ide {

/* program entry point */

export const VER = "3.62.0";
export const VER = "3.62.1";

async function main() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ namespace phasereditor2d.scene.ui.sceneobjects {
const labelElement = this.createLabel(parent, prop.label, PhaserHelp(prop.tooltip));
labelElement.style.gridColumn = "2";

const buttonElement = this.createKeyCodeField(parent, prop);
const buttonElement = this.createKeyCodeField(parent, prop, lockIcon);

return { labelElement, buttonElement };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ namespace phasereditor2d.scene.ui.sceneobjects {
return colorElement;
}

createKeyCodeField(parent: HTMLElement, property: IProperty<T>) {
createKeyCodeField(parent: HTMLElement, property: IProperty<T>, checkUnlock = true) {

const btn = this.createButton(parent, "KeyCode", e => {

Expand All @@ -220,7 +220,7 @@ namespace phasereditor2d.scene.ui.sceneobjects {
const keys = this.getSelection();

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

}, false);

Expand All @@ -231,6 +231,8 @@ namespace phasereditor2d.scene.ui.sceneobjects {

btn.textContent = this.flatValues_StringOneOrNothing(
this.getSelection().map(obj => property.getValue(obj)));

btn.disabled = checkUnlock && !this.isUnlocked(property);
});
}

Expand Down

0 comments on commit f0403ef

Please sign in to comment.