Page 1 of 1
Placing empty space in editor with mouse wheel
Posted: Sun Nov 13, 2005 10:24 am
by Tomi
(I use SDL.) When you move mouse wheel in editor, it places empty space. I think that placing the middle button element would be more logical. It seems that moving mouse wheel = pressing a button with some weird button code.
Code: Select all
(editor.c line 2496)
#define BUTTON_ELEMENT(button) ((button) == 1 ? new_element1 : \
(button) == 2 ? new_element2 : \
(button) == 3 ? new_element3 : EL_EMPTY)
Posted: Sat Nov 19, 2005 12:46 pm
by Holger
> When you move mouse wheel in editor, it places empty space.
Urgs. Indeed... :-o
> I think that placing the middle button element would be more logical.
Well, I think that doing nothing would be the best! (Or to scroll the element list, or vertically scrolling the level area, or something like that...)
> It seems that moving mouse wheel = pressing a button with some weird
> button code.
Yep, that's what I also suppose. Unfortunately, I do not use a wheel mouse, so I never noticed that bug! :-(
I think that a lot of other areas are also affected by this bug, where I simply check for "is any button pressed" (over checkboxes, for example), and where I should only allow the first or the first three mouse buttons... :-/
I should check all this at a system with a wheel mouse, and should fix some things. In the editor, I have explicitly fixed it where I thought it could happen, but wasn't able to test the result yet.
In any case, thanks a lot for reporting this issue.
This so called Mouse Bug...
Posted: Tue Nov 29, 2005 3:27 pm
by RAP
Well, I used to have a mouse with a wheel mouse and it works fine on
buttons, editors and others...
Whoops! I almost forgot! When you use the mouse wheel, click one of the
level scoll numbers and it srcolls 5 levels at a time, depending where did
you go level to level...
So Tomi, why did you post the bug?
Posted: Wed Nov 30, 2005 3:51 pm
by Tomi
> ...it srcolls 5 levels at a time, depending where did you go level to level...
> So Tomi, why did you post the bug?
The problem isn't when you *press* the wheel (which works as middle button just as expected), but when you
*scroll* it - it places empty space to the square you're pointing on.
btw: When I tried to understand your post I've tried it on the level counter and found out that it, of course, fails even with counters:
Code: Select all
(editor.c few lines below)
#define BUTTON_STEPSIZE(button) ((button) == 1 ? 1 : (button) == 2 ? 5 : 10)
So scrolling the wheel when on a counter button adds/substracts 10 from the value.
Only "infected" files should be editor.*, libgame/gadgets.*, maybe events.* and similar.