MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ScaleGUITrad

Function ScaleGUITrad

src/widget.cpp:49–52  ·  view source on GitHub ↗

* Scale a RectPadding to GUI zoom level. * @param r RectPadding at ZOOM_BASE (traditional "normal" interface size). * @return RectPadding at current interface size. */

Source from the content-addressed store, hash-verified

47 * @return RectPadding at current interface size.
48 */
49static inline RectPadding ScaleGUITrad(const RectPadding &r)
50{
51 return {(uint8_t)ScaleGUITrad(r.left), (uint8_t)ScaleGUITrad(r.top), (uint8_t)ScaleGUITrad(r.right), (uint8_t)ScaleGUITrad(r.bottom)};
52}
53
54/**
55 * Scale a Dimension to GUI zoom level.

Callers 15

UpdateWidgetSizeMethod · 0.70
DrawWidgetMethod · 0.70
DrawLayoutLineFunction · 0.70
UpdateGUIZoomFunction · 0.70
AssignSizePositionMethod · 0.70
GetMaxTreeSpriteSizeFunction · 0.70
UpdateWidgetSizeMethod · 0.70
DrawWidgetMethod · 0.70
UpdateWidgetSizeMethod · 0.70
GetDefaultWidthMethod · 0.70
GetDefaultHeightMethod · 0.70
HandleWindowDraggingFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected