Difference between revisions of "Lua:getScreenDPI"
Jump to navigation
Jump to search
(Created page with "<p> <b>getScreenDPI()</b>: Returns the screen DPI </p> <pre> print(getScreenDPI()) </pre>") |
|||
| Line 1: | Line 1: | ||
| − | + | [[Category:Lua]] | |
| − | + | {{CodeBox|'''function''' getScreenDPI() ''':''' integer}} | |
| − | + | ||
| + | Returns the Dots/Pixels Per Inch of the screen. | ||
| + | |||
| + | ===Function Parameters=== | ||
| + | This function has no parameters. | ||
| + | |||
| + | ===Returns=== | ||
| + | integer — The screen DPI value. | ||
| + | |||
| + | ===Examples=== | ||
| + | |||
<pre> | <pre> | ||
| − | + | local dpi = getScreenDPI() | |
| + | print("Screen DPI: " .. dpi) | ||
</pre> | </pre> | ||
| + | |||
| + | {{LuaSeeAlso}} | ||
Revision as of 03:45, 21 June 2026
Returns the Dots/Pixels Per Inch of the screen.
Function Parameters
This function has no parameters.
Returns
integer — The screen DPI value.
Examples
local dpi = getScreenDPI()
print("Screen DPI: " .. dpi)