WoW:API GetScreenResolutions: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API GetScreenResolutions to API GetScreenResolutions without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  <center>'''GetScreenResolutions''' ''-Documentation by Astinus-''</center>
{{wowapi}}__NOTOC__
Returns a list of available screen resolutions
  resolution1, resolution2, resolution3, ... = GetScreenResolutions()


Returns the resolution of the screen.
===Takes===
: Nothing


GetScreenResolutions();
===Returns===
: String resolutionN
:: String representation of the Nth resolution


----
===Example===
;''Returns''
<dd>
local resolutions = {GetScreenResolutions()}
for i,entry in resolutions do
  DEFAULT_CHAT_FRAME:AddMessage(format('Resolution %u: %s', i, entry))
end


:;Screen resolution in ####x#### format
Output:
 
Resolution 1: 800x600
 
  Resolution 2: 1024x768
----
Resolution 3: 1280x1024
;''Description''
 
: Returns a string value of the screen resolution.
 
 
----
;''Example''
 
  ScreenRes = GetScreenResolutions();
 
 
----
;''Bugged?''
 
At any resolution that I've tested at, it always returns "800x600"
 
----
{{Template:WoW API}}
 
 
--[[User:Astinus|Astinus]] 20:32, 31 Jan 2005 (EST)

Latest revision as of 04:46, 15 August 2023

WoW API < GetScreenResolutions

Returns a list of available screen resolutions

resolution1, resolution2, resolution3, ... = GetScreenResolutions()

Takes[edit]

Nothing

Returns[edit]

String resolutionN
String representation of the Nth resolution

Example[edit]

local resolutions = {GetScreenResolutions()} for i,entry in resolutions do DEFAULT_CHAT_FRAME:AddMessage(format('Resolution %u: %s', i, entry)) end Output: Resolution 1: 800x600 Resolution 2: 1024x768 Resolution 3: 1280x1024