You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
Move to Renderer V2
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
import { IRoomObject } from '@nitrots/api';
|
||||
import { RoomObjectEvent } from './RoomObjectEvent';
|
||||
|
||||
export class RoomObjectMouseEvent extends RoomObjectEvent
|
||||
{
|
||||
public static CLICK: string = 'ROE_MOUSE_CLICK';
|
||||
public static DOUBLE_CLICK: string = 'ROE_MOUSE_DOUBLE_CLICK';
|
||||
public static MOUSE_MOVE: string = 'ROE_MOUSE_MOVE';
|
||||
public static MOUSE_DOWN: string = 'ROE_MOUSE_DOWN';
|
||||
public static MOUSE_DOWN_LONG: string = 'ROE_MOUSE_DOWN_LONG';
|
||||
public static MOUSE_UP: string = 'ROE_MOUSE_UP';
|
||||
public static MOUSE_ENTER: string = 'ROE_MOUSE_ENTER';
|
||||
public static MOUSE_LEAVE: string = 'ROE_MOUSE_LEAVE';
|
||||
|
||||
private _eventId: string = '';
|
||||
private _altKey: boolean;
|
||||
private _ctrlKey: boolean;
|
||||
private _shiftKey: boolean;
|
||||
private _buttonDown: boolean;
|
||||
private _localX: number;
|
||||
private _localY: number;
|
||||
private _spriteOffsetX: number;
|
||||
private _spriteOffsetY: number;
|
||||
|
||||
constructor(type: string, object: IRoomObject, eventId: string, altKey: boolean = false, ctrlKey: boolean = false, shiftKey: boolean = false, buttonDown: boolean = false)
|
||||
{
|
||||
super(type, object);
|
||||
|
||||
this._eventId = eventId;
|
||||
this._altKey = altKey;
|
||||
this._ctrlKey = ctrlKey;
|
||||
this._shiftKey = shiftKey;
|
||||
this._buttonDown = buttonDown;
|
||||
}
|
||||
|
||||
public get eventId(): string
|
||||
{
|
||||
return this._eventId;
|
||||
}
|
||||
|
||||
public get altKey(): boolean
|
||||
{
|
||||
return this._altKey;
|
||||
}
|
||||
|
||||
public get ctrlKey(): boolean
|
||||
{
|
||||
return this._ctrlKey;
|
||||
}
|
||||
|
||||
public get shiftKey(): boolean
|
||||
{
|
||||
return this._shiftKey;
|
||||
}
|
||||
|
||||
public get buttonDown(): boolean
|
||||
{
|
||||
return this._buttonDown;
|
||||
}
|
||||
|
||||
public get localX(): number
|
||||
{
|
||||
return this._localX;
|
||||
}
|
||||
|
||||
public set localX(k: number)
|
||||
{
|
||||
this._localX = k;
|
||||
}
|
||||
|
||||
public get localY(): number
|
||||
{
|
||||
return this._localY;
|
||||
}
|
||||
|
||||
public set localY(k: number)
|
||||
{
|
||||
this._localY = k;
|
||||
}
|
||||
|
||||
public get spriteOffsetX(): number
|
||||
{
|
||||
return this._spriteOffsetX;
|
||||
}
|
||||
|
||||
public set spriteOffsetX(k: number)
|
||||
{
|
||||
this._spriteOffsetX = k;
|
||||
}
|
||||
|
||||
public get spriteOffsetY(): number
|
||||
{
|
||||
return this._spriteOffsetY;
|
||||
}
|
||||
|
||||
public set spriteOffsetY(k: number)
|
||||
{
|
||||
this._spriteOffsetY = k;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user