mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-20 00:23:22 +02:00
feat: stretch mode
This commit is contained in:
parent
91c03dea2e
commit
5fee8c5545
18 changed files with 234 additions and 79 deletions
|
@ -1,19 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <hyprutils/math/Vector2D.hpp>
|
||||
#include "utils.hpp"
|
||||
|
||||
using namespace Hyprutils::Math;
|
||||
|
||||
/* specifies when a mode wants to be updated */
|
||||
enum EModeUpdate {
|
||||
MOVE, // on mouse move
|
||||
TICK // on tick (i.e. every frame)
|
||||
};
|
||||
|
||||
class IMode {
|
||||
public:
|
||||
/* returns the desired updating strategy for the given mode */
|
||||
virtual EModeUpdate strategy() = 0;
|
||||
/* updates the calculations and returns the new angle */
|
||||
virtual double update(Vector2D pos) = 0;
|
||||
virtual SModeResult update(Vector2D pos) = 0;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue