mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-24 07:44:42 +08:00
Window introduced
This commit is contained in:
26
js/input/mouse/MouseOpenWindow.js
Normal file
26
js/input/mouse/MouseOpenWindow.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import IMouseClick from "./IMouseClick"
|
||||
import WindowElement from "../../element/WindowElement"
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
* @extends {IMouseClick<T>}
|
||||
*/
|
||||
export default class MouseOpenWindow extends IMouseClick {
|
||||
|
||||
#window
|
||||
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.windowType ??= "window"
|
||||
super(target, blueprint, options)
|
||||
}
|
||||
|
||||
clicked(location) {
|
||||
}
|
||||
|
||||
unclicked(location) {
|
||||
this.#window = new WindowElement({
|
||||
type: this.options.windowType
|
||||
})
|
||||
this.blueprint.append(this.#window)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user