mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add overlay events.
This commit is contained in:
parent
bd5f02223a
commit
de62a349ed
@ -39,6 +39,10 @@ export interface NekoEvents {
|
|||||||
['room.screen.updated']: (width: number, height: number, rate: number) => void
|
['room.screen.updated']: (width: number, height: number, rate: number) => void
|
||||||
['room.clipboard.updated']: (text: string) => void
|
['room.clipboard.updated']: (text: string) => void
|
||||||
['room.broadcast.status']: (isActive: boolean, url?: string) => void
|
['room.broadcast.status']: (isActive: boolean, url?: string) => void
|
||||||
|
|
||||||
|
// overlay events
|
||||||
|
['overlay.click']: () => void
|
||||||
|
['overlay.contextmenu']: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NekoMessages extends EventEmitter<NekoEvents> {
|
export class NekoMessages extends EventEmitter<NekoEvents> {
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
@implicitControlRelease="connection.websocket.send('control/release')"
|
@implicitControlRelease="connection.websocket.send('control/release')"
|
||||||
@updateKeyboardModifiers="updateKeyboardModifiers($event)"
|
@updateKeyboardModifiers="updateKeyboardModifiers($event)"
|
||||||
@uploadDrop="uploadDrop($event)"
|
@uploadDrop="uploadDrop($event)"
|
||||||
|
@onAction="events.emit('overlay.' + $event)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
class="neko-overlay"
|
class="neko-overlay"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
:style="{ cursor }"
|
:style="{ cursor }"
|
||||||
@click.stop.prevent
|
@click.stop.prevent="$emit('onAction', 'click')"
|
||||||
@contextmenu.stop.prevent
|
@contextmenu.stop.prevent="$emit('onAction', 'contextmenu')"
|
||||||
@wheel.stop.prevent="onWheel"
|
@wheel.stop.prevent="onWheel"
|
||||||
@mousemove.stop.prevent="onMouseMove"
|
@mousemove.stop.prevent="onMouseMove"
|
||||||
@mousedown.stop.prevent="onMouseDown"
|
@mousedown.stop.prevent="onMouseDown"
|
||||||
|
Loading…
Reference in New Issue
Block a user