Client
Client Documentation
RegionSelection
- Constructor: RegionSelection
- Properties
- charColor: string
- color: string
- tiled: boolean
- Methods
- onselection
- coordA: Array[number, number, number, number]
- coordB: Array[number, number, number, number]
- regWidth: number
- regHeight: number
- startSelection
- stopSelectionUI
- onselection
Code example:
var selection = new RegionSelection();
this.charColor = "#00AA00";
this.color = "rgba(0, 0, 255, 0.1)";
this.tiled = false;
selection.onselection(function(coordA, coordB, regWidth, regHeight) {
console.log(coordA, coordB, regWidth, regHeight);
});
w.on("keyDown", function(e) {
if(checkKeyPress(e, "ALT+H")) {
selection.startSelection();
}
});