Category:FitScreen: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "function fitScreen(resolution, position, selected) width, height = guiGetScreenSize() if resolution and position and selected then if type(resolution) == "numb...")
 
(Redirected page to Template:Shared function)
Tag: New redirect
 
Line 1: Line 1:
function fitScreen(resolution, position, selected)
#REDIRECT [[Template:Shared function]]
    width, height = guiGetScreenSize()
This is useful to fit screen on GUI.
    if resolution and position and selected then
        if type(resolution) == "number" and type(position) == "number" and type(selected) == "string" then
            if selected == "height" or selected == "width" then
                return tonumber(_G[selected])*(position/resolution)
            end
        end
    end
    return nil
end

Latest revision as of 09:30, 20 May 2020

This is useful to fit screen on GUI.

This category currently contains no pages or media.