mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
36 lines
972 B
JavaScript
36 lines
972 B
JavaScript
import IdentifierEntity from "./IdentifierEntity.js"
|
|
import IEntity from "./IEntity.js"
|
|
|
|
export default class KeyBindingEntity extends IEntity {
|
|
|
|
static attributes = {
|
|
ActionName: "",
|
|
bShift: false,
|
|
bCtrl: false,
|
|
bAlt: false,
|
|
bCmd: false,
|
|
Key: {
|
|
type: IdentifierEntity
|
|
},
|
|
}
|
|
|
|
static {
|
|
this.cleanupAttributes(this.attributes)
|
|
}
|
|
|
|
constructor(values = {}) {
|
|
values.ActionName = values.ActionName ?? ""
|
|
values.bShift = values.bShift ?? false
|
|
values.bCtrl = values.bCtrl ?? false
|
|
values.bAlt = values.bAlt ?? false
|
|
values.bCmd = values.bCmd ?? false
|
|
super(values)
|
|
/** @type {String} */ this.ActionName
|
|
/** @type {Boolean} */ this.bShift
|
|
/** @type {Boolean} */ this.bCtrl
|
|
/** @type {Boolean} */ this.bAlt
|
|
/** @type {Boolean} */ this.bCmd
|
|
/** @type {IdentifierEntity} */ this.Key
|
|
}
|
|
}
|