Merge branch 'master' into jgrpp
# Conflicts: # Makefile.src.in # findversion.sh # projects/determineversion.vbs # src/aircraft_cmd.cpp # src/lang/dutch.txt # src/linkgraph/linkgraph_gui.cpp # src/linkgraph/linkgraph_gui.h # src/order_cmd.cpp # src/settings_gui.cpp # src/smallmap_gui.cpp # src/town_cmd.cpp # src/viewport.cpp # src/water_map.h
This commit is contained in:
@@ -84,4 +84,24 @@ static inline int ScaleGUITrad(int value)
|
||||
return UnScaleGUI(value * ZOOM_LVL_BASE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Short-hand to apply font zoom level.
|
||||
* @param value Pixel amount at #ZOOM_LVL_BEGIN (full zoom in).
|
||||
* @return Pixel amount at #ZOOM_LVL_FONT (current interface size).
|
||||
*/
|
||||
static inline int UnScaleFont(int value)
|
||||
{
|
||||
return UnScaleByZoom(value, ZOOM_LVL_FONT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Scale traditional pixel dimensions to Font zoom level.
|
||||
* @param value Pixel amount at #ZOOM_LVL_BASE (traditional "normal" interface size).
|
||||
* @return Pixel amount at #ZOOM_LVL_FONT (current interface size).
|
||||
*/
|
||||
static inline int ScaleFontTrad(int value)
|
||||
{
|
||||
return UnScaleFont(value * ZOOM_LVL_BASE);
|
||||
}
|
||||
|
||||
#endif /* ZOOM_FUNC_H */
|
||||
|
||||
Reference in New Issue
Block a user