Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highlight vehicles properly in rail depot window #337

Closed
DorpsGek opened this issue Sep 8, 2006 · 3 comments
Closed

highlight vehicles properly in rail depot window #337

DorpsGek opened this issue Sep 8, 2006 · 3 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Sep 8, 2006

GrimRC opened the ticket and wrote:

My patch makes the rail depot window highlight trains' and their wagons properly when dragging. Currently, only the clicked vehicle is highlighted, but with my patch, all selected vehicles are highlighted when the 'ctrl' key is pressed. This makes it clearer that pressing 'ctrl' allows dragging of large chunks of a train, rather than just one component, as when 'ctrl' is not pressed.

Attached is a screenshot showing rail vehicle dragging, with the patch applied.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/337
@DorpsGek
Copy link
Member Author

GrimRC wrote:

I've created 3 new patches. Below, they are shown diagrammatically like sets.

drag_bug-fix.patch ⊂ highlight.patch ⊂ train_drag.patch

'drag_bug-fix.patch' fixes a bug in the dragging mechanism, whereby changing the mouse-mode with the keyboard (say bulldozer mode) would not cancel the vehicle selection in a depot window properly. A screenshot of the bug, 'drag_bug.png', is attached.

'highlight.patch' contains 'drag_bug-fix.patch'. It highlights selected vehicles (plural!) properly in a train depot window (when dragging with the ctrl key held down); this can almost be considered a second bug-fix. A screenshot demonstrating the improved dragging behaviour is attached as 'highlight.png'.

'train_drag.patch' contains 'highlight.patch', and improves train vehicle dragging even further by changing the mouse cursor sprite to several vehicles when dragging with the ctrl key, rather than just one particular vehicle; this can almost be considered a bug-fix, too. It works by adding an array of sprites and another array of their offsets to struct 'CursorVars'. The current implementation does not remove the old cursor sprite method, but just supplements it. This may not be desirable, as it is basically redundant. I can improve the way this patch works if needed; for example, I could remove the old sprite cursor method and make all cursor-dependent code use the new, proposed method (my sprite array). A screenshot is attached as 'train_drag.png', demonstrating the new, more correct and prettier dragging behaviour.

Summarising, all 3 patches seem bug-free, and the first 2 patches seem clean. The third, biggest and more experimental patch 'train_drag.patch' might need criticism, as it might not quite be how 'pretty train dragging' should be implemented. The patches apply to trunk R6472.


This comment was imported from FlySpray: https://bugs.openttd.org/task/337#comment530

@DorpsGek
Copy link
Member Author

GrimRC wrote:

The patches & screenshots (I accidentally hit 'add comment') attached.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/337#comment531

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 5, 2008

SmatZ closed the ticket.

Reason for closing: Implemented

Bug fixed in r12166
Highlight implemented in r12576
Cursor change won't be implemented


This comment was imported from FlySpray: https://bugs.openttd.org/task/337

@DorpsGek DorpsGek closed this as completed Apr 5, 2008
@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant