Commit Graph

88 Commits (fe2bcd2a583fd02416ca394062f8f53bacf0722d)

Author SHA1 Message Date
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 1 year ago
PeterN 09a32f2ce1
Fix #10335: Set initial scrollbar count for object GUI. (#10336)
This previously happened when the window was resized by itself which was fixed by #10196. Explicitly set the count instead.
1 year ago
PeterN eaf1e33bd7
Fix #10021: Object GUI resized when switching between different objects. (#10196)
* Fix: Scale object gui margin by interface scale.

* Fix: Improve padding on object info text.

* Fix #10021: Resizing for 1/2/4 object views didn't account for interface scale.

As halving and doubling padding is problematic due to rounding, it is now
added on lower view counts instead of removing on higher view counts.
2 years ago
Peter Nelson ed60c88b0a Change: Use power-of-2 scaling for some dimensions in GUI.
These are related to drawing sprites that are normally drawn on the
landscape, and should therefore still follow power-of-2 scaling to fit
correctly.
2 years ago
Peter Nelson 890b2666d3 Change: Use scaled WidgetDimensions. 2 years ago
Peter Nelson b6ed595176 Codechange: Prefer suggested widget padding. 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 f5f035a22b Codechange: Make use of Rect Width/Height helpers. 2 years ago
Tyler Trahan 3d45bc4abe Feature: Build objects by area 2 years ago
Andy 039f90d05f
Feature: add sticky pin to Object Selection UI panel (#10019) 2 years ago
Andy a06d323f03
Feature: add shade widget to Object Selection UI panel (#10020) 2 years ago
Michael Lutz c521b965bd Codechange: Don't use a global for the terrforming error tile. 3 years ago
Michael Lutz 58cff7b081 Codechange: Un-bitstuff the remaining on-map commands. 3 years ago
Michael Lutz 0f64ee5ce1 Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz 123c7f99c3 Codechange: Move command callback declarations to the cmd header files. 3 years ago
Michael Lutz a38bbefe1b Codechange: Untangle command code, flags and error string for DoCommand*. 3 years ago
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 3 years ago
Tyler Trahan 66620b497b
Fix #8603: Don't give focus to text filter when opening Object GUI (#9547) 3 years ago
Peter Nelson 7385e780ac Cleanup: nested_array should not be accessed directly.
Replace accesses with GetWidget() as documented.
3 years ago
Didac Perez Parera e760c9fbec
Fix: adjust object and rail station selection window padding to be consistent (#8929)
consistent
3 years ago
stormcone bde5396d11 Add: Hotkey to focus the build object class name filter editbox. 3 years ago
Patric Stout fece1c57ca
Codechange: Suppress warnings when asserts are disabled (#8917) 3 years ago
Didac Perez Parera 3878c4781e
Fix #8817: keep NewGRF order for object class sorting (#8818) 3 years ago
SamuXarick cb95b1d2e7 Codechange: Apply coding style 3 years ago
Didac Perez Parera 96990b2ea7
Feature: Object class selection string filtering (#8603) 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 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
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 5 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
frosch fbd2786329 (svn r27438) -Fix (r27346) [FS#6387]: The build object hotkey no longer checked whether there were any objects defined. 9 years ago
alberth 4f49d636c1 (svn r27346) -Feature: Make the object placement gui an independent window. 9 years ago
alberth a62468bed6 (svn r27345) -Fix-ish: Hide selected view if no object selected. 9 years ago
frosch a8080b6256 (svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad(). 10 years ago
peter1138 587ad940cc (svn r26950) -Codechange: GUI-scale dancing for NewGRF objects window. 10 years ago
frosch 1b0929a9f0 (svn r26640) -Cleanup: Remove some pointless STR_JUST_STRING detours. 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
frosch ba1779b978 (svn r26241) -Codechange: Remember the GRFFile which filled the TextRefStack in the TextRefStack. 11 years ago
frosch 3d5a91424a (svn r25830) -Fix [FS#5742] (r25540): In BuildObjectWindow, ensure the object spec matrix is always initialized. (sbr) 11 years ago
frosch 4fc6cdfbea (svn r25726) -Fix: Right side of object class string was misaligned. (sbr) 11 years ago
frosch c1bf3122ad (svn r25543) -Cleanup: Make the bridge and object picker not restore their previous size, but the previously saved size. 11 years ago
frosch 83a0174ef2 (svn r25540) -Fix: Unify selecting a new object class in the object GUI. (sbr) 11 years ago
frosch d798766f2e (svn r25539) -Codechange: Setup object GUI matrix before restoring selected object, so that the matrix state can be properly set. (sbr) 11 years ago
frosch bcb0e04bf2 (svn r25538) -Fix [FS#5567] (r25283): Use the UI index of the selected object to make it visible when re-opening the build object window. (sbr) 11 years ago
frosch 43ec0bf0c1 (svn r25537) -Codechange: Optionally make WWT_MATRIX compute the number of rows and columns from the resize step size. 11 years ago
frosch df732f2bae (svn r25534) -Codechange: FinishInitNested calls OnResize, no need to setup scrollbar capacity before that. 11 years ago
frosch 5f8f71edf0 (svn r25532) -Fix: Do not make the minimal size of matrix or panel widgets depend on their number of rows, since that changes when resizing the window. 11 years ago
frosch 98fdd20f84 (svn r25531) -Codechange: Use separate function to set data of WWT_MATRIX widgets. 11 years ago
frosch 4e4e635916 (svn r25294) -Feature: Add another button to window title bars to resize the window to its default size. 11 years ago
frosch 8157a8afd8 (svn r25290) -Add: Assign string names to notable windows. 11 years ago