Added GetRegions and RegionTypes

This commit is contained in:
2024-07-17 23:42:44 -04:00
parent 98a3d4e2be
commit 61f153d0c1

14
declarations/ui.d.ts vendored
View File

@@ -66,13 +66,15 @@ declare namespace WoWAPI {
type FrameType = "Frame" | "Button" | "Cooldown"
| "ColorSelect" | "EditBox" | "GameTooltip" | "MessageFrame"
| "Minimap" | "Model" | "ScrollFrame" | "ScrollingMessageFrame"
| "SimpleHTML" | "Slider" | "StatusBar";
| "SimpleHTML" | "Slider" | "StatusBar" | "Texture" | "FontString";
type RegionType = "Region" | "LayeredRegion" | "Texture" | "FontString";
interface Object {
/**
* get the type of this object
*/
GetObjectType(): FrameType;
GetObjectType(): FrameType | RegionType;
/**
* Return the name of the object.
@@ -90,7 +92,7 @@ declare namespace WoWAPI {
*
* @param type the type to check for
*/
IsObjectType(type: FrameType): boolean;
IsObjectType(type: FrameType | RegionType ): boolean;
}
type ModelLight = {
@@ -751,6 +753,12 @@ declare namespace WoWAPI {
*/
GetFrameLevel(): number;
/**
* Get Regions will return all the regions for a frame that are children
* @return WoWAPI.Region[]
*/
GetRegions(): Region[];
/**
* Gets the assigned script for a specific event.
*/