mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-21 22:34:44 +08:00
Input refactoring (#12)
* Fix folder name typo * Smaller fixes * Shortcut rename to Shortcuts * Fix quoted attributes in UE 5.3 * remove KeyboardShortcutAction * Remove more trivial classes * Rename IKeyboardShortcut * Node delete shortcut
This commit is contained in:
@@ -13,7 +13,7 @@ export default class Copy extends IInput {
|
||||
options.unlistenOnTextEdit ??= true // No nodes copy if inside a text field, just text (default behavior)
|
||||
super(target, blueprint, options)
|
||||
let self = this
|
||||
this.#copyHandler = _ => self.copied()
|
||||
this.#copyHandler = () => self.copied()
|
||||
}
|
||||
|
||||
listenEvents() {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import IInput from "../IInput.js"
|
||||
import ObjectSerializer from "../../serialization/ObjectSerializer.js"
|
||||
import KeyboardCanc from "../keybaord/KeyboardCanc.js"
|
||||
|
||||
export default class Cut extends IInput {
|
||||
|
||||
@@ -14,7 +13,7 @@ export default class Cut extends IInput {
|
||||
options.unlistenOnTextEdit ??= true // No nodes copy if inside a text field, just text (default behavior)
|
||||
super(target, blueprint, options)
|
||||
let self = this
|
||||
this.#cutHandler = _ => self.cut()
|
||||
this.#cutHandler = () => self.cut()
|
||||
}
|
||||
|
||||
listenEvents() {
|
||||
@@ -34,6 +33,6 @@ export default class Cut extends IInput {
|
||||
|
||||
cut() {
|
||||
this.blueprint.template.getCopyInputObject().copied()
|
||||
this.blueprint.template.getInputObject(KeyboardCanc).fire()
|
||||
this.blueprint.removeGraphElement(...this.blueprint.getNodes(true))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user