DxIsAspectRatioAdjustmentEnabled

From Multi Theft Auto: Wiki
Revision as of 01:39, 13 December 2019 by Luxy.c (talk | contribs) (test link)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function gets the current aspect ratio set by dxSetAspectRatioAdjustmentEnabled.

Syntax

bool, float dxIsAspectRatioAdjustmentEnabled ( )

Returns

Example

This example will draw the aspect ratio to screen if aspect ratio was enabled previously.

addEventHandler("onClientRender", root, function()
    dxSetAspectRatioAdjustmentEnabled(true)

    local enabled, ratio = dxIsAspectRatioAdjustmentEnabled()
	
    if(enabled) then
        dxDrawText("Aspect ratio is: " .. ratio, 250, 250)
    end
end)

See Also