From 94186f3ef68c12b88bdce54c8011f47136254339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 9 Jan 2021 23:28:56 +0100 Subject: [PATCH] add cursor changing (WIP). --- src/component/internal/messages.ts | 10 ++++++++++ src/component/main.vue | 4 ++-- src/component/overlay.vue | 24 +++++++++++++++--------- src/component/types/state.ts | 7 +++++++ 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/src/component/internal/messages.ts b/src/component/internal/messages.ts index b0fe5566..b721c062 100644 --- a/src/component/internal/messages.ts +++ b/src/component/internal/messages.ts @@ -81,6 +81,16 @@ export class NekoMessages extends EventEmitter { // TODO: Handle. } + // TODO: Refactor. + protected ['cursor/image']({ payload }: any) { + console.log('cursor/image') + Vue.set(this.state.control, 'cursor', { + uri: payload.Uri, + hot_x: payload.Xhot, + hot_y: payload.Yhot, + }) + } + ///////////////////////////// // Signal Events ///////////////////////////// diff --git a/src/component/main.vue b/src/component/main.vue index c45a640a..99e7f824 100644 --- a/src/component/main.vue +++ b/src/component/main.vue @@ -4,11 +4,10 @@