Client
This page is in progress Please check back later for additional changes |
w Namespace
- doGoToCoord(y: number, x: number)
- typeChar(char: string, doNotMoveCursor: boolean, color: number, noNewline: boolean, undoCursorOffset: boolean, bgColor: number)
- getChar(tileX: number, tileY: number, charX: number, charY: number)
- moveCursor(direction: string, preserveVertPos, amount: number)
- fetchUnloadedTiles()
- getTileVisibility()
- getCenterCoords(): Array[number, number]
- broadcastReceive(force: boolean)
- broadcastCommand(data: string, includeUsername: boolean)
- jquery(callback: function)
- redraw()
- reloadRenderer()
- setRedraw()
- setTileRedraw(tileX: number, tileY: number)
- setTileRender(tileX: number, tileY: number)
- setTransparency(transparent: boolean)
- render(redraw: boolean)
- changeFont(fontData: string, noReload)
- fixFonts(mainType: string)
- loadFont(name: string, path: string, callback: function)
- changeSpecialCharFont(fontData: string, noReload: boolean)
- enableCombining(noReload: boolean)
- disableCombining(noReload: boolean)
- enableSurrogates(noReload: boolean)
- disableSurrogates(noReload: boolean)
- enableColors(noReload: boolean)
- disableColors(noReload: boolean)
- basic()
- restore()
- night(ignoreUnloadedPattern: boolean)
- day(reloadStyle: boolean)
- rotate(speed: number)
- hideChat()
- showChat()
- disableDragging()
- enableDragging()
- disableCursor()
- enableCursor()
- disableScrolling()
- enableScrolling()
- setMouseCursor(cursor: string)
- resetMouseCursor()
- setDragCursor(cursor: string)
- resetDragCursor()
- changeSocket(address: string)
- changeColor(color: string)
- changeBgColor(color: string)
- fetchUpdates(margin: number)
- splitTile(str: string): string
- shiftZoombar()
- setFlushInterval(rate: number)
- registerHook(event: string, callback: function)
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();
}
});