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

BuildObjectWindow: ensure selected object visibility / restore previously selected object #5503

Closed
DorpsGek opened this issue Mar 15, 2013 · 6 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

sbr opened the ticket and wrote:

The first patch ensure that the selected object class is visible in the class selection matrix.
The second patch restore the selected object when reopening the window.
The third patch ensure that the selected object is visible in the object selection matrix.

Please find attached these three patches against r25086.

Attachments

Reported version: trunk
Operating system: All


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

sbr wrote:

-Change: move new methods inside private scope of BuildObjectWindow.
-Fix: clear unsigned-signed comparison warning.
-Fix: compare spec index with SpecCount not with UiSpecCount.
-Fix: tests if an object is selected before trying to make it visible.

Please find attached these three patches against r25087.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5503#comment12089

@DorpsGek
Copy link
Member Author

DorpsGek commented May 8, 2013

Alberth wrote:

Suggestion: also restore the width of the matrix?
(Drag the object window so the matrix has several columns, select the 'bomb' to delete an object, re-select the object window, and you're back to a single column of objects.)


This comment was imported from FlySpray: https://bugs.openttd.org/task/5503#comment12183

@DorpsGek
Copy link
Member Author

DorpsGek commented May 9, 2013

sbr wrote:

I have an old unpublished patch that restore the size of BuildRailStationWindow (by storing the count of rows/columns of the matrix).
I'll update it and also adapt it to the BuildObjectWindow; these two windows could benefit from this functionality.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5503#comment12189

@DorpsGek
Copy link
Member Author

sbr wrote:

The first three patches are bumped to r25246.
The fourth patch restore the previous size of the BuildObjectWindow. The window dimension aren't stored in pixels. It's the number of row of the classes list and the number of columns of the types matrix that are stored. This allow to recompute the size of the window by taking in account the font size.

Please find attached these four patches against r25246.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5503#comment12222

@DorpsGek
Copy link
Member Author

Alberth wrote:

Thrown in trunk r25281-r25284

- Fixed some bits in the Doxygen comments,
- 01 had a space behind the cast, and the "<" of the object test should be "<=" (counts are one bigger than the largest index),
- 03 was simplified a lot, and added prevention in reducing the window in size (if one dimension was larger but the other one was smaller).

thanks for the patches. Eye-candy players will like it a lot.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5503#comment12236

@DorpsGek
Copy link
Member Author

Alberth closed the ticket.

Reason for closing: Implemented


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

@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 7, 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