WoW:API GetChatWindowInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API GetChatWindowInfo to API GetChatWindowInfo without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<center>'''GetChatWindowInfo''' - ''Documentation by Elbereth''</center>
{{wowapi}} __NOTOC__


Retrieves configuration information about a chat window.
Retrieves configuration information about a chat window.


  name, fontSize, r, g, b, alpha, shown, locked, docked = GetChatWindowInfo(frameIndex)
  name, fontSize, r, g, b, alpha, shown, locked, docked, uninteractable = GetChatWindowInfo(frameIndex);
== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
Line 10: Line 10:
:;frameIndex : Number - The index of the chat window to get information for (starts at 1).
:;frameIndex : Number - The index of the chat window to get information for (starts at 1).
=== Returns ===
=== Returns ===
:name, fontSize, r, g, b, alpha, shown, locked, docked
:name, fontSize, r, g, b, alpha, shown, locked, docked, uninteractable


:;name : String - The name of the chat window, or an empty string for its default name.
:;name : String - The name of the chat window, or an empty string for its default name.
Line 20: Line 20:
:;shown : Number - 1 if the window is shown, 0 if it is hidden.
:;shown : Number - 1 if the window is shown, 0 if it is hidden.
:;locked : Number - 1 if the window is locked in place, 0 if it is movable.
:;locked : Number - 1 if the window is locked in place, 0 if it is movable.
:;docked : Number - 1 if the window is docked, 0 if it roams freely.
:;docked : Number - 1 to NUM_CHAT_WINDOWS; Index Order of docked tab EG: General = 1, Combat Log = 2. nil if floating.
== Example ==
== Example ==
<!-- begin code -->
<!-- begin code -->
  local name, fontSize, r, g, b, alpha, shown, locked = GetChatWindowInfo(i);
  local name, fontSize, r, g, b, alpha, shown, locked, docked, uninteractable = GetChatWindowInfo(i);
<!-- end code -->
<!-- end code -->


Line 29: Line 29:
* Retrieves Chat Window configuration information. This is what FrameXML uses to know how to display the actual windows. This configuration information is set via the SetChatWindow...() family of functions which causes the "UPDATE_CHAT_WINDOWS" event to fire. FrameXML calls GetChatWindowInfo() when it receives this event.
* Retrieves Chat Window configuration information. This is what FrameXML uses to know how to display the actual windows. This configuration information is set via the SetChatWindow...() family of functions which causes the "UPDATE_CHAT_WINDOWS" event to fire. FrameXML calls GetChatWindowInfo() when it receives this event.
* 'frameIndex' can be any chat window index between 1 and NUM_CHAT_WINDOWS. '1' is the main chat window.
* 'frameIndex' can be any chat window index between 1 and NUM_CHAT_WINDOWS. '1' is the main chat window.
----
{{WoW API}}

Latest revision as of 04:45, 15 August 2023

WoW API < GetChatWindowInfo

Retrieves configuration information about a chat window.

name, fontSize, r, g, b, alpha, shown, locked, docked, uninteractable = GetChatWindowInfo(frameIndex);

Parameters[edit]

Arguments[edit]

(frameIndex)
frameIndex
Number - The index of the chat window to get information for (starts at 1).

Returns[edit]

name, fontSize, r, g, b, alpha, shown, locked, docked, uninteractable
name
String - The name of the chat window, or an empty string for its default name.
fontSize
Number - The font size for the window.
r
Number - The red component of the window's background color (0.0 - 1.0);
g
Number - The green component of the window's background color (0.0 - 1.0);
b
Number - The blue component of the window's background color (0.0 - 1.0);
alpha
Number - The alpha level (opacity) of the window background (0.0 - 1.0);
shown
Number - 1 if the window is shown, 0 if it is hidden.
locked
Number - 1 if the window is locked in place, 0 if it is movable.
docked
Number - 1 to NUM_CHAT_WINDOWS; Index Order of docked tab EG: General = 1, Combat Log = 2. nil if floating.

Example[edit]

local name, fontSize, r, g, b, alpha, shown, locked, docked, uninteractable = GetChatWindowInfo(i);

Details[edit]

  • Retrieves Chat Window configuration information. This is what FrameXML uses to know how to display the actual windows. This configuration information is set via the SetChatWindow...() family of functions which causes the "UPDATE_CHAT_WINDOWS" event to fire. FrameXML calls GetChatWindowInfo() when it receives this event.
  • 'frameIndex' can be any chat window index between 1 and NUM_CHAT_WINDOWS. '1' is the main chat window.