diff options
Diffstat (limited to 'proto-mouse')
-rw-r--r-- | proto-mouse/ftnoir_protocol_mouse.h | 29 | ||||
-rw-r--r-- | proto-mouse/mouse-settings.hpp | 2 |
2 files changed, 16 insertions, 15 deletions
diff --git a/proto-mouse/ftnoir_protocol_mouse.h b/proto-mouse/ftnoir_protocol_mouse.h index 2b88ae1d..c8709604 100644 --- a/proto-mouse/ftnoir_protocol_mouse.h +++ b/proto-mouse/ftnoir_protocol_mouse.h @@ -20,39 +20,40 @@ class mouse : public TR, public IProtocol { Q_OBJECT + static int get_delta(int val, int prev); + static int get_value(double val, double sensitivity, bool is_rotation); + + int last_x = 0, last_y = 0; + mouse_settings s; + public: mouse() = default; module_status initialize() override { return status_ok(); } void pose(const double* headpose) override; QString game_name() override; - - int last_x = 0, last_y = 0; -private: - static int get_delta(int val, int prev); - static int get_value(double val, double sensitivity, bool is_rotation); - - struct mouse_settings s; }; class MOUSEControls: public IProtocolDialog { Q_OBJECT -public: - MOUSEControls(); - void register_protocol(IProtocol *) {} - void unregister_protocol() {} -private: + Ui::UICMOUSEControls ui; mouse_settings s; + private slots: void doOK(); void doCancel(); + +public: + MOUSEControls(); + void register_protocol(IProtocol *) override {} + void unregister_protocol() override {} }; class mouseDll : public Metadata { Q_OBJECT - QString name() { return tr("mouse emulation"); } - QIcon icon() { return QIcon(":/images/mouse.png"); } + QString name() override { return tr("mouse emulation"); } + QIcon icon() override { return QIcon(":/images/mouse.png"); } }; diff --git a/proto-mouse/mouse-settings.hpp b/proto-mouse/mouse-settings.hpp index 71726588..c485e534 100644 --- a/proto-mouse/mouse-settings.hpp +++ b/proto-mouse/mouse-settings.hpp @@ -20,4 +20,4 @@ struct mouse_settings : opts { } // ns mouse_impl -using mouse_impl::mouse_settings; +using mouse_settings = mouse_impl::mouse_settings; |