mirror of https://github.com/AxioDL/boo.git
Add system scroll-acceleration property
This commit is contained in:
parent
ce9d877cfa
commit
9c17350524
|
@ -55,6 +55,7 @@ struct SScrollDelta
|
||||||
{
|
{
|
||||||
double delta[2];
|
double delta[2];
|
||||||
bool isFine; /* Use system-scale fine-scroll (for scrollable-trackpads) */
|
bool isFine; /* Use system-scale fine-scroll (for scrollable-trackpads) */
|
||||||
|
bool isAccelerated = false; /* System performs acceleration computation */
|
||||||
|
|
||||||
SScrollDelta operator+(const SScrollDelta& other)
|
SScrollDelta operator+(const SScrollDelta& other)
|
||||||
{return {{delta[0] + other.delta[0], delta[1] + other.delta[1]}, isFine || other.isFine};}
|
{return {{delta[0] + other.delta[0], delta[1] + other.delta[1]}, isFine || other.isFine};}
|
||||||
|
|
|
@ -819,7 +819,7 @@ static inline boo::EMouseButton getButton(NSEvent* event)
|
||||||
boo::SScrollDelta scroll =
|
boo::SScrollDelta scroll =
|
||||||
{
|
{
|
||||||
{(float)[theEvent scrollingDeltaX], (float)[theEvent scrollingDeltaY]},
|
{(float)[theEvent scrollingDeltaX], (float)[theEvent scrollingDeltaY]},
|
||||||
(bool)[theEvent hasPreciseScrollingDeltas]
|
(bool)[theEvent hasPreciseScrollingDeltas], true
|
||||||
};
|
};
|
||||||
booContext->m_callback->scroll(coord, scroll);
|
booContext->m_callback->scroll(coord, scroll);
|
||||||
[textContext handleEvent:theEvent];
|
[textContext handleEvent:theEvent];
|
||||||
|
|
Loading…
Reference in New Issue