mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-20 04:47:35 +08:00
Colors wip
This commit is contained in:
@@ -6,11 +6,17 @@ import Utility from "../Utility"
|
||||
/** @extends {IDraggableControlTemplate<ColorHandlerElement>} */
|
||||
export default class ColorSliderTemplate extends IDraggableControlTemplate {
|
||||
|
||||
createInputObjects() {
|
||||
return [
|
||||
...super.createInputObjects(),
|
||||
]
|
||||
}
|
||||
|
||||
/** @param {[Number, Number]} param0 */
|
||||
adjustLocation([x, y]) {
|
||||
x = 0
|
||||
x = Utility.clamp(x, 0, this.movementSpaceSize[0])
|
||||
y = Utility.clamp(y, 0, this.movementSpaceSize[1])
|
||||
this.locationChangeCallback?.([x / this.movementSpaceSize[0], 1 - y / this.movementSpaceSize[1]])
|
||||
this.locationChangeCallback?.(x / this.movementSpaceSize[0], 1 - y / this.movementSpaceSize[1])
|
||||
return [x, y]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user