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

Support for nested QueryStringBaseWindow #3184

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

Support for nested QueryStringBaseWindow #3184

DorpsGek opened this issue Sep 8, 2009 · 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, 2009

Terkhen opened the ticket and wrote:

More precisely, I made the following changes:

- QueryStringBaseWindow::DrawEditBox now accepts nested widgets.

- Window::SetFocusedWidget now accepts nested widgets as parameter.

- Allow OskWindow to have a window with nested widgets as a parent.

You can find an example of a finished nested QueryStringBaseWindow at the "Choose town name before creation" patch, which I'll be submitting shortly after this one.

Attachments

Reported version: trunk
Operating system: All


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

DorpsGek commented Sep 9, 2009

Alberth wrote:

Nice patch, comment attached.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3184#comment6627

@DorpsGek
Copy link
Member Author

Terkhen wrote:

Thanks, here is a new version.

# # # No white space at the end of the line!

^ They have been corrected.

# # # For the quest to eliminate magic constant values from the window code, please replace them with the appropriate WD_* value from window_gui.h (WidgetDrawDistances enum).

^ I'm not sure that I got the vertical parts right (maybe I am mistaking WD_FRAMERECT_TOP and WD_FRAMERECT_BOTTOM). Using (WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM) with top and bottom I was able to align the text into the edit box better (see attached screenshots), but since I don't know if the current alignment is motived by fonts other than the standard, I left it as it was.

# # # The if() throws compiler warnings all over the place (ie for many files):

^ I can't test compilation with other platforms right now, at MSVC it doesn't give any warnings. It should be corrected now anyways.

NULL pointers in the nested_array:
Since the prgrammer has control when this code is used, it may not be bad choice to let the program crash

^ I left them uncorrected, but I added asserts to inform about the problem.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3184#comment6629

@DorpsGek
Copy link
Member Author

Alberth closed the ticket.

Reason for closing: Implemented

in r17502


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

@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