[Ohrrpgce] SVN: teeemcee/8621 gfx_sdl: Add mouse wheel up/down as mouse buttons.

James Paige Bob at hamsterrepublic.com
Sat Apr 8 19:01:17 PDT 2017


I am surprised!

Both that this wasn't already supported, and that the wheel-as-buttons
thing was an SDL 1.2 thing. I had mistakenly assumed that the wheel was
buttons at a hardware level

I learn something new every day!

(And forget 4/5ths of it every night!)

On Saturday, April 8, 2017, Ralph Versteegen <teeemcee at gmail.com> wrote:

>
>
> On 9 April 2017 at 11:12, <subversion at hamsterrepublic.com
> <javascript:_e(%7B%7D,'cvml','subversion at hamsterrepublic.com');>> wrote:
>
>> teeemcee
>> 2017-04-08 16:12:25 -0700 (Sat, 08 Apr 2017)
>> 222
>> gfx_sdl: Add mouse wheel up/down as mouse buttons.
>>
>> Also allow checking these buttons using "mouse button" and "mouse click",
>> but it's undocumented, because other backends don't support it yet.
>> Added a test to collider.rpg
>> ---
>> U   wip/gfx_sdl.bas
>> U   wip/scancodes.bi
>> U   wip/scriptcommands.bas
>> U   wip/testgame/collider.hss
>> U   wip/testgame/collider.rpg
>>
>
> Wait, this isn't right. In fact, gfx_sdl was the only backend that didn't
> support the mouse wheel! All other backends return the amount it moved, so
> I'll change gfx_sdl to do the same. Then allmodex can translate that into
> up/down button presses for people who want that.
> And anyway, SDL 2 no longer reports the mouse wheel as a pair of buttons
> like SDL 1.2. Instead it reports the amount the wheel moved.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20170408/6af2db1a/attachment.htm>


More information about the Ohrrpgce mailing list