News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

r7038 - Untrustworthy buttons

Started by Ters, January 23, 2014, 04:13:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ters

The close button of at least some windows (depot, stop, vehicle) respond to mouse presses in some regions by lighting up, but does not respond to the click when the mouse button is released, except by darkening again. Other areas light up when the mouse button is pressed, and close the window when the mouse button is released. Other buttons in the titlebar respond where ever the are clicked. Some buttons trigger on the mouse down event, rather than the up event.

Furthermore, the entire button usually do not light up. This probably has something to do with the dirty rectangles.

TurfIt

I can't duplicate the close gadget not closing the window on mouse up, unless the mouse is moved off the gadget before release. The close taking action only on release over the gadget is reasonable, and should remain IMHO. All other gadgets take action on mouse down, should they all be changed to mouse up?

Some of the buttons not lighting up: next, prev, min_size, help, appears by design. Code comments say only the close and stick should, yet the goto button does too. Makes no sense to me...

Not lighting up in some windows appears due to the theme patch commenting out the code that marks the screen tiles dirty when the gui window is dirty. Absolutely no idea what this has to do with themes and was done...

Partial lighting up also appears due to the theme patch. The size of the close gadget is taken as the size of all, and used as the size to highlight. Doesn't seem right either...

The themes support still seems half baked to me - is anybody actually working to finish/fix this?

Ters

It seems to be the lowest four pixels of the close button that does not cause the window to close, which is a bit odd, because there is no corresponding problem with the help, goto and pin buttons.

Windows are not the only thing where the dirty rectangles are not working. Among other things, steam trains leave lots of tiny white specs lingering long after the rest of the smoke has disappeared.

I believe development of theme support was abandoned half-way through due to disagreements.

Dwachs

Quote from: TurfIt on January 28, 2014, 02:38:51 AM
Not lighting up in some windows appears due to the theme patch commenting out the code that marks the screen tiles dirty when the gui window is dirty. Absolutely no idea what this has to do with themes and was done...
This is from this old commit, apparently dysfunctional from the start: (r6171)
https://github.com/aburch/simutrans/commit/3a94a87cbff1b68dcea23795bc2bd808810a5e04
Parsley, sage, rosemary, and maggikraut.

prissi

The goto button is not goto, but a follow button (or it is an error). As such, it will be lighted up, until the location is changed.

But in r7041 the light up should work for the first time.

Ters

Quote from: prissi on January 28, 2014, 04:28:05 PM
The goto button is not goto, but a follow button (or it is an error).

For vehicles, it is follow. For depots, stops, factories and other static things, it is go to.

TurfIt

#6
Quote from: prissi on January 28, 2014, 04:28:05 PM
But in r7041 the light up should work for the first time.

Action rather than discussion  ;)
r7041 looks ok. I see all gadgets were changed to action on mouse release, so that answers that.

The goto/follow button still wasn't quite working consistently, I believe its fixed with r7042.



EDIT:
Quote from: Ters on January 28, 2014, 05:35:54 AM
Among other things, steam trains leave lots of tiny white specs lingering long after the rest of the smoke has disappeared.

Good lord that's horrible. It's been months since I last touched the dirty tiles, and I don't think anyone else has... How can you be the first to report, and me not even notice it. yeesh.

Ters

#7
Quote from: TurfIt on January 28, 2014, 09:46:25 PM
Good lord that's horrible. It's been months since I last touched the dirty tiles, and I don't think anyone else has... How can you be the first to report, and me not even notice it. yeesh.

Maybe it's just some weirdness with my build, like no threading. But as far as I can see, I have no relevant changed files (only some argc and argv fix in simsys*.cc for a newer version of mingw).

Quote from: prissi on January 28, 2014, 04:28:05 PM
But in r7041 the light up should work for the first time.

The buttons behave properly as far as I can tell now (r7044). Thanks.

Dwachs

Quote from: TurfIt on January 28, 2014, 09:46:25 PM

EDIT:
Good lord that's horrible. It's been months since I last touched the dirty tiles, and I don't think anyone else has... How can you be the first to report, and me not even notice it. yeesh.
should be correct now, r7046
Parsley, sage, rosemary, and maggikraut.

Ters

#9
Yes, looks much better now. For a while, it almost looked like the ancient fountain dirty rectangle bug had been fixed as well, but that one is still around. As far as I know, it's cause is very different, so it would have been surprising.

Edit:
No, wait. Now the cursor is leaving droppings in some circumstances. The query cursor in pak64 at least does this. Reproducing is not easy, as it probably only happens when the view offset modulo something equals certain values.

Dwachs

Both, the mouse pointer as well as the pak64 fountain glitch should be fixed with r7047.
Parsley, sage, rosemary, and maggikraut.

Ters

No fair. I can hardly report bugs fast enough to keep up with this rate of bug fixing.  :D

Yona-TYT

Wao if that is working quick on bug fixes... :thumbsup: