Commit Graph

139 Commits (e5af5907ecfe3845adc613a3312695ed8b40bffc)

Author SHA1 Message Date
Peter Nelson e5af5907ec Change: Make all dropdown lists extend width if necessary.
This removes the auto_width parameter from ShowDropDown(At).
1 year ago
Peter Nelson 5bc9d00735 Cleanup: Let GetStringBoundingBox deal with buffer. 1 year ago
PeterN c962c77306
Fix: Incorrect available height for dropdowns due to unsigned promotion. (#10264)
Dropdowns which are taller than the main window should automatically have
a scrollbar added. This did not work for toolbar dropdown as the location
near the top of the window resulted in an unsigned underflow.
2 years ago
Peter Nelson 890b2666d3 Change: Use scaled WidgetDimensions. 2 years ago
Peter Nelson 6f95e04005 Change: Use Rect helpers for widget drawing.
This replaces repetitive and sometimes unwieldy use of constants.
2 years ago
Peter Nelson 632464a623 Codechange: Use Rect in DropDownListItem::Draw(). 2 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 3 years ago
glx22 e66e25ff71 Fix #9269, f6d5c01: Hide windows without abusing WC_INVALID 3 years ago
frosch f96f113951 Codechange: use IterateFromBack/Front only if the order is important.
Use Iterate if the order does not matter.
3 years ago
Peter Nelson d8e06e590a Codechange: Make GetCurrentRect() conform to usual Rect bounds, and reuse it.
Similar code is already repeated in other locations.
3 years ago
rubidium42 6bca9e090d Codechange: add SetDParamStr that accepts std::string& 3 years ago
Peter Nelson 4791ff2862 Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed. 3 years ago
glx22 14e92bd8e2 Codechange: Replace window related FOR_ALL with range-based for loops 3 years ago
PeterN ae7f07de74
Fix: Incorrect vertical alignment of icon and text in DropDownListIconItem. (#9133)
This happens if the bounding dimensions are changed so that each item is the same size, as happens on the railtype/roadtype dropdown lists, as the vertical offset was calculated before this dimension is changed.
3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Michael Lutz a49fdb7ebb Codechange: Store base set related texts in std::strings. 4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
glx22 3b4f224c0b
Fix #7494: std::sort() and qsort() use different comparators (#7495) 5 years ago
Michael Lutz c7b9987d08 Codechange: Switch DropDownList to directly use std::vector, thus making AutoDeleteSmallVector obsolete.
DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use
of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate
copy-free code for most situations.
5 years ago
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
peter1138 b56ea5ca27 Add: Generic drop down list string item with icon. 5 years ago
peter1138 811bf22620 Codechange: Use Colours type instead of byte. 5 years ago
J0an Josep 628af2fabc Fix #6060: When opening a scrollable dropdown above a widget, scroll it to its very bottom.
This "prevents" the fast movement towards the bottom when holding down the mouse button.
5 years ago
Juanjo 226dbcb422 Codechange #6060: Allow drawing dropdown lists with scrollbars above the widgets 5 years ago
PeterN 5ff0c24993 Fix #6780: Some windows didn't get updated from OnTick() (#7048) 6 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
peter1138 902663176d (svn r27820) -Fix: Allow dropdown to be drawn above origin widget even with scrollbar (Juanjo) 7 years ago
michi_cc 2b8bb12d62 (svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists. 9 years ago
frosch c9114af706 (svn r27131) -Fix: Dropdown- and tooltip-windows should not steal the focus. 10 years ago
frosch 925fb7bd37 (svn r26691) -Codechange: Simplify ShowDropDownListAt (Juanjo) 10 years ago
frosch d7736e3797 (svn r26680) -Codechange: Simplify dropdown height computation. (Juanjo) 10 years ago
frosch 06b210ff42 (svn r26629) -Fix [FS#6012]: If the video driver fails to supply a list of resolutions, display an error message. 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
rubidium b1bcd1adab (svn r26128) -Fix: erroneous cast 11 years ago
rubidium 50fdf5e30c (svn r26121) -Codechange: add some asserts after dynamic casts to show they shouldn't return NULL ever 11 years ago
rubidium 83eeba28b7 (svn r26086) -Codechange: use AutoDeleteSmallVector instead std::list for dropdowns 11 years ago
planetmaker 276c41ee1d (svn r25828) -Doc [FS#5785]: Description of parameters for ShowDropDownMenu was partially swapped (3298) 11 years ago
frosch 8157a8afd8 (svn r25290) -Add: Assign string names to notable windows. 11 years ago
frosch 56e4a8c4d6 (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
frosch 88fff21b93 (svn r24308) -Add: ShowDropDownListAt() for drawing dropdown windows independent of dropdown widgets. 12 years ago
frosch 6207a6017f (svn r24307) -Codechange: Move all interaction of the dropdown window with widgets of the parent window to a method of the parent window. 12 years ago
michi_cc 6a70abbd99 (svn r24136) -Feature [FS#4465]: Autoreplace vehicles only when they get old. (Vikthor) 12 years ago
alberth 4af8c2d5e1 (svn r23704) -Doc: Doxygen comment fixes and additions. 13 years ago
truebrain e9f584ac21 (svn r23531) -Codechange: document and rename widgets to be consistent and understandable 13 years ago