WoW:API GetScreenResolutions: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
<center>'''GetScreenResolutions''' ''-Documentation by [[user:Astinus|Astinus]]-''</center>
{{wowapi}}__NOTOC__
Returns a list of available screen resolutions
resolution1, resolution2, resolution3, ... = GetScreenResolutions()


Returns a list of available screen resolutions.
===Takes===
: Nothing


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


== Parameters ==
===Example===
=== Arguments ===
<dd>
=== Returns ===
  local resolutions = {GetScreenResolutions()}
== Example ==
  for i,entry in resolutions do
  /script Resolution1, Resolution2 = GetScreenResolutions();
  DEFAULT_CHAT_FRAME:AddMessage(format('Resolution %u: %s', i, entry))
  /script DEFAULT_CHAT_FRAME:AddMessage(string.format("Resolution1 = %s", Resolution1));
  end
  /script DEFAULT_CHAT_FRAME:AddMessage(string.format("Resolution2 = %s", Resolution2));


====Result====
Output:
  Resolution1 = 800x600
  Resolution 1: 800x600
  Resolution2 = 1024x768
  Resolution 2: 1024x768
 
Resolution 3: 1280x1024
==Details==
 
----
{{WoW API}}

Revision as of 01:10, 5 September 2006

WoW API < GetScreenResolutions

Returns a list of available screen resolutions

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

Takes

Nothing

Returns

String resolutionN
String representation of the Nth resolution

Example

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