This commit is contained in:
Bill 2021-09-24 05:04:13 -04:00
parent 2c2b909f01
commit 62a23cd0e2
3 changed files with 4 additions and 3 deletions

View File

@ -8,4 +8,5 @@ export class MouseEventType
public static MOUSE_UP: string = 'mouseup';
public static ROLL_OVER: string = 'mouseover';
public static ROLL_OUT: string = 'mouseout';
public static RIGHT_CLICK: string = 'contextmenu';
}

View File

@ -18,7 +18,7 @@ export interface IRoomRenderingCanvas
skipSpriteVisibilityChecking(): void;
resumeSpriteVisibilityChecking(): void;
getPlaneSortableSprites(): SortableSprite[];
handleMouseEvent(k: number, _arg_2: number, _arg_3: string, _arg_4: boolean, _arg_5: boolean, _arg_6: boolean, _arg_7: boolean): boolean;
handleMouseEvent(x: number, y: number, type: string, altKey: boolean, ctrlKey: boolean, shiftKey: boolean, buttonDown: boolean): boolean;
getSortableSpriteList(): RoomObjectSpriteData[];
getDisplayAsTexture(): RenderTexture;
id: number;

View File

@ -948,13 +948,13 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
return didHitSprite;
}
protected createMouseEvent(x: number, y: number, _arg_3: number, _arg_4: number, type: string, _arg_6: string, _arg_7: boolean, _arg_8: boolean, _arg_9: boolean, _arg_10: boolean): RoomSpriteMouseEvent
protected createMouseEvent(x: number, y: number, localX: number, localY: number, type: string, tag: string, altKey: boolean, ctrlKey: boolean, shiftKey: boolean, buttonDown: boolean): RoomSpriteMouseEvent
{
const screenX: number = (x - (this._width / 2));
const screenY: number = (y - (this._height / 2));
const canvasName = `canvas_${ this._id }`;
return new RoomSpriteMouseEvent(type, ((canvasName + '_') + this._eventId), canvasName, _arg_6, screenX, screenY, _arg_3, _arg_4, _arg_8, _arg_7, _arg_9, _arg_10);
return new RoomSpriteMouseEvent(type, ((canvasName + '_') + this._eventId), canvasName, tag, screenX, screenY, localX, localY, ctrlKey, altKey, shiftKey, buttonDown);
}
protected bufferMouseEvent(k: RoomSpriteMouseEvent, _arg_2: string): void