First commit, step 4 completed
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_TaskQuest.GetQuestsOnMap](https://warcraft.wiki.gg/wiki/API_C_TaskQuest.GetQuestsOnMap)
|
||||
---@param uiMapID number
|
||||
---@return QuestPOIMapInfo[] taskPOIs
|
||||
function C_TaskQuest.GetQuestsForPlayerByMapID(uiMapID) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_MerchantFrame.GetItemInfo](https://warcraft.wiki.gg/wiki/API_C_MerchantFrame.GetItemInfo)
|
||||
---@param index number
|
||||
---@return string name
|
||||
---@return number texture
|
||||
---@return number price
|
||||
---@return number stackCount
|
||||
---@return number numAvailable
|
||||
---@return boolean isPurchasable
|
||||
---@return boolean isUsable
|
||||
---@return boolean hasExtendedCost
|
||||
---@return number currencyID
|
||||
---@return number spellID
|
||||
function GetMerchantItemInfo(index) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_ChallengeMode.GetChallengeCompletionInfo](https://warcraft.wiki.gg/wiki/API_C_ChallengeMode.GetChallengeCompletionInfo)
|
||||
---@return number mapChallengeModeID
|
||||
---@return number level
|
||||
---@return number time
|
||||
---@return boolean onTime
|
||||
---@return number keystoneUpgradeLevels
|
||||
---@return boolean practiceRun
|
||||
---@return number oldOverallDungeonScore
|
||||
---@return number newOverallDungeonScore
|
||||
---@return boolean isAffixRecord
|
||||
---@return boolean isMapRecord, 0
|
||||
---@return boolean isEligibleForScore
|
||||
---@return ChallengeModeCompletionMemberInfo[] members
|
||||
function C_ChallengeMode.GetCompletionInfo() end
|
||||
|
||||
---@deprecated
|
||||
---@return boolean
|
||||
function C_MythicPlus.IsWeeklyRewardAvailable() end
|
||||
@@ -0,0 +1,18 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_QuestInfoSystem.GetQuestClassification](https://warcraft.wiki.gg/wiki/API_C_QuestInfoSystem.GetQuestClassification)
|
||||
---@param questIndex number
|
||||
---@return boolean
|
||||
function IsActiveQuestLegendary(questIndex) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_QuestInfoSystem.GetQuestClassification](https://warcraft.wiki.gg/wiki/API_C_QuestInfoSystem.GetQuestClassification)
|
||||
---@param questID number
|
||||
---@return boolean
|
||||
function C_QuestLog.IsLegendaryQuest(questID) end
|
||||
|
||||
---@deprecated
|
||||
---@param questID number
|
||||
---@return boolean
|
||||
function C_QuestLog.IsQuestRepeatableType(questID) end
|
||||
@@ -0,0 +1,12 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Log.LogMessage](https://warcraft.wiki.gg/wiki/API_C_Log.LogMessage)
|
||||
---@param ... string
|
||||
function ConsolePrint(...) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [SetBasicMessageDialogText](https://www.townlong-yak.com/framexml/go/SetBasicMessageDialogText)
|
||||
---@param text string
|
||||
---@param force boolean
|
||||
function message(text, force) end
|
||||
@@ -0,0 +1,11 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [ActionButtonSpellAlertManager:ShowAlert](https://www.townlong-yak.com/framexml/go/ActionButtonSpellAlertManager:ShowAlert)
|
||||
---@param button table
|
||||
function ActionButton_ShowOverlayGlow(button) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [ActionButtonSpellAlertManager:HideAlert](https://www.townlong-yak.com/framexml/go/ActionButtonSpellAlertManager:HideAlert)
|
||||
---@param button table
|
||||
function ActionButton_HideOverlayGlow(button) end
|
||||
@@ -0,0 +1,12 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_SpellActivationOverlay.IsSpellOverlayed](https://warcraft.wiki.gg/wiki/API_C_SpellActivationOverlay.IsSpellOverlayed)
|
||||
---@param spellID number
|
||||
---@return boolean isSpellOverlayed
|
||||
function IsSpellOverlayed(spellID) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [EquipmentManager_GetLocationData](https://www.townlong-yak.com/framexml/go/EquipmentManager_GetLocationData)
|
||||
---@param packedLocation number
|
||||
function EquipmentManager_UnpackLocation(packedLocation) end
|
||||
@@ -0,0 +1,9 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_ChatInfo.SendChatMessage](https://warcraft.wiki.gg/wiki/API_C_ChatInfo.SendChatMessage)
|
||||
---@param message string
|
||||
---@param chatType? SendChatMessageType
|
||||
---@param languageID? number
|
||||
---@param target? string
|
||||
function SendChatMessage(message, chatType, languageID, target) end
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_CurrencyInfo.GetCoinIcon](https://warcraft.wiki.gg/wiki/API_C_CurrencyInfo.GetCoinIcon)
|
||||
---@param amount WOWMONEY
|
||||
---@return fileID result
|
||||
function GetCoinIcon(amount) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_CurrencyInfo.GetCoinText](https://warcraft.wiki.gg/wiki/API_C_CurrencyInfo.GetCoinText)
|
||||
---@param amount WOWMONEY
|
||||
---@param separator? string Default = ,
|
||||
---@return string result
|
||||
function GetCoinText(amount, separator) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_CurrencyInfo.GetCoinTextureString](https://warcraft.wiki.gg/wiki/API_C_CurrencyInfo.GetCoinTextureString)
|
||||
---@param amount WOWMONEY
|
||||
---@param fontHeight? number Default = 14
|
||||
---@return string result
|
||||
function GetCoinTextureString(amount, fontHeight) end
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_GuildInfo.Invite](https://warcraft.wiki.gg/wiki/API_C_GuildInfo.Invite)
|
||||
---@param name string
|
||||
function GuildInvite(name) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_GuildInfo.Uninvite](https://warcraft.wiki.gg/wiki/API_C_GuildInfo.Uninvite)
|
||||
---@param name string
|
||||
function GuildUninvite(name) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_GuildInfo.Promote](https://warcraft.wiki.gg/wiki/API_C_GuildInfo.Promote)
|
||||
---@param name string
|
||||
function GuildPromote(name) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_GuildInfo.Demote](https://warcraft.wiki.gg/wiki/API_C_GuildInfo.Demote)
|
||||
---@param name string
|
||||
function GuildDemote(name) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_GuildInfo.SetLeader](https://warcraft.wiki.gg/wiki/API_C_GuildInfo.SetLeader)
|
||||
---@param name string
|
||||
function GuildSetLeader(name) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_GuildInfo.SetMOTD](https://warcraft.wiki.gg/wiki/API_C_GuildInfo.SetMOTD)
|
||||
---@param motd string
|
||||
function GuildSetMOTD(motd) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_GuildInfo.Leave](https://warcraft.wiki.gg/wiki/API_C_GuildInfo.Leave)
|
||||
function GuildLeave() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_GuildInfo.Disband](https://warcraft.wiki.gg/wiki/API_C_GuildInfo.Disband)
|
||||
function GuildDisband() end
|
||||
+307
@@ -0,0 +1,307 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemQualityColor](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemQualityColor)
|
||||
---@param quality number
|
||||
---@return number colorRGBR
|
||||
---@return number colorRGBG
|
||||
---@return number colorRGBB
|
||||
---@return string qualityString
|
||||
function GetItemQualityColor(quality) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemInfoInstant](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemInfoInstant)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return number itemID
|
||||
---@return string itemType
|
||||
---@return string itemSubType
|
||||
---@return string itemEquipLoc
|
||||
---@return fileID icon
|
||||
---@return number classID
|
||||
---@return number subClassID
|
||||
function GetItemInfoInstant(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemSetInfo](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemSetInfo)
|
||||
---@param setID number
|
||||
---@return string result
|
||||
function GetItemSetInfo(setID) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemChildInfo](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemChildInfo)
|
||||
---@param itemInfo ItemInfo
|
||||
---@param slotID? number
|
||||
---@return number[] result
|
||||
function GetItemChildInfo(itemInfo, slotID) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.DoesItemContainSpec](https://warcraft.wiki.gg/wiki/API_C_Item.DoesItemContainSpec)
|
||||
---@param itemInfo ItemInfo
|
||||
---@param classID number
|
||||
---@param specID? number Default = 0
|
||||
---@return boolean result
|
||||
function DoesItemContainSpec(itemInfo, classID, specID) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemGem](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemGem)
|
||||
---@param hyperlink string
|
||||
---@param index number
|
||||
---@return string gemName
|
||||
---@return string gemLink
|
||||
function GetItemGem(hyperlink, index) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemCreationContext](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemCreationContext)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return number itemID
|
||||
---@return string creationContext
|
||||
function GetItemCreationContext(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemIconByID](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemIconByID)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return fileID? icon
|
||||
function GetItemIcon(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemFamily](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemFamily)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return number? result
|
||||
function GetItemFamily(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemSpell](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemSpell)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return string spellName
|
||||
---@return number spellID
|
||||
function GetItemSpell(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsArtifactPowerItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsArtifactPowerItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean result
|
||||
function IsArtifactPowerItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsCurrentItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsCurrentItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean result
|
||||
function IsCurrentItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsUsableItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsUsableItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean usable
|
||||
---@return boolean noMana
|
||||
function IsUsableItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsHelpfulItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsHelpfulItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean result
|
||||
function IsHelpfulItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsHarmfulItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsHarmfulItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean result
|
||||
function IsHarmfulItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsConsumableItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsConsumableItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean result
|
||||
function IsConsumableItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsEquippableItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsEquippableItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean result
|
||||
function IsEquippableItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsEquippedItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsEquippedItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean result
|
||||
function IsEquippedItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsEquippedItemType](https://warcraft.wiki.gg/wiki/API_C_Item.IsEquippedItemType)
|
||||
---@param type string
|
||||
---@return boolean result
|
||||
function IsEquippedItemType(type) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.ItemHasRange](https://warcraft.wiki.gg/wiki/API_C_Item.ItemHasRange)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean result
|
||||
function ItemHasRange(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsItemInRange](https://warcraft.wiki.gg/wiki/API_C_Item.IsItemInRange)
|
||||
---@param itemInfo ItemInfo
|
||||
---@param targetToken string
|
||||
---@return boolean? result
|
||||
function IsItemInRange(itemInfo, targetToken) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemClassInfo](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemClassInfo)
|
||||
---@param itemClassID number
|
||||
---@return string result
|
||||
function GetItemClassInfo(itemClassID) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemInventorySlotInfo](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemInventorySlotInfo)
|
||||
---@param inventorySlot number|Enum.InventoryType
|
||||
---@return string result
|
||||
function GetItemInventorySlotInfo(inventorySlot) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.BindEnchant](https://warcraft.wiki.gg/wiki/API_C_Item.BindEnchant)
|
||||
function BindEnchant() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.ActionBindsItem](https://warcraft.wiki.gg/wiki/API_C_Item.ActionBindsItem)
|
||||
function ActionBindsItem() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.ReplaceEnchant](https://warcraft.wiki.gg/wiki/API_C_Item.ReplaceEnchant)
|
||||
function ReplaceEnchant() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.ReplaceTradeEnchant](https://warcraft.wiki.gg/wiki/API_C_Item.ReplaceTradeEnchant)
|
||||
function ReplaceTradeEnchant() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.ConfirmBindOnUse](https://warcraft.wiki.gg/wiki/API_C_Item.ConfirmBindOnUse)
|
||||
function ConfirmBindOnUse() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.ConfirmOnUse](https://warcraft.wiki.gg/wiki/API_C_Item.ConfirmOnUse)
|
||||
function ConfirmOnUse() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.ConfirmNoRefundOnUse](https://warcraft.wiki.gg/wiki/API_C_Item.ConfirmNoRefundOnUse)
|
||||
function ConfirmNoRefundOnUse() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.DropItemOnUnit](https://warcraft.wiki.gg/wiki/API_C_Item.DropItemOnUnit)
|
||||
---@param unitGUID UnitToken
|
||||
function DropItemOnUnit(unitGUID) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.EndBoundTradeable](https://warcraft.wiki.gg/wiki/API_C_Item.EndBoundTradeable)
|
||||
---@param type string
|
||||
function EndBoundTradeable(type) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.EndRefund](https://warcraft.wiki.gg/wiki/API_C_Item.EndRefund)
|
||||
---@param type number
|
||||
function EndRefund(type) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemInfo](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemInfo)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return string itemName
|
||||
---@return string itemLink
|
||||
---@return Enum.ItemQuality itemQuality
|
||||
---@return number itemLevel
|
||||
---@return number itemMinLevel
|
||||
---@return string itemType
|
||||
---@return string itemSubType
|
||||
---@return number itemStackCount
|
||||
---@return string itemEquipLoc
|
||||
---@return fileID itemTexture
|
||||
---@return number sellPrice
|
||||
---@return number classID
|
||||
---@return number subclassID
|
||||
---@return number bindType
|
||||
---@return number expansionID
|
||||
---@return number? setID
|
||||
---@return boolean isCraftingReagent
|
||||
function GetItemInfo(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetDetailedItemLevelInfo](https://warcraft.wiki.gg/wiki/API_C_Item.GetDetailedItemLevelInfo)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return number actualItemLevel
|
||||
---@return boolean previewLevel
|
||||
---@return number sparseItemLevel
|
||||
function GetDetailedItemLevelInfo(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemSpecInfo](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemSpecInfo)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return number[] specTable
|
||||
function GetItemSpecInfo(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemUniqueness](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemUniqueness)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return number limitCategory
|
||||
---@return number limitMax
|
||||
function GetItemUniqueness(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemCount](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemCount)
|
||||
---@param itemInfo ItemInfo
|
||||
---@param includeBank? boolean Default = false
|
||||
---@param includeUses? boolean Default = false
|
||||
---@param includeReagentBank? boolean Default = false
|
||||
---@return number count
|
||||
function GetItemCount(itemInfo, includeBank, includeUses, includeReagentBank) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.PickupItem](https://warcraft.wiki.gg/wiki/API_C_Item.PickupItem)
|
||||
---@param itemInfo ItemInfo
|
||||
function PickupItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemSubClassInfo](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemSubClassInfo)
|
||||
---@param itemClassID number
|
||||
---@param itemSubClassID number
|
||||
---@return string subClassName
|
||||
---@return boolean subClassUsesInvType
|
||||
function GetItemSubClassInfo(itemClassID, itemSubClassID) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.UseItemByName](https://warcraft.wiki.gg/wiki/API_C_Item.UseItemByName)
|
||||
---@param itemInfo ItemInfo
|
||||
---@param target? string
|
||||
function UseItemByName(itemInfo, target) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.EquipItemByName](https://warcraft.wiki.gg/wiki/API_C_Item.EquipItemByName)
|
||||
---@param itemInfo ItemInfo
|
||||
---@param dstSlot? number
|
||||
function EquipItemByName(itemInfo, dstSlot) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.ReplaceTradeskillEnchant](https://warcraft.wiki.gg/wiki/API_C_Item.ReplaceTradeskillEnchant)
|
||||
function ReplaceTradeskillEnchant() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.GetItemCooldown](https://warcraft.wiki.gg/wiki/API_C_Item.GetItemCooldown)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return number startTimeSeconds
|
||||
---@return number durationSeconds
|
||||
---@return boolean enableCooldownTimer
|
||||
function GetItemCooldown(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsCorruptedItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsCorruptedItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean? result
|
||||
function IsCorruptedItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsCosmeticItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsCosmeticItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean? result
|
||||
function IsCosmeticItem(itemInfo) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Item.IsDressableItem](https://warcraft.wiki.gg/wiki/API_C_Item.IsDressableItem)
|
||||
---@param itemInfo ItemInfo
|
||||
---@return boolean isDressableItem
|
||||
function IsDressableItem(itemInfo) end
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_PvP.IsSubZonePVPPOI](https://warcraft.wiki.gg/wiki/API_C_PvP.IsSubZonePVPPOI)
|
||||
---@return boolean result
|
||||
function IsSubZonePVPPOI() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_PvP.GetZonePVPInfo](https://warcraft.wiki.gg/wiki/API_C_PvP.GetZonePVPInfo)
|
||||
---@return string pvpType
|
||||
---@return boolean isSubZonePvP
|
||||
---@return string? factionName
|
||||
function GetZonePVPInfo() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_PvP.TogglePVP](https://warcraft.wiki.gg/wiki/API_C_PvP.TogglePVP)
|
||||
function TogglePVP() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_PvP.SetPVP](https://warcraft.wiki.gg/wiki/API_C_PvP.SetPVP)
|
||||
---@param enablePVP? boolean Default = false
|
||||
function SetPVP(enablePVP) end
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Sound.PlayVocalErrorSound](https://warcraft.wiki.gg/wiki/API_C_Sound.PlayVocalErrorSound)
|
||||
---@param vocalErrorSoundID number|Enum.Vocalerrorsounds
|
||||
function PlayVocalErrorSoundID(vocalErrorSoundID) end
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_SpecializationInfo.GetNumSpecializationsForClassID](https://warcraft.wiki.gg/wiki/API_C_SpecializationInfo.GetNumSpecializationsForClassID)
|
||||
---@param classID number
|
||||
---@return number specCount
|
||||
function GetNumSpecializationsForClassID(classID) end
|
||||
|
||||
---Deprecated by [C_SpecializationInfo.GetSpecializationInfo](https://warcraft.wiki.gg/wiki/API_C_SpecializationInfo.GetSpecializationInfo)
|
||||
---@param specializationIndex number
|
||||
---@param isInspect? boolean Default = false
|
||||
---@param isPet? boolean Default = false
|
||||
---@param inspectTarget? string
|
||||
---@param sex? number
|
||||
---@param groupIndex? number
|
||||
---@return number? specId Default = 0
|
||||
---@return string? name
|
||||
---@return string? description
|
||||
---@return fileID? icon
|
||||
---@return string? role
|
||||
---@return number? primaryStat
|
||||
---@return number? pointsSpent Default = 0
|
||||
---@return string? background
|
||||
---@return number? previewPointsSpent Default = 0
|
||||
---@return boolean? isUnlocked Default = true
|
||||
function GetSpecializationInfo(specializationIndex, isInspect, isPet, inspectTarget, sex, groupIndex) end
|
||||
|
||||
---Deprecated by [C_SpecializationInfo.GetSpecialization](https://warcraft.wiki.gg/wiki/API_C_SpecializationInfo.GetSpecialization)
|
||||
---@param isInspect? boolean
|
||||
---@param isPet? boolean
|
||||
---@param specGroupIndex? number
|
||||
---@return number specializationIndex
|
||||
function GetSpecialization(isInspect, isPet, specGroupIndex) end
|
||||
|
||||
---Deprecated by [C_SpecializationInfo.GetActiveSpecGroup](https://warcraft.wiki.gg/wiki/API_C_SpecializationInfo.GetActiveSpecGroup)
|
||||
---@param isInspect? boolean
|
||||
---@param isPet? boolean
|
||||
---@return number groupIndex
|
||||
function GetActiveSpecGroup(isInspect, isPet) end
|
||||
|
||||
---Deprecated by [C_SpecializationInfo.GetSpecializationMasterySpells](https://warcraft.wiki.gg/wiki/API_C_SpecializationInfo.GetSpecializationMasterySpells)
|
||||
---@param specializationIndex number
|
||||
---@param isInspect? boolean
|
||||
---@param isPet? boolean
|
||||
---@return number masterySpell1
|
||||
---@return number masterySpell2
|
||||
function GetSpecializationMasterySpells(specializationIndex, isInspect, isPet) end
|
||||
|
||||
---Deprecated by [C_SpecializationInfo.GetTalentInfo](https://warcraft.wiki.gg/wiki/API_C_SpecializationInfo.GetTalentInfo)
|
||||
---@param talentTier number
|
||||
---@param talentColumn number
|
||||
---@param specGroupIndex number
|
||||
---@param isInspect? boolean
|
||||
---@param target? string
|
||||
---@return number talentID
|
||||
---@return string name
|
||||
---@return number icon
|
||||
---@return boolean selected
|
||||
---@return boolean available
|
||||
---@return number spellID
|
||||
---@return boolean isPVPTalentUnlocked
|
||||
---@return number tier
|
||||
---@return number column
|
||||
---@return boolean known
|
||||
---@return boolean isGrantedByAura;
|
||||
function GetTalentInfo(talentTier, talentColumn, specGroupIndex, isInspect, target) end
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_SpellBook.IsSpellKnown](https://warcraft.wiki.gg/wiki/API_C_SpellBook.IsSpellKnown)
|
||||
---@param spellID number
|
||||
---@return boolean isKnown
|
||||
function IsPlayerSpell(spellID) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_SpellBook.IsSpellInSpellBook](https://warcraft.wiki.gg/wiki/API_C_SpellBook.IsSpellInSpellBook)
|
||||
---@param spellID number
|
||||
---@param isPet boolean
|
||||
---@return boolean isInSpellBook
|
||||
function IsSpellKnown(spellID, isPet) end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_SpellBook.IsSpellInSpellBook](https://warcraft.wiki.gg/wiki/API_C_SpellBook.IsSpellInSpellBook)
|
||||
---@param spellID number
|
||||
---@param isPet boolean
|
||||
---@return boolean isInSpellBook
|
||||
function IsSpellKnownOrOverridesKnown(spellID, isPet) end
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Spell.TargetSpellReplacesBonusTree](https://warcraft.wiki.gg/wiki/API_C_Spell.TargetSpellReplacesBonusTree)
|
||||
---@return boolean result
|
||||
function TargetSpellReplacesBonusTree() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Spell.GetSpellQueueWindow](https://warcraft.wiki.gg/wiki/API_C_Spell.GetSpellQueueWindow)
|
||||
---@return number result
|
||||
function GetMaxSpellStartRecoveryOffset() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Spell.GetSpellQueueWindow](https://warcraft.wiki.gg/wiki/API_C_Spell.GetSpellQueueWindow)
|
||||
---@return number result
|
||||
function GetSpellQueueWindow() end
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [C_Spell.GetSchoolString](https://warcraft.wiki.gg/wiki/API_C_Spell.GetSchoolString)
|
||||
---@param schoolMask number
|
||||
---@return string result
|
||||
function GetSchoolString(schoolMask) end
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
---@meta _
|
||||
|
||||
---@deprecated
|
||||
---Deprecated by [UnitIsVisible](https://warcraft.wiki.gg/wiki/API_UnitIsVisible)
|
||||
---@param unit? UnitToken Default = WOWGUID_NULL
|
||||
---@return boolean result
|
||||
function ShowBossFrameWhenUninteractable(unit) end
|
||||
@@ -0,0 +1,50 @@
|
||||
---@meta _
|
||||
AuraUtil = {}
|
||||
|
||||
---[FrameXML](https://github.com/Gethe/wow-ui-source/blob/live/Interface/FrameXML/AuraUtil.lua#L32)
|
||||
-- Finds the first aura that matches the name
|
||||
---@param auraName string
|
||||
---@param unit string
|
||||
---@param filter? string
|
||||
---@return string name
|
||||
---@return number icon
|
||||
---@return number count
|
||||
---@return string? dispelType
|
||||
---@return number duration
|
||||
---@return number expirationTime
|
||||
---@return string source
|
||||
---@return boolean isStealable
|
||||
---@return boolean nameplateShowPersonal
|
||||
---@return number spellId
|
||||
---@return boolean canApplyAura
|
||||
---@return boolean isBossDebuff
|
||||
---@return boolean castByPlayer
|
||||
---@return boolean nameplateShowAll
|
||||
---@return number timeMod
|
||||
---@return ...
|
||||
function AuraUtil.FindAuraByName(auraName, unit, filter) end
|
||||
|
||||
---[FrameXML](https://github.com/Gethe/wow-ui-source/blob/live/Interface/FrameXML/AuraUtil.lua#L51)
|
||||
--- Iterates over a filtered list of auras
|
||||
---@param unit string
|
||||
---@param filter string
|
||||
---@param maxCount? any
|
||||
---@param func function
|
||||
---@param usePackedAura? boolean
|
||||
---@return string name
|
||||
---@return number icon
|
||||
---@return number count
|
||||
---@return string? dispelType
|
||||
---@return number duration
|
||||
---@return number expirationTime
|
||||
---@return string source
|
||||
---@return boolean isStealable
|
||||
---@return boolean nameplateShowPersonal
|
||||
---@return number spellId
|
||||
---@return boolean canApplyAura
|
||||
---@return boolean isBossDebuff
|
||||
---@return boolean castByPlayer
|
||||
---@return boolean nameplateShowAll
|
||||
---@return number timeMod
|
||||
---@return ...
|
||||
function AuraUtil.ForEachAura(unit, filter, maxCount, func, usePackedAura) end
|
||||
@@ -0,0 +1,8 @@
|
||||
---@meta _
|
||||
WOW_PROJECT_ID = 0
|
||||
WOW_PROJECT_MAINLINE = 1
|
||||
WOW_PROJECT_CLASSIC = 2
|
||||
WOW_PROJECT_BURNING_CRUSADE_CLASSIC = 5
|
||||
WOW_PROJECT_WRATH_CLASSIC = 11
|
||||
WOW_PROJECT_CATACLYSM_CLASSIC = 14
|
||||
WOW_PROJECT_MISTS_CLASSIC = 19
|
||||
@@ -0,0 +1,25 @@
|
||||
---@meta _
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/ItemTransmogInfoMixin)
|
||||
---@class ItemTransmogInfoMixin
|
||||
ItemTransmogInfoMixin = {}
|
||||
|
||||
--- See [CreateAndInitFromMixin](https://www.townlong-yak.com/framexml/go/CreateAndInitFromMixin)
|
||||
---@param appearanceID number
|
||||
---@param secondaryAppearanceID number?
|
||||
---@param illusionID number?
|
||||
function ItemTransmogInfoMixin:Init(appearanceID, secondaryAppearanceID, illusionID) end
|
||||
|
||||
---@param itemTransmogInfo table
|
||||
---@return boolean
|
||||
function ItemTransmogInfoMixin:IsEqual(itemTransmogInfo) end
|
||||
|
||||
function ItemTransmogInfoMixin:Clear() end
|
||||
|
||||
---@param isLegionArtifact boolean
|
||||
function ItemTransmogInfoMixin:ConfigureSecondaryForMainHand(isLegionArtifact) end
|
||||
|
||||
---@return boolean
|
||||
function ItemTransmogInfoMixin:IsMainHandIndividualWeapon() end
|
||||
|
||||
---@return boolean
|
||||
function ItemTransmogInfoMixin:IsMainHandPairedWeapon() end
|
||||
@@ -0,0 +1,41 @@
|
||||
---@meta _
|
||||
---[Documentation](https://www.townlong-yak.com/framexml/go/ReportInfoMixin)
|
||||
---@class ReportInfoMixin
|
||||
ReportInfoMixin = {}
|
||||
|
||||
function ReportInfoMixin:Clear() end
|
||||
|
||||
---@param mailIndex number
|
||||
function ReportInfoMixin:SetMailIndex(mailIndex) end
|
||||
|
||||
---@param clubFinderGUID string
|
||||
function ReportInfoMixin:SetClubFinderGUID(clubFinderGUID) end
|
||||
|
||||
---@param reportTarget string
|
||||
function ReportInfoMixin:SetReportTarget(reportTarget) end
|
||||
|
||||
---@param comment string
|
||||
function ReportInfoMixin:SetComment(comment) end
|
||||
|
||||
---@param groupFinderSearchResultID number
|
||||
function ReportInfoMixin:SetGroupFinderSearchResultID(groupFinderSearchResultID) end
|
||||
|
||||
---@param groupFinderApplicantID number
|
||||
function ReportInfoMixin:SetGroupFinderApplicantID(groupFinderApplicantID) end
|
||||
|
||||
---@param reportType Enum.ReportType
|
||||
function ReportInfoMixin:SetReportType(reportType) end
|
||||
|
||||
---@param majorCategory Enum.ReportMajorCategory
|
||||
function ReportInfoMixin:SetReportMajorCategory(majorCategory) end
|
||||
|
||||
---@param minorCategoryFlags Enum.ReportMinorCategory
|
||||
function ReportInfoMixin:SetMinorCategoryFlags(minorCategoryFlags) end
|
||||
|
||||
---@param petGUID string
|
||||
function ReportInfoMixin:SetPetGUID(petGUID) end
|
||||
|
||||
---@param reportType? Enum.ReportType
|
||||
---@param majorCategory Enum.ReportMajorCategory
|
||||
---@param minorCategoryFlags Enum.ReportMinorCategory
|
||||
function ReportInfoMixin:SetBasicReportInfo(reportType, majorCategory, minorCategoryFlags) end
|
||||
@@ -0,0 +1,58 @@
|
||||
---@meta _
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/TransmogLocationMixin)
|
||||
---@class TransmogPendingInfoMixin
|
||||
TransmogPendingInfoMixin = {}
|
||||
|
||||
--- See [CreateAndInitFromMixin](https://www.townlong-yak.com/framexml/go/CreateAndInitFromMixin)
|
||||
---@param pendingType Enum.TransmogPendingType
|
||||
---@param transmogID number
|
||||
---@param category number
|
||||
function TransmogPendingInfoMixin:Init(pendingType, transmogID, category) end
|
||||
|
||||
---@class TransmogLocationType
|
||||
---@field slotID? InventorySlots
|
||||
---@field type? Enum.TransmogType
|
||||
---@field modification? Enum.TransmogModification
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/TransmogLocationMixin)
|
||||
---@class TransmogLocationMixin : TransmogLocationType
|
||||
TransmogLocationMixin = {}
|
||||
|
||||
---@param slotID number
|
||||
---@param transmogType Enum.TransmogType
|
||||
---@param modification Enum.TransmogModification
|
||||
function TransmogLocationMixin:Set(slotID, transmogType, modification) end
|
||||
|
||||
---@return boolean
|
||||
function TransmogLocationMixin:IsAppearance() end
|
||||
|
||||
---@return boolean
|
||||
function TransmogLocationMixin:IsIllusion() end
|
||||
|
||||
---@return number slotID
|
||||
function TransmogLocationMixin:GetSlotID() end
|
||||
|
||||
---@return string slotName
|
||||
function TransmogLocationMixin:GetSlotName() end
|
||||
|
||||
---@return boolean
|
||||
function TransmogLocationMixin:IsEitherHand() end
|
||||
|
||||
---@return boolean
|
||||
function TransmogLocationMixin:IsMainHand() end
|
||||
|
||||
---@return boolean
|
||||
function TransmogLocationMixin:IsOffHand() end
|
||||
|
||||
---@param transmogLocation TransmogLocationMixin
|
||||
---@return boolean
|
||||
function TransmogLocationMixin:IsEqual(transmogLocation) end
|
||||
|
||||
---@return number armorCategoryID
|
||||
function TransmogLocationMixin:GetArmorCategoryID() end
|
||||
|
||||
---@return number lookupKey
|
||||
function TransmogLocationMixin:GetLookupKey() end
|
||||
|
||||
---@return boolean
|
||||
function TransmogLocationMixin:IsSecondary() end
|
||||
@@ -0,0 +1,52 @@
|
||||
---@meta _
|
||||
---@class UIParent : Frame
|
||||
---@field firstTimeLoaded number
|
||||
---@field variablesLoaded boolean
|
||||
UIParent = {}
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ShowUIPanel)
|
||||
---@param frame Frame
|
||||
---@param force? number
|
||||
function ShowUIPanel(frame, force) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/HideUIPanel)
|
||||
---@param frame Frame
|
||||
---@param skipSetPoint? boolean
|
||||
function HideUIPanel(frame, skipSetPoint) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/UIFrameFade)
|
||||
--- Generic fade function
|
||||
---@param frame Frame
|
||||
---@param fadeInfo table
|
||||
function UIFrameFade(frame, fadeInfo) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/UIFrameFadeIn)
|
||||
--- Convenience function to do a simple fade in
|
||||
---@param frame Frame
|
||||
---@param timeToFade number
|
||||
---@param startAlpha number
|
||||
---@param endAlpha number
|
||||
function UIFrameFadeIn(frame, timeToFade, startAlpha, endAlpha) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/UIFrameFadeOut)
|
||||
--- Convenience function to do a simple fade out
|
||||
---@param frame Frame
|
||||
---@param timeToFade number
|
||||
---@param startAlpha number
|
||||
---@param endAlpha number
|
||||
function UIFrameFadeOut(frame, timeToFade, startAlpha, endAlpha) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/getglobal)
|
||||
---@param varr string
|
||||
---@return any
|
||||
function getglobal(varr) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/setglobal)
|
||||
---@param varr string
|
||||
---@param value any
|
||||
function setglobal(varr, value) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/AbbreviateNumbers)
|
||||
---@param value number
|
||||
---@return string
|
||||
function AbbreviateNumbers(value) end
|
||||
@@ -0,0 +1,37 @@
|
||||
---@meta _
|
||||
|
||||
Menu = {}
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Menu.GetManager)
|
||||
---@return MenuManagerProxy
|
||||
function Menu.GetManager() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Menu.CreateRootMenuDescription)
|
||||
---@generic M: table
|
||||
---@param menuMixin M
|
||||
---@return RootMenuDescriptionProxy|M rootMenuDescription
|
||||
function Menu.CreateRootMenuDescription(menuMixin) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Menu.CreateMenuElementDescription)
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function Menu.CreateMenuElementDescription() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Menu.PopulateDescription)
|
||||
---@param menuGenerator fun(ownerRegion: Region, description: RootMenuDescriptionProxy, ...)
|
||||
---@param ownerRegion Region
|
||||
---@param description RootMenuDescriptionProxy
|
||||
---@param ... any? # passed to the generator
|
||||
function Menu.PopulateDescription(menuGenerator, ownerRegion, description, ...) end
|
||||
|
||||
---Can be used by addons to modify blizzard's menus in a taint-safe manner
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Menu.ModifyMenu)
|
||||
---@param tag string
|
||||
---@param callback fun(ownerRegion: Region, description: RootMenuDescriptionProxy, contextData: any?)
|
||||
function Menu.ModifyMenu(tag, callback) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Menu.GetOpenMenuTags)
|
||||
---@return string[] tags
|
||||
function Menu.GetOpenMenuTags() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Menu.PrintOpenMenuTags)
|
||||
function Menu.PrintOpenMenuTags() end
|
||||
@@ -0,0 +1,24 @@
|
||||
---@meta _
|
||||
|
||||
---@alias MenuResponder fun(data: any, menuInputData: MenuInputData, menu: MenuProxy): MenuResponse? # data = element:GetData()
|
||||
|
||||
---@alias MenuDescriptionInitializer fun(frame: Frame, elementDescription: ElementMenuDescriptionProxy, menu: MenuProxy)
|
||||
|
||||
---@class MenuInputData
|
||||
---@field context MenuInputContext
|
||||
---@field buttonName mouseButton?
|
||||
|
||||
---@alias MenuResponse
|
||||
---| 1 # `MenuResponse.Open` - Menu remains open and unchanged
|
||||
---| 2 # `MenuResponse.Refresh` - All frames in the menu are reinitialized
|
||||
---| 3 # `MenuResponse.Close` - Parent menus remain open but this menu closes
|
||||
---| 4 # `MenuResponse.CloseAll` - All menus close
|
||||
|
||||
---@alias MenuInputContext
|
||||
---| 1 # `MenuInputContext.None`
|
||||
---| 2 # `MenuInputContext.MouseButton`
|
||||
---| 3 # `MenuInputContext.MouseWheel`
|
||||
|
||||
---@alias MenuGridDirection
|
||||
---| 2 # `MenuConstants.VerticalGridDirection`
|
||||
---| 3 # `MenuConstants.HorizontalGridDirection`
|
||||
@@ -0,0 +1,172 @@
|
||||
---@meta _
|
||||
|
||||
MenuUtil = {}
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.TraverseMenu)
|
||||
---@param elementDescription RootMenuDescriptionProxy|ElementMenuDescriptionProxy
|
||||
---@param op fun(elementDescription: ElementMenuDescriptionProxy): boolean? # return true to stop traversal
|
||||
---@param condition nil|fun(elementDescription: ElementMenuDescriptionProxy): boolean # return true to apply `op` to the element description; if nil, all elements are processed
|
||||
---@return boolean stopped # true if the traversal was stopped by `op` returning true
|
||||
function MenuUtil.TraverseMenu(elementDescription, op, condition) end
|
||||
|
||||
---Return a list of all selected elements, optionally filtered by a condition
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.GetSelections)
|
||||
---@param elementDescription RootMenuDescriptionProxy|ElementMenuDescriptionProxy
|
||||
---@param condition nil|fun(elementDescription: ElementMenuDescriptionProxy): boolean # return true to include the element description
|
||||
function MenuUtil.GetSelections(elementDescription, condition) end
|
||||
|
||||
---Sets up a tooltip anchored to the right of the owner, applying the given function to it, and showing it
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.ShowTooltip)
|
||||
---@param owner Region
|
||||
---@param func fun(tooltip: GameTooltip, ...)
|
||||
---@param ... any?
|
||||
function MenuUtil.ShowTooltip(owner, func, ...) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.HideTooltip)
|
||||
---@param owner Region
|
||||
function MenuUtil.HideTooltip(owner) end
|
||||
|
||||
---Hooks OnEnter and OnLeave for a reagion, configures a tooltip, calls the given function, and shows the tooltip
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.HookTooltipScripts)
|
||||
---@param owner Region
|
||||
---@param func fun(tooltip: GameTooltip) # called both in OnEnter and OnLeave
|
||||
function MenuUtil.HookTooltipScripts(owner, func) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateRootMenuDescription)
|
||||
---@generic M: table
|
||||
---@param menuMixin M
|
||||
---@return RootMenuDescriptionProxy|M rootMenuDescription
|
||||
function MenuUtil.CreateRootMenuDescription(menuMixin) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateContextMenu)
|
||||
---@param ownerRegion Region? # if nil, defaults to UIParent
|
||||
---@param generator fun(ownerRegion: Region, description: RootMenuDescriptionProxy, ...)
|
||||
---@param ... any? # passed to the generator
|
||||
---@return MenuProxy? menu
|
||||
function MenuUtil.CreateContextMenu(ownerRegion, generator, ...) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.SetElementText)
|
||||
---@param elementDescription ElementMenuDescriptionProxy
|
||||
---@param text string
|
||||
function MenuUtil.SetElementText(elementDescription, text) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.GetElementText)
|
||||
---@param elementDescription ElementMenuDescriptionProxy
|
||||
---@return string text
|
||||
function MenuUtil.GetElementText(elementDescription) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateFrame)
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function MenuUtil.CreateFrame() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateTemplate)
|
||||
---@param template Template
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function MenuUtil.CreateTemplate(template) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateTitle)
|
||||
---@param text string
|
||||
---@param color colorRGBA? # defaults to NORMAL_FONT_COLOR
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function MenuUtil.CreateTitle(text, color) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateButton)
|
||||
---@param text string
|
||||
---@param callback MenuResponder
|
||||
---@param data any? # stored as element's data
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function MenuUtil.CreateButton(text, callback, data) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateCheckbox)
|
||||
---@param text string
|
||||
---@param isSelected fun(data: any): boolean # data = data param -> element:GetData()
|
||||
---@param setSelected MenuResponder
|
||||
---@param data any? # stored as element's data
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function MenuUtil.CreateCheckbox(text, isSelected, setSelected, data) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateRadio)
|
||||
---@param text string
|
||||
---@param isSelected fun(data: any): boolean # data = data param -> element:GetData()
|
||||
---@param setSelected MenuResponder
|
||||
---@param data any? # stored as element's data
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function MenuUtil.CreateRadio(text, isSelected, setSelected, data) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateColorSwatch)
|
||||
---@param text string
|
||||
---@param callback MenuResponder
|
||||
---@param colorInfo colorRGBA # stored as element's data
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function MenuUtil.CreateColorSwatch(text, callback, colorInfo) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuTemplates.CreateDivider)
|
||||
---@return ElementMenuDescriptionProxy # some inserters and utility functions are missing
|
||||
function MenuUtil.CreateDivider() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuTemplates.CreateSpacer)
|
||||
---@param extend number? # height of the spacer, default = 10
|
||||
---@return ElementMenuDescriptionProxy # some inserters and utility functions are missing
|
||||
function MenuUtil.CreateSpacer(extend) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateButtonMenu)
|
||||
---@param dropdown DropdownButton
|
||||
---@param ... {[1]:string, [2]: MenuResponder, [3]: any?} # list of {text, callback, data}
|
||||
function MenuUtil.CreateButtonMenu(dropdown, ...) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateButtonContextMenu)
|
||||
---@param ownerRegion Region? # if nil, defaults to UIParent
|
||||
---@param ... {[1]:string, [2]: MenuResponder, [3]: any?} # list of {text, callback, data}
|
||||
---@return MenuProxy? menu
|
||||
function MenuUtil.CreateButtonContextMenu(ownerRegion, ...) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateCheckboxMenu)
|
||||
---@param dropdown DropdownButton
|
||||
---@param isSelected fun(data: any): boolean # shared between all menu items
|
||||
---@param setSelected MenuResponder # shared between all menu items
|
||||
---@param ... {[1]:string, [2]: any?} # list of {text, data}
|
||||
function MenuUtil.CreateCheckboxMenu(dropdown, isSelected, setSelected, ...) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateCheckboxContextMenu)
|
||||
---@param ownerRegion Region? # if nil, defaults to UIParent
|
||||
---@param isSelected fun(data: any): boolean # shared between all menu items
|
||||
---@param setSelected MenuResponder # shared between all menu items
|
||||
---@param ... {[1]:string, [2]: any?} # list of {text, data}
|
||||
---@return MenuProxy? menu
|
||||
function MenuUtil.CreateCheckboxContextMenu(ownerRegion, isSelected, setSelected, ...) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateRadioMenu)
|
||||
---@param dropdown DropdownButton
|
||||
---@param isSelected fun(data: any): boolean # shared between all menu items
|
||||
---@param setSelected MenuResponder # shared between all menu items
|
||||
---@param ... {[1]:string, [2]: any?} # list of {text, data}
|
||||
function MenuUtil.CreateRadioMenu(dropdown, isSelected, setSelected, ...) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateRadioContextMenu)
|
||||
---@param ownerRegion Region? # if nil, defaults to UIParent
|
||||
---@param isSelected fun(data: any): boolean # shared between all menu items
|
||||
---@param setSelected MenuResponder # shared between all menu items
|
||||
---@param ... {[1]:string, [2]: any?} # list of {text, data}
|
||||
---@return MenuProxy? menu
|
||||
function MenuUtil.CreateRadioContextMenu(ownerRegion, isSelected, setSelected, ...) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateEnumRadioMenu)
|
||||
---@generic V
|
||||
---@param dropdown DropdownButton
|
||||
---@param enum table<V> # a list of values; the value is saved as the element's data
|
||||
---@param enumTranslator fun(enumValue: V): string # translate the enum value into the text to display
|
||||
---@param isSelected fun(data: any): boolean # data = enum value
|
||||
---@param setSelected MenuResponder
|
||||
---@param orderTbl table<V, number>? # optional table to specify the order of the menu buttons, defaults to ordering by enum value
|
||||
function MenuUtil.CreateEnumRadioMenu(dropdown, enum, enumTranslator, isSelected, setSelected, orderTbl) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MenuUtil.CreateEnumRadioContextMenu)
|
||||
---@generic V
|
||||
---@param dropdown Region? # if nil, defaults to UIParent
|
||||
---@param enum table<V> # a list of values; the value is saved as the element's data
|
||||
---@param enumTranslator fun(enumValue: V): string # translate the enum value into the text to display
|
||||
---@param isSelected fun(data: any): boolean # data = enum value
|
||||
---@param setSelected MenuResponder
|
||||
---@param orderTbl table<V, number>? # optional table to specify the order of the menu buttons, defaults to ordering by enum value
|
||||
---@return MenuProxy? menu
|
||||
function MenuUtil.CreateEnumRadioContextMenu(dropdown, enum, enumTranslator, isSelected, setSelected, orderTbl) end
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
---@meta _
|
||||
|
||||
---@class ElementMenuDescriptionProxy: SharedMenuDescriptionProxy
|
||||
local ElementMenuDescriptionProxy = {}
|
||||
|
||||
function ElementMenuDescriptionProxy:SetSelectionIgnored() end
|
||||
|
||||
---@return boolean
|
||||
function ElementMenuDescriptionProxy:IsSelectionIgnored() end
|
||||
|
||||
---@param data any
|
||||
function ElementMenuDescriptionProxy:SetData(data) end
|
||||
|
||||
---@return any data # from SetData or element creation
|
||||
function ElementMenuDescriptionProxy:GetData() end
|
||||
|
||||
---simulates selecting/clicking a dropdown option
|
||||
---@param menuInputContext MenuInputContext
|
||||
---@param menuInputButtonName mouseButton?
|
||||
function ElementMenuDescriptionProxy:Pick(menuInputContext, menuInputButtonName) end
|
||||
|
||||
---@param isEnabled boolean|fun(elementDescription: ElementMenuDescriptionProxy): boolean
|
||||
function ElementMenuDescriptionProxy:SetEnabled(isEnabled) end
|
||||
|
||||
---@return boolean
|
||||
function ElementMenuDescriptionProxy:IsEnabled() end
|
||||
|
||||
---@return boolean # true if a function was passed to SetEnabled()
|
||||
function ElementMenuDescriptionProxy:ShouldPollEnabled() end
|
||||
|
||||
---@param onLeave fun(frame: Frame, elementDescription: ElementMenuDescriptionProxy)
|
||||
function ElementMenuDescriptionProxy:SetOnLeave(onLeave) end
|
||||
|
||||
---hooks OnLeave if it exists, else calls SetOnLeave
|
||||
---@param onLeave fun(frame: Frame, elementDescription: ElementMenuDescriptionProxy)
|
||||
function ElementMenuDescriptionProxy:HookOnLeave(onLeave) end
|
||||
|
||||
---@return nil|fun(frame: Frame, elementDescription: ElementMenuDescriptionProxy) onLeave
|
||||
function ElementMenuDescriptionProxy:GetOnLeave() end
|
||||
|
||||
---@param frame Frame # frame:OnLeave(elementDescription) is called if it exists, otherwise the onLeave callback is called
|
||||
function ElementMenuDescriptionProxy:HandleOnLeave(frame) end
|
||||
|
||||
---@param onEnter fun(frame: Frame, elementDescription: ElementMenuDescriptionProxy)
|
||||
function ElementMenuDescriptionProxy:SetOnEnter(onEnter) end
|
||||
|
||||
---hooks OnEnter if it exists, else calls SetOnEnter
|
||||
---@param onEnter fun(frame: Frame, elementDescription: ElementMenuDescriptionProxy)
|
||||
function ElementMenuDescriptionProxy:HookOnEnter(onEnter) end
|
||||
|
||||
---@return nil|fun(frame: Frame, elementDescription: ElementMenuDescriptionProxy) onEnter
|
||||
function ElementMenuDescriptionProxy:GetOnEnter() end
|
||||
|
||||
---@param frame Frame # frame:OnEnter(elementDescription) is called if it exists, otherwise the onEnter callback is called
|
||||
function ElementMenuDescriptionProxy:HandleOnEnter(frame) end
|
||||
|
||||
---@param canSelect boolean
|
||||
function ElementMenuDescriptionProxy:SetCanSelect(canSelect) end
|
||||
|
||||
---@return boolean
|
||||
function ElementMenuDescriptionProxy:CanSelect() end
|
||||
|
||||
---@param isSelected fun(data: any): boolean # data = element:GetData()
|
||||
function ElementMenuDescriptionProxy:SetIsSelected(isSelected) end
|
||||
|
||||
---@return boolean isSelected # calls the isSelected callback with the element's data; if no callback is set, returns false
|
||||
function ElementMenuDescriptionProxy:IsSelected() end
|
||||
|
||||
---@param isRadio boolean
|
||||
function ElementMenuDescriptionProxy:SetRadio(isRadio) end
|
||||
|
||||
---@return boolean
|
||||
function ElementMenuDescriptionProxy:IsRadio() end
|
||||
|
||||
---@param defaultResponse MenuResponse|fun(menuInputContext: MenuInputContext, menuInputButtonName: mouseButton): MenuResponse
|
||||
function ElementMenuDescriptionProxy:SetResponse(defaultResponse) end
|
||||
|
||||
---@param menuInputContext MenuInputContext
|
||||
---@param menuInputButtonName mouseButton
|
||||
---@return MenuResponse
|
||||
function ElementMenuDescriptionProxy:GetDefaultResponse(menuInputContext, menuInputButtonName) end
|
||||
|
||||
---@param responder MenuResponder
|
||||
function ElementMenuDescriptionProxy:SetResponder(responder) end
|
||||
|
||||
---hooks responder if it exists, else calls SetResponder
|
||||
---@param responder MenuResponder
|
||||
function ElementMenuDescriptionProxy:HookResponder(responder) end
|
||||
|
||||
function ElementMenuDescriptionProxy:SetElementFactory(callback) end
|
||||
|
||||
---@param soundKit number|fun(elementDescription: ElementMenuDescriptionProxy): number
|
||||
function ElementMenuDescriptionProxy:SetSoundKit(soundKit) end
|
||||
|
||||
---@return number soundKit
|
||||
function ElementMenuDescriptionProxy:GetSoundKit() end
|
||||
|
||||
---@param canPlay boolean
|
||||
function ElementMenuDescriptionProxy:SetShouldPlaySoundOnSubmenuClick(canPlay) end
|
||||
|
||||
---@return boolean
|
||||
function ElementMenuDescriptionProxy:ShouldPlaySoundOnSubmenuClick() end
|
||||
|
||||
function ElementMenuDescriptionProxy:DeactivateSubmenu() end
|
||||
|
||||
---@param canRespond boolean
|
||||
function ElementMenuDescriptionProxy:SetShouldRespondIfSubmenu(canRespond) end
|
||||
|
||||
---@return boolean
|
||||
function ElementMenuDescriptionProxy:ShouldRespondIfSubmenu() end
|
||||
|
||||
---@return boolean canOpenSubmenu # true if there are subItems and opening submenus isn't blocked
|
||||
function ElementMenuDescriptionProxy:CanOpenSubmenu() end
|
||||
|
||||
function ElementMenuDescriptionProxy:ForceOpenSubmenu() end
|
||||
|
||||
---@param callback fun(frame: Frame, descriptionProxy: ElementMenuDescriptionProxy, menuFrame: Frame, finalColumns: number, finalRows: number)
|
||||
function ElementMenuDescriptionProxy:SetFinalizeGridLayout(callback) end
|
||||
@@ -0,0 +1,41 @@
|
||||
---@meta _
|
||||
|
||||
---@see MenuManagerProxyMixin
|
||||
---@class MenuManagerProxy
|
||||
local MenuManagerProxy = {}
|
||||
|
||||
---@see MenuManagerProxyMixin.GetOpenMenu
|
||||
---@return MenuProxy?
|
||||
function MenuManagerProxy:GetOpenMenu() end
|
||||
|
||||
---@see MenuManagerProxyMixin.CloseMenu
|
||||
---@param menu MenuProxy
|
||||
function MenuManagerProxy:CloseMenu(menu) end
|
||||
|
||||
---@see MenuManagerProxyMixin.CloseMenus
|
||||
function MenuManagerProxy:CloseMenus() end
|
||||
|
||||
---@see MenuManagerProxyMixin.IsAnyMenuOpen
|
||||
---@return boolean
|
||||
function MenuManagerProxy:IsAnyMenuOpen() end
|
||||
|
||||
---@see MenuManagerProxyMixin.OpenMenu
|
||||
---@param ownerRegion Region
|
||||
---@param menuDescriptionProxy RootMenuDescriptionProxy
|
||||
---@param anchor AnchorMixin
|
||||
---@return MenuProxy? menu
|
||||
function MenuManagerProxy:OpenMenu(ownerRegion, menuDescriptionProxy, anchor) end
|
||||
|
||||
---@see MenuManagerProxyMixin.OpenContextMenu
|
||||
---@param ownerRegion Region
|
||||
---@param menuDescriptionProxy RootMenuDescriptionProxy
|
||||
---@return MenuProxy? menu
|
||||
function MenuManagerProxy:OpenContextMenu(ownerRegion, menuDescriptionProxy) end
|
||||
|
||||
---@see MenuManagerMixin.HandleESC
|
||||
function MenuManagerProxy:HandleESC() end
|
||||
|
||||
---@see MenuManagerMixin.HandleGlobalMouseEvent
|
||||
---@param buttonName mouseButton
|
||||
---@param event FrameEvent
|
||||
function MenuManagerProxy:HandleGlobalMouseEvent(buttonName, event) end
|
||||
@@ -0,0 +1,38 @@
|
||||
---@meta _
|
||||
|
||||
---@see MenuProxyMixin
|
||||
---@class MenuProxy: Frame, MenuTemplateBase
|
||||
local MenuProxy = {}
|
||||
|
||||
---@see MenuProxyMixin.Close
|
||||
function MenuProxy:Close() end
|
||||
|
||||
---@see MenuMixin.ReinitializeAll # proxied
|
||||
function MenuProxy:ReinitializeAll() end
|
||||
|
||||
---@see MenuProxyMixin.GetOwnerRegion
|
||||
---@return Frame
|
||||
function MenuProxy:GetOwnerRegion() end
|
||||
|
||||
---@see MenuProxyMixin.SendResponse
|
||||
function MenuProxy:SendResponse(descriptionProxy, response) end
|
||||
|
||||
---@see MenuProxyMixin.SetMenuDescription
|
||||
function MenuProxy:SetMenuDescription(descriptionProxy) end
|
||||
|
||||
---@see MenuMixin.SetClosedCallback # proxied
|
||||
---@param onCloseCallback fun(menu: MenuProxy)
|
||||
function MenuProxy:SetClosedCallback(onCloseCallback) end
|
||||
|
||||
---usually you want to use SharedMenuDescriptionProxy:SetScrollMode instead
|
||||
---@see MenuProxyMixin.InitScrollLayout
|
||||
---@param childWidth number
|
||||
---@param maxScrollExtent number # item height * number of items
|
||||
function MenuProxy:InitScrollLayout(childWidth, maxScrollExtent) end
|
||||
|
||||
---@see MenuProxyMixin.ClearScrollLayout
|
||||
function MenuProxy:ClearScrollLayout() end
|
||||
|
||||
---usually there's no need to call it manually
|
||||
---@see MenuProxyMixin.OnLoad
|
||||
function MenuProxy:OnLoad() end
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
---@meta _
|
||||
|
||||
---@class RootMenuDescriptionProxy: SharedMenuDescriptionProxy
|
||||
local RootMenuDescriptionProxy = {}
|
||||
|
||||
---@param callback fun(menu: MenuProxy)
|
||||
function RootMenuDescriptionProxy:AddMenuAcquiredCallback(callback) end
|
||||
|
||||
---@param callback fun()
|
||||
function RootMenuDescriptionProxy:AddMenuChangedCallback(callback) end
|
||||
|
||||
---@param callback fun(menu: MenuProxy, description: SharedMenuDescriptionProxy)
|
||||
function RootMenuDescriptionProxy:AddMenuResponseCallback(callback) end
|
||||
|
||||
---@param callback fun(rootDescription: RootMenuDescriptionProxy)
|
||||
function RootMenuDescriptionProxy:AddMenuReleasedCallback(callback) end
|
||||
|
||||
function RootMenuDescriptionProxy:DisableCompositor() end
|
||||
|
||||
function RootMenuDescriptionProxy:DisableReacquireFrames() end
|
||||
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
---@meta _
|
||||
|
||||
---@class SharedMenuDescriptionProxy
|
||||
local SharedMenuDescriptionProxy = {}
|
||||
|
||||
---@return boolean
|
||||
function SharedMenuDescriptionProxy:HasElements() end
|
||||
|
||||
---@return fun(): number, ElementMenuDescriptionProxy
|
||||
function SharedMenuDescriptionProxy:EnumerateElementDescriptions() end
|
||||
|
||||
---@param elementDescription ElementMenuDescriptionProxy
|
||||
---@param index number? # allows inserting at a specific index, default is last
|
||||
function SharedMenuDescriptionProxy:Insert(elementDescription, index) end
|
||||
|
||||
---@see MenuUtil.CreateTitle
|
||||
---@param text string
|
||||
---@param color colorRGBA? # defaults to NORMAL_FONT_COLOR
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function SharedMenuDescriptionProxy:CreateTitle(text, color) end
|
||||
|
||||
---@see MenuUtil.CreateDivider
|
||||
---@return ElementMenuDescriptionProxy # some inserters and utility functions are missing
|
||||
function SharedMenuDescriptionProxy:CreateDivider() end
|
||||
|
||||
---@see MenuUtil.CreateSpacer
|
||||
---@param extend number? # height of the spacer, default = 10
|
||||
---@return ElementMenuDescriptionProxy # some inserters and utility functions are missing
|
||||
function SharedMenuDescriptionProxy:CreateSpacer(extend) end
|
||||
|
||||
---@see MenuUtil.CreateButton
|
||||
---@param text string
|
||||
---@param callback MenuResponder?
|
||||
---@param data any? # stored as element's data
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function SharedMenuDescriptionProxy:CreateButton(text, callback, data) end
|
||||
|
||||
---@see MenuUtil.CreateCheckbox
|
||||
---@param text string
|
||||
---@param isSelected fun(data: any): boolean # data = data param -> element:GetData()
|
||||
---@param setSelected MenuResponder?
|
||||
---@param data any? # stored as element's data
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function SharedMenuDescriptionProxy:CreateCheckbox(text, isSelected, setSelected, data) end
|
||||
|
||||
---@see MenuUtil.CreateRadio
|
||||
---@param text string
|
||||
---@param isSelected fun(data: any): boolean # data = data param -> element:GetData()
|
||||
---@param setSelected MenuResponder?
|
||||
---@param data any? # stored as element's data
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function SharedMenuDescriptionProxy:CreateRadio(text, isSelected, setSelected, data) end
|
||||
|
||||
---@see MenuUtil.CreateColorSwatch
|
||||
---@param text string
|
||||
---@param callback MenuResponder?
|
||||
---@param colorInfo colorRGBA # stored as element's data
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function SharedMenuDescriptionProxy:CreateColorSwatch(text, callback, colorInfo) end
|
||||
|
||||
---@see MenuUtil.CreateFrame
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function SharedMenuDescriptionProxy:CreateFrame() end
|
||||
|
||||
---@see MenuUtil.CreateTemplate
|
||||
---@param template Template
|
||||
---@return ElementMenuDescriptionProxy
|
||||
function SharedMenuDescriptionProxy:CreateTemplate(template) end
|
||||
|
||||
---@see RootMenuDescriptionProxyMixin.AddQueuedDescription
|
||||
---@param queuedDescription ElementMenuDescriptionProxy
|
||||
function SharedMenuDescriptionProxy:AddQueuedDescription(queuedDescription) end
|
||||
|
||||
---@see RootMenuDescriptionProxyMixin.ClearQueuedDescriptions
|
||||
function SharedMenuDescriptionProxy:ClearQueuedDescriptions() end
|
||||
|
||||
---@see MenuUtilPrivate.Utilities.QueueTitle
|
||||
---@param text string
|
||||
---@param color colorRGBA? # defaults to NORMAL_FONT_COLOR
|
||||
---@param clearQueue boolean? # if true, all previously queued descriptions are cleared
|
||||
function SharedMenuDescriptionProxy:QueueTitle(text, color, clearQueue) end
|
||||
|
||||
---@see MenuUtilPrivate.Utilities.QueueDivider
|
||||
---@param clearQueue boolean? # if true, all previously queued descriptions are cleared
|
||||
function SharedMenuDescriptionProxy:QueueDivider(clearQueue) end
|
||||
|
||||
---@see MenuUtilPrivate.Utilities.QueueSpacer
|
||||
---@param extend number? # height of the spacer, default = 10
|
||||
---@param clearQueue boolean? # if true, all previously queued descriptions are cleared
|
||||
function SharedMenuDescriptionProxy:QueueSpacer(extend, clearQueue) end
|
||||
|
||||
---@see MenuUtilPrivate.Utilities.SetTitleAndTextTooltip
|
||||
---@param title string
|
||||
---@param text string
|
||||
function SharedMenuDescriptionProxy:SetTitleAndTextTooltip(title, text) end
|
||||
|
||||
---@see MenuUtilPrivate.Utilities.SetTooltip
|
||||
---@param initializer fun(tooltip: GameTooltip, elementDescription: ElementMenuDescriptionProxy)
|
||||
function SharedMenuDescriptionProxy:SetTooltip(initializer) end
|
||||
|
||||
---@param initializer MenuDescriptionInitializer
|
||||
---@param index number? # allows specifying an insert order, to run before / after some other initializer; default is last
|
||||
function SharedMenuDescriptionProxy:AddInitializer(initializer, index) end
|
||||
|
||||
---@param initializer MenuDescriptionInitializer
|
||||
function SharedMenuDescriptionProxy:SetFinalInitializer(initializer) end
|
||||
|
||||
---Registers a callback that will be executed when the MenuDescription's frame is cleaned up on hiding
|
||||
---Especially useful if you add customizations in the Initializer that aren't reset automatically
|
||||
---@param resetter fun(frame: Frame)
|
||||
function SharedMenuDescriptionProxy:AddResetter(resetter) end
|
||||
|
||||
---@see RootMenuDescriptionProxyMixin.GetTag
|
||||
---@return string? tag
|
||||
---@return any? contextData
|
||||
function SharedMenuDescriptionProxy:GetTag() end
|
||||
|
||||
---@see RootMenuDescriptionProxyMixin.SetTag
|
||||
---@param tag string
|
||||
---@param contextData any?
|
||||
function SharedMenuDescriptionProxy:SetTag(tag, contextData) end
|
||||
|
||||
---@return number
|
||||
function SharedMenuDescriptionProxy:GetMinimumWidth() end
|
||||
|
||||
---@param width number
|
||||
function SharedMenuDescriptionProxy:SetMinimumWidth(width) end
|
||||
|
||||
---@param width number
|
||||
function SharedMenuDescriptionProxy:SetMaximumWidth(width) end
|
||||
|
||||
---@param direction MenuGridDirection
|
||||
---@param columns number? # if not specified, determines the number of columns based on the number of elements
|
||||
---@param padding number? # defaults to 0
|
||||
---@param compactionMargin number? # defaults to disabled
|
||||
function SharedMenuDescriptionProxy:SetGridMode(direction, columns, padding, compactionMargin) end
|
||||
|
||||
---@param maxScrollExtent number? # item height * number of items, defaults to 200
|
||||
function SharedMenuDescriptionProxy:SetScrollMode(maxScrollExtent) end
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
---@meta _
|
||||
---@meta _
|
||||
---@class NamePlateFrame : Frame, NamePlateBaseMixin
|
||||
local NamePlateFrame = {}
|
||||
|
||||
---@class NamePlateBaseMixin
|
||||
---@field UnitFrame Button
|
||||
---@field driverFrame NamePlateDriverFrame
|
||||
---@field namePlateUnitToken UnitToken
|
||||
---@field template string
|
||||
local NamePlateBaseMixin = {}
|
||||
|
||||
---@param namePlateUnitToken UnitToken
|
||||
---@param driverFrame NamePlateDriverFrame
|
||||
function NamePlateBaseMixin:OnAdded(namePlateUnitToken, driverFrame) end
|
||||
|
||||
function NamePlateBaseMixin:OnRemoved() end
|
||||
|
||||
function NamePlateBaseMixin:OnOptionsUpdated() end
|
||||
|
||||
function NamePlateBaseMixin:ApplyOffsets() end
|
||||
|
||||
---@param insetWidth number
|
||||
---@param insetHeight number
|
||||
---@return number widthPadding
|
||||
---@return number heightPadding
|
||||
function NamePlateBaseMixin:GetAdditionalInsetPadding(insetWidth, insetHeight) end
|
||||
|
||||
---@return number left
|
||||
---@return number right
|
||||
---@return number top
|
||||
---@return number bottom
|
||||
function NamePlateBaseMixin:GetPreferredInsets() end
|
||||
|
||||
function NamePlateBaseMixin:OnSizeChanged() end
|
||||
|
||||
--- not yet annotated, inherits NamePlateDriverMixin
|
||||
---@class NamePlateDriverFrame
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
---@meta _
|
||||
---@class ContinuableContainer
|
||||
ContinuableContainer = {};
|
||||
|
||||
---@return ContinuableContainer
|
||||
function ContinuableContainer:Create() end
|
||||
|
||||
function ContinuableContainer:AddContinuables(tbl) end
|
||||
|
||||
function ContinuableContainer:AddContinuable(continuable) end
|
||||
|
||||
---@return boolean checkIfSatisfied
|
||||
function ContinuableContainer:ContinueOnLoad(callbackFunction) end
|
||||
|
||||
---@return number numOutstanding
|
||||
function ContinuableContainer:GetNumOutstandingLoads() end
|
||||
|
||||
---@return number mumOutstandingLoads
|
||||
function ContinuableContainer:AreAnyLoadsOutstanding() end
|
||||
|
||||
function ContinuableContainer:Cancel() end
|
||||
|
||||
-- "private"
|
||||
---@return boolean checkIfSatisfied
|
||||
function ContinuableContainer:CheckIfSatisfied() end
|
||||
|
||||
---@return boolean areAllLoaded
|
||||
function ContinuableContainer:RecheckEvictableContinuables() end
|
||||
@@ -0,0 +1,109 @@
|
||||
---@meta _
|
||||
Item = {}
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/ItemMixin)
|
||||
---@class ItemMixin
|
||||
ItemMixin = {}
|
||||
|
||||
---@param itemLocation ItemLocation
|
||||
---@return ItemMixin
|
||||
function Item:CreateFromItemLocation(itemLocation) end
|
||||
|
||||
---@param bagID number
|
||||
---@param slotIndex number
|
||||
---@return ItemMixin
|
||||
function Item:CreateFromBagAndSlot(bagID, slotIndex) end
|
||||
|
||||
---@param equipmentSlotIndex number
|
||||
---@return ItemMixin
|
||||
function Item:CreateFromEquipmentSlot(equipmentSlotIndex) end
|
||||
|
||||
---@param itemLink string
|
||||
---@return ItemMixin
|
||||
function Item:CreateFromItemLink(itemLink) end
|
||||
|
||||
---@param itemID number
|
||||
---@return ItemMixin
|
||||
function Item:CreateFromItemID(itemID) end
|
||||
|
||||
---@param itemLocation ItemLocation
|
||||
function ItemMixin:SetItemLocation(itemLocation) end
|
||||
|
||||
---@param itemLink string
|
||||
function ItemMixin:SetItemLink(itemLink) end
|
||||
|
||||
---@param itemID number
|
||||
function ItemMixin:SetItemID(itemID) end
|
||||
|
||||
---@return ItemLocation
|
||||
function ItemMixin:GetItemLocation() end
|
||||
|
||||
---@return boolean
|
||||
function ItemMixin:HasItemLocation() end
|
||||
|
||||
function ItemMixin:Clear() end
|
||||
|
||||
---@return boolean
|
||||
function ItemMixin:IsItemEmpty() end
|
||||
|
||||
---@return string|number
|
||||
function ItemMixin:GetStaticBackingItem() end
|
||||
|
||||
---@return boolean
|
||||
function ItemMixin:IsItemInPlayersControl() end
|
||||
|
||||
-- Item API
|
||||
---@return number
|
||||
function ItemMixin:GetItemID() end
|
||||
|
||||
---@return boolean
|
||||
function ItemMixin:IsItemLocked() end
|
||||
|
||||
function ItemMixin:LockItem() end
|
||||
|
||||
function ItemMixin:UnlockItem() end
|
||||
|
||||
---@return number
|
||||
function ItemMixin:GetItemIcon() end
|
||||
|
||||
---@return string
|
||||
function ItemMixin:GetItemName() end
|
||||
|
||||
---@return string
|
||||
function ItemMixin:GetItemLink() end
|
||||
|
||||
---@return Enum.ItemQuality
|
||||
function ItemMixin:GetItemQuality() end
|
||||
|
||||
---@return number
|
||||
function ItemMixin:GetCurrentItemLevel() end
|
||||
|
||||
---@return table
|
||||
function ItemMixin:GetItemQualityColor() end
|
||||
|
||||
---@return Enum.InventoryType
|
||||
function ItemMixin:GetInventoryType() end
|
||||
|
||||
---@return string
|
||||
function ItemMixin:GetItemGUID() end
|
||||
|
||||
---@return string
|
||||
function ItemMixin:GetInventoryTypeName() end
|
||||
|
||||
---@return boolean
|
||||
function ItemMixin:IsItemDataCached() end
|
||||
|
||||
---@return boolean
|
||||
function ItemMixin:IsDataEvictable() end
|
||||
|
||||
---@return number
|
||||
function ItemMixin:GetStackCount() end
|
||||
|
||||
--- Add a callback to be executed when item data is loaded, if the item data is already loaded then execute it immediately
|
||||
---@param callbackFunction function
|
||||
function ItemMixin:ContinueOnItemLoad(callbackFunction) end
|
||||
|
||||
--- Same as ContinueOnItemLoad, except it returns a function that when called will cancel the continue
|
||||
---@param callbackFunction function
|
||||
---@return function
|
||||
function ItemMixin:ContinueWithCancelOnItemLoad(callbackFunction) end
|
||||
@@ -0,0 +1,66 @@
|
||||
---@meta _
|
||||
ItemLocation = {}
|
||||
|
||||
---@class ItemLocation : ItemLocationData, ItemLocationMixin
|
||||
|
||||
---@class ItemLocationData
|
||||
---@field equipmentSlotIndex? number
|
||||
---@field bagID? number
|
||||
---@field slotIndex? number
|
||||
|
||||
---@class ItemLocationMixin
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/ItemLocationMixin)
|
||||
ItemLocationMixin = {}
|
||||
|
||||
---@return ItemLocation
|
||||
function ItemLocation:CreateEmpty() end
|
||||
|
||||
---@param bagID number
|
||||
---@param slotIndex number
|
||||
---@return ItemLocation
|
||||
function ItemLocation:CreateFromBagAndSlot(bagID, slotIndex) end
|
||||
|
||||
---@param equipmentSlotIndex number
|
||||
---@return ItemLocation
|
||||
function ItemLocation:CreateFromEquipmentSlot(equipmentSlotIndex) end
|
||||
|
||||
function ItemLocationMixin:Clear() end
|
||||
|
||||
---@param bagID number
|
||||
---@param slotIndex number
|
||||
function ItemLocationMixin:SetBagAndSlot(bagID, slotIndex) end
|
||||
|
||||
---@return number bagID
|
||||
---@return number slotIndex
|
||||
function ItemLocationMixin:GetBagAndSlot() end
|
||||
|
||||
---@param equipmentSlotIndex number
|
||||
function ItemLocationMixin:SetEquipmentSlot(equipmentSlotIndex) end
|
||||
|
||||
---@return number
|
||||
function ItemLocationMixin:GetEquipmentSlot() end
|
||||
|
||||
---@return boolean
|
||||
function ItemLocationMixin:IsEquipmentSlot() end
|
||||
|
||||
---@return boolean
|
||||
function ItemLocationMixin:IsBagAndSlot() end
|
||||
|
||||
---@return boolean
|
||||
function ItemLocationMixin:HasAnyLocation() end
|
||||
|
||||
---@return boolean
|
||||
function ItemLocationMixin:IsValid() end
|
||||
|
||||
---@param otherBagID number
|
||||
---@param otherSlotIndex number
|
||||
---@return boolean
|
||||
function ItemLocationMixin:IsEqualToBagAndSlot(otherBagID, otherSlotIndex) end
|
||||
|
||||
---@param otherEquipmentSlotIndex number
|
||||
---@return boolean
|
||||
function ItemLocationMixin:IsEqualToEquipmentSlot(otherEquipmentSlotIndex) end
|
||||
|
||||
---@param otherItemLocation ItemLocation
|
||||
---@return boolean
|
||||
function ItemLocationMixin:IsEqualTo(otherItemLocation) end
|
||||
@@ -0,0 +1,158 @@
|
||||
---@meta _
|
||||
PlayerLocation = {}
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/PlayerLocationMixin)
|
||||
---@class PlayerLocationMixin
|
||||
---@field unit? UnitId
|
||||
---@field chatLineID? number
|
||||
---@field guid? string
|
||||
---@field SetGUID? function
|
||||
---@field IsValid? function
|
||||
---@field IsGUID? function
|
||||
---@field IsBattleNetGUID? function
|
||||
---@field GetGUID? function
|
||||
---@field SetUnit? function
|
||||
---@field IsUnit? function
|
||||
---@field GetUnit? function
|
||||
---@field SetChatLineID? function
|
||||
---@field IsChatLineID? function
|
||||
---@field GetChatLineID? function
|
||||
---@field SetBattlefieldScoreIndex? function
|
||||
---@field IsBattlefieldScoreIndex? function
|
||||
---@field GetBattlefieldScoreIndex? function
|
||||
---@field SetVoiceID? function
|
||||
---@field IsVoiceID? function
|
||||
---@field GetVoiceID? function
|
||||
---@field SetBattleNetID? function
|
||||
---@field IsBattleNetID? function
|
||||
---@field GetBattleNetID? function
|
||||
---@field SetCommunityData? function
|
||||
---@field IsCommunityData? function
|
||||
---@field SetCommunityInvitation? function
|
||||
---@field IsCommunityInvitation? function
|
||||
---@field Clear? function
|
||||
---@field ClearAndSetField? function
|
||||
PlayerLocationMixin = {}
|
||||
|
||||
---@param guid string
|
||||
---@return PlayerLocationMixin
|
||||
function PlayerLocation:CreateFromGUID(guid) end
|
||||
|
||||
---@param unit string
|
||||
---@return PlayerLocationMixin
|
||||
function PlayerLocation:CreateFromUnit(unit) end
|
||||
|
||||
---@param lineID number
|
||||
---@return PlayerLocationMixin
|
||||
function PlayerLocation:CreateFromChatLineID(lineID) end
|
||||
|
||||
---@param clubID string
|
||||
---@param streamID string
|
||||
---@param epoch number
|
||||
---@param position number
|
||||
---@return PlayerLocationMixin
|
||||
function PlayerLocation:CreateFromCommunityChatData(clubID, streamID, epoch, position) end
|
||||
|
||||
---@param clubID string
|
||||
---@param guid string
|
||||
---@return PlayerLocationMixin
|
||||
function PlayerLocation:CreateFromCommunityInvitation(clubID, guid) end
|
||||
|
||||
---@param battlefieldScoreIndex number
|
||||
---@return PlayerLocationMixin
|
||||
function PlayerLocation:CreateFromBattlefieldScoreIndex(battlefieldScoreIndex) end
|
||||
|
||||
---@param memberID number
|
||||
---@param channelID number
|
||||
---@return PlayerLocationMixin
|
||||
function PlayerLocation:CreateFromVoiceID(memberID, channelID) end
|
||||
|
||||
---@param battleNetID number
|
||||
---@return PlayerLocationMixin
|
||||
function PlayerLocation:CreateFromBattleNetID(battleNetID) end
|
||||
|
||||
--[[public api]]
|
||||
---@param guid string
|
||||
function PlayerLocationMixin:SetGUID(guid) end
|
||||
|
||||
---@return boolean
|
||||
function PlayerLocationMixin:IsValid() end
|
||||
|
||||
---@return boolean
|
||||
function PlayerLocationMixin:IsGUID() end
|
||||
|
||||
---@return boolean
|
||||
function PlayerLocationMixin:IsBattleNetGUID() end
|
||||
|
||||
---@return string
|
||||
function PlayerLocationMixin:GetGUID() end
|
||||
|
||||
---@param unit string
|
||||
function PlayerLocationMixin:SetUnit(unit) end
|
||||
|
||||
---@return boolean
|
||||
function PlayerLocationMixin:IsUnit() end
|
||||
|
||||
---@return string
|
||||
function PlayerLocationMixin:GetUnit() end
|
||||
|
||||
---@param lineID number
|
||||
function PlayerLocationMixin:SetChatLineID(lineID) end
|
||||
|
||||
---@return boolean
|
||||
function PlayerLocationMixin:IsChatLineID() end
|
||||
|
||||
---@return number
|
||||
function PlayerLocationMixin:GetChatLineID() end
|
||||
|
||||
---@param index number
|
||||
function PlayerLocationMixin:SetBattlefieldScoreIndex(index) end
|
||||
|
||||
---@return boolean
|
||||
function PlayerLocationMixin:IsBattlefieldScoreIndex() end
|
||||
|
||||
---@return number
|
||||
function PlayerLocationMixin:GetBattlefieldScoreIndex() end
|
||||
|
||||
---@param memberID number
|
||||
---@param channelID number
|
||||
function PlayerLocationMixin:SetVoiceID(memberID, channelID) end
|
||||
|
||||
---@return boolean
|
||||
function PlayerLocationMixin:IsVoiceID() end
|
||||
|
||||
---@return number voiceMemberID
|
||||
---@return number voiceChannelID
|
||||
function PlayerLocationMixin:GetVoiceID() end
|
||||
|
||||
---@param battleNetID number
|
||||
function PlayerLocationMixin:SetBattleNetID(battleNetID) end
|
||||
|
||||
---@return boolean
|
||||
function PlayerLocationMixin:IsBattleNetID() end
|
||||
|
||||
---@return number
|
||||
function PlayerLocationMixin:GetBattleNetID() end
|
||||
|
||||
---@param clubID string
|
||||
---@param streamID string
|
||||
---@param epoch number
|
||||
---@param position number
|
||||
function PlayerLocationMixin:SetCommunityData(clubID, streamID, epoch, position) end
|
||||
|
||||
---@return boolean
|
||||
function PlayerLocationMixin:IsCommunityData() end
|
||||
|
||||
---@param clubID string
|
||||
---@param guid string
|
||||
function PlayerLocationMixin:SetCommunityInvitation(clubID, guid) end
|
||||
|
||||
---@return boolean
|
||||
function PlayerLocationMixin:IsCommunityInvitation() end
|
||||
|
||||
--[[private api]]
|
||||
function PlayerLocationMixin:Clear() end
|
||||
|
||||
---@param fieldName string
|
||||
---@param field any
|
||||
function PlayerLocationMixin:ClearAndSetField(fieldName, field) end
|
||||
@@ -0,0 +1,42 @@
|
||||
---@meta _
|
||||
Spell = {}
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/SpellMixin)
|
||||
---@class SpellMixin
|
||||
SpellMixin = {}
|
||||
|
||||
---@param spellID number
|
||||
---@return SpellMixin
|
||||
function Spell:CreateFromSpellID(spellID) end
|
||||
|
||||
---@param spellID number
|
||||
function SpellMixin:SetSpellID(spellID) end
|
||||
|
||||
---@return number
|
||||
function SpellMixin:GetSpellID() end
|
||||
|
||||
function SpellMixin:Clear() end
|
||||
|
||||
---@return boolean
|
||||
function SpellMixin:IsSpellEmpty() end
|
||||
|
||||
---@return boolean
|
||||
function SpellMixin:IsSpellDataCached() end
|
||||
|
||||
---@return string
|
||||
function SpellMixin:GetSpellName() end
|
||||
|
||||
---@return string
|
||||
function SpellMixin:GetSpellSubtext() end
|
||||
|
||||
---@return string
|
||||
function SpellMixin:GetSpellDescription() end
|
||||
|
||||
-- Add a callback to be executed when spell data is loaded, if the spell data is already loaded then execute it immediately
|
||||
---@param callbackFunction function
|
||||
function SpellMixin:ContinueOnSpellLoad(callbackFunction) end
|
||||
|
||||
-- Same as ContinueOnSpellLoad, except it returns a function that when called will cancel the continue
|
||||
---@param callbackFunction function
|
||||
---@return function
|
||||
function SpellMixin:ContinueWithCancelOnSpellLoad(callbackFunction) end
|
||||
@@ -0,0 +1,85 @@
|
||||
---@meta _
|
||||
---@class backdropInfo
|
||||
---@field bgFile? string
|
||||
---@field edgeFile? string
|
||||
---@field tile? boolean
|
||||
---@field tileSize? number
|
||||
---@field tileEdge? boolean
|
||||
---@field edgeSize? number
|
||||
---@field insets? backdropInsets
|
||||
|
||||
---@class backdropInsets
|
||||
---@field left number
|
||||
---@field right number
|
||||
---@field top number
|
||||
---@field bottom number
|
||||
|
||||
---@class BackdropTemplate
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/BackdropTemplate)
|
||||
local BackdropTemplateMixin = {}
|
||||
_G.BackdropTemplateMixin = BackdropTemplateMixin
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:OnBackdropLoaded)
|
||||
function BackdropTemplateMixin:OnBackdropLoaded() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:OnBackdropSizeChanged)
|
||||
function BackdropTemplateMixin:OnBackdropSizeChanged() end
|
||||
|
||||
---@return number
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:GetEdgeSize)
|
||||
function BackdropTemplateMixin:GetEdgeSize() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:SetupTextureCoordinates)
|
||||
function BackdropTemplateMixin:SetupTextureCoordinates() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:SetupPieceVisuals)
|
||||
function BackdropTemplateMixin:SetupPieceVisuals(piece, setupInfo, pieceLayout) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:SetBorderBlendMode)
|
||||
function BackdropTemplateMixin:SetBorderBlendMode(blendMode) end
|
||||
|
||||
---@param backdropInfo backdropInfo
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:HasBackdropInfo)
|
||||
function BackdropTemplateMixin:HasBackdropInfo(backdropInfo) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:ClearBackdrop)
|
||||
function BackdropTemplateMixin:ClearBackdrop() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:ApplyBackdrop)
|
||||
function BackdropTemplateMixin:ApplyBackdrop() end
|
||||
|
||||
---@param backdropInfo? backdropInfo
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:SetBackdrop)
|
||||
function BackdropTemplateMixin:SetBackdrop(backdropInfo) end
|
||||
|
||||
---@return backdropInfo
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:GetBackdrop)
|
||||
function BackdropTemplateMixin:GetBackdrop() end
|
||||
|
||||
---@return number r Returns nil if `self.backdropInfo` is not defined
|
||||
---@return number g
|
||||
---@return number b
|
||||
---@return number a
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:GetBackdropColor)
|
||||
function BackdropTemplateMixin:GetBackdropColor() end
|
||||
|
||||
---@param r number
|
||||
---@param g number
|
||||
---@param b number
|
||||
---@param a? number
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:SetBackdropColor)
|
||||
function BackdropTemplateMixin:SetBackdropColor(r, g, b, a) end
|
||||
|
||||
---@return number r Returns nil if `self.backdropInfo` is not defined
|
||||
---@return number g
|
||||
---@return number b
|
||||
---@return number a
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:GetBackdropBorderColor)
|
||||
function BackdropTemplateMixin:GetBackdropBorderColor() end
|
||||
|
||||
---@param r number
|
||||
---@param g number
|
||||
---@param b number
|
||||
---@param a? number
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/BackdropTemplateMixin:SetBackdropBorderColor)
|
||||
function BackdropTemplateMixin:SetBackdropBorderColor(r, g, b, a) end
|
||||
@@ -0,0 +1,38 @@
|
||||
---@meta _
|
||||
---@class CallbackRegistryMixin
|
||||
CallbackRegistryMixin = {}
|
||||
|
||||
function CallbackRegistryMixin:SetUndefinedEventsAllowed(allowed) end
|
||||
|
||||
---@return table
|
||||
function CallbackRegistryMixin:GetCallbackTables() end
|
||||
|
||||
---@return table
|
||||
function CallbackRegistryMixin:GetCallbackTable(callbackType) end
|
||||
|
||||
---@return table
|
||||
function CallbackRegistryMixin:GetCallbacksByEvent(callbackType, event) end
|
||||
|
||||
---@return boolean
|
||||
function CallbackRegistryMixin:HasRegistrantsForEvent(event) end
|
||||
|
||||
function CallbackRegistryMixin:SecureInsertEvent(event) end
|
||||
|
||||
---@return any owner
|
||||
function CallbackRegistryMixin:RegisterCallback(event, func, owner, ...) end
|
||||
|
||||
---@return table
|
||||
function CallbackRegistryMixin:RegisterCallbackWithHandle(event, func, owner, ...) end
|
||||
|
||||
function CallbackRegistryMixin:TriggerEvent(event, ...) end
|
||||
|
||||
function CallbackRegistryMixin:UnregisterCallback(event, owner) end
|
||||
|
||||
function CallbackRegistryMixin:UnregisterEvents(eventTable) end
|
||||
|
||||
function CallbackRegistryMixin:GenerateCallbackEvents(events) end
|
||||
|
||||
---@return boolean
|
||||
function CallbackRegistryMixin.DoesFrameHaveEvent(frame, event) end
|
||||
|
||||
function CallbackRegistryMixin:OnLoad() end
|
||||
@@ -0,0 +1,88 @@
|
||||
---@meta _
|
||||
|
||||
---@class ColorRGBData
|
||||
---@field r number
|
||||
---@field g number
|
||||
---@field b number
|
||||
---@field colorStr? string
|
||||
|
||||
---@class ColorRGBAData : ColorRGBData
|
||||
---@field a number
|
||||
|
||||
---@class colorRGB : ColorRGBData, ColorMixin
|
||||
---@class colorRGBA : ColorRGBAData, colorRGB
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin)
|
||||
---@class ColorMixin
|
||||
ColorMixin = {}
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CreateColor)
|
||||
---@param r number
|
||||
---@param g number
|
||||
---@param b number
|
||||
---@param a? number
|
||||
---@return colorRGBA
|
||||
function CreateColor(r, g, b, a) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin:IsEqualTo)
|
||||
---@param otherColor colorRGBA
|
||||
---@return boolean
|
||||
function ColorMixin:IsEqualTo(otherColor) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin:GetRGB)
|
||||
---@return number r
|
||||
---@return number g
|
||||
---@return number b
|
||||
function ColorMixin:GetRGB() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin:GetRGBAsBytes)
|
||||
---@return number r
|
||||
---@return number g
|
||||
---@return number b
|
||||
function ColorMixin:GetRGBAsBytes() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin:GetRGBA)
|
||||
---@return number r
|
||||
---@return number g
|
||||
---@return number b
|
||||
---@return number? a
|
||||
function ColorMixin:GetRGBA() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin:GetRGBAAsBytes)
|
||||
---@return number r
|
||||
---@return number g
|
||||
---@return number b
|
||||
---@return number? a
|
||||
function ColorMixin:GetRGBAAsBytes() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin:SetRGBA)
|
||||
---@param r number
|
||||
---@param g number
|
||||
---@param b number
|
||||
---@param a? number
|
||||
function ColorMixin:SetRGBA(r, g, b, a) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin:SetRGB)
|
||||
---@param r number
|
||||
---@param g number
|
||||
---@param b number
|
||||
function ColorMixin:SetRGB(r, g, b) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin:GenerateHexColor)
|
||||
---@return string
|
||||
function ColorMixin:GenerateHexColor() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin:GenerateHexColorMarkup)
|
||||
---@return string
|
||||
function ColorMixin:GenerateHexColorMarkup() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ColorMixin:WrapTextInColorCode)
|
||||
---@param text string
|
||||
---@return string
|
||||
function ColorMixin:WrapTextInColorCode(text) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/WrapTextInColorCode)
|
||||
---@param text string
|
||||
---@param colorHexString string
|
||||
---@return string
|
||||
function WrapTextInColorCode(text, colorHexString) end
|
||||
@@ -0,0 +1,44 @@
|
||||
---@meta _
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CreateColorFromHexString)
|
||||
---@param hexColor string
|
||||
---@return colorRGBA
|
||||
function CreateColorFromHexString(hexColor) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CreateColorFromBytes)
|
||||
---@param r number
|
||||
---@param g number
|
||||
---@param b number
|
||||
---@param a number
|
||||
---@return colorRGBA
|
||||
function CreateColorFromBytes(r, g, b, a) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/AreColorsEqual)
|
||||
---@param left colorRGBA
|
||||
---@param right colorRGBA
|
||||
---@return boolean
|
||||
function AreColorsEqual(left, right) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetClassColor)
|
||||
---@param classFilename ClassFile
|
||||
---@return number r
|
||||
---@return number g
|
||||
---@return number b
|
||||
---@return string colorStr
|
||||
function GetClassColor(classFilename) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetClassColorObj)
|
||||
---@param classFilename string
|
||||
---@return colorRGB
|
||||
function GetClassColorObj(classFilename) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetClassColoredTextForUnit)
|
||||
---@param unit string
|
||||
---@param text string
|
||||
---@return string
|
||||
function GetClassColoredTextForUnit(unit, text) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetFactionColor)
|
||||
---@param factionGroupTag string
|
||||
---@return colorRGBA
|
||||
function GetFactionColor(factionGroupTag) end
|
||||
@@ -0,0 +1,62 @@
|
||||
---@meta _
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/API_C_CVar.RegisterCVar)
|
||||
---@param name CVar
|
||||
---@param value? string
|
||||
function RegisterCVar(name, value)
|
||||
C_CVar.RegisterCVar(name, value);
|
||||
end
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/API_C_CVar.ResetTestCVars)
|
||||
function ResetTestCvars()
|
||||
C_CVar.ResetTestCVars();
|
||||
end
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/API_C_CVar.SetCVar)
|
||||
---@param name CVar
|
||||
---@param value? boolean|string|number
|
||||
---@return boolean success
|
||||
function SetCVar(name, value)
|
||||
if type(value) == "boolean" then
|
||||
return C_CVar.SetCVar(name, value and "1" or "0");
|
||||
else
|
||||
return C_CVar.SetCVar(name, value and tostring(value) or nil);
|
||||
end
|
||||
end
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/API_C_CVar.GetCVar)
|
||||
---@param name CVar
|
||||
---@return string? value
|
||||
function GetCVar(name)
|
||||
return C_CVar.GetCVar(name);
|
||||
end
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/API_C_CVar.SetCVarBitfield)
|
||||
---@param name CVar
|
||||
---@param index number
|
||||
---@param value boolean
|
||||
---@return boolean success
|
||||
function SetCVarBitfield(name, index, value)
|
||||
return C_CVar.SetCVarBitfield(name, index, value);
|
||||
end
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/API_C_CVar.GetCVarBitfield)
|
||||
---@param name CVar
|
||||
---@param index number
|
||||
---@return boolean? value
|
||||
function GetCVarBitfield(name, index)
|
||||
return C_CVar.GetCVarBitfield(name, index);
|
||||
end
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/API_C_CVar.GetCVarBool)
|
||||
---@param name CVar
|
||||
---@return boolean? value
|
||||
function GetCVarBool(name)
|
||||
return C_CVar.GetCVarBool(name);
|
||||
end
|
||||
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/API_C_CVar.GetCVarDefault)
|
||||
---@param name CVar
|
||||
---@return string? defaultValue
|
||||
function GetCVarDefault(name)
|
||||
return C_CVar.GetCVarDefault(name);
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
---@meta _
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/DevTools_Dump)
|
||||
---@param value any
|
||||
---@param startKey? string
|
||||
function DevTools_Dump(value, startKey) end
|
||||
@@ -0,0 +1,72 @@
|
||||
---@meta _
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SplitTextIntoLines)
|
||||
---@param text string
|
||||
---@param delimiter string
|
||||
---@return string[]
|
||||
function SplitTextIntoLines(text, delimiter) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SplitTextIntoHeaderAndNonHeader)
|
||||
---@param text string
|
||||
---@return string? header
|
||||
---@return string? nonHeader
|
||||
function SplitTextIntoHeaderAndNonHeader(text) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/FormatValueWithSign)
|
||||
---@param value number
|
||||
---@return string
|
||||
function FormatValueWithSign(value) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/FormatLargeNumber)
|
||||
---@param amount string|number
|
||||
---@return string
|
||||
function FormatLargeNumber(amount) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetMoneyString)
|
||||
---@param money number
|
||||
---@param separateThousands? boolean
|
||||
---@return string
|
||||
function GetMoneyString(money, separateThousands) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/FormatPercentage)
|
||||
---@param percentage number
|
||||
---@param roundToNearestInteger? boolean
|
||||
---@return string
|
||||
function FormatPercentage(percentage, roundToNearestInteger) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/FormatFraction)
|
||||
---@param numerator number
|
||||
---@param denominator number
|
||||
---@return string
|
||||
function FormatFraction(numerator, denominator) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetHighlightedNumberDifferenceString)
|
||||
---@param baseString string
|
||||
---@param newString string
|
||||
---@return string
|
||||
function GetHighlightedNumberDifferenceString(baseString, newString) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/FormatUnreadMailTooltip)
|
||||
---@param tooltip GameTooltip
|
||||
---@param headerText string
|
||||
---@param senders string[]
|
||||
function FormatUnreadMailTooltip(tooltip, headerText, senders) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetCurrencyString)
|
||||
---@param currencyID number
|
||||
---@param overrideAmount? number
|
||||
---@param colorCode? string
|
||||
---@param abbreviate? boolean
|
||||
---@return string
|
||||
function GetCurrencyString(currencyID, overrideAmount, colorCode, abbreviate) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetCurrenciesString)
|
||||
---@param currencies number[] | table[] an array of currencyIDs, or a table with e.g. `{currencyID=x, amount=y} `
|
||||
---@return string
|
||||
function GetCurrenciesString(currencies) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ReplaceGenderTokens)
|
||||
--- This is a very simple parser that will only handle $G/$g tokens
|
||||
---@param string string
|
||||
---@param gender string
|
||||
---@return string
|
||||
function ReplaceGenderTokens(string, gender) end
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
---@meta _
|
||||
---[Documentation](https://warcraft.wiki.gg/wiki/EventRegistry)
|
||||
EventRegistry = CreateFromMixins(CallbackRegistryMixin)
|
||||
|
||||
-- function EventRegistry:OnLoad() end
|
||||
|
||||
---@param frameEvent FrameEvent
|
||||
---@param value number
|
||||
function EventRegistry:OnAttributeChanged(frameEvent, value) end
|
||||
|
||||
---@param frameEvent FrameEvent
|
||||
function EventRegistry:RegisterFrameEvent(frameEvent) end
|
||||
|
||||
---@param frameEvent FrameEvent
|
||||
function EventRegistry:UnregisterFrameEvent(frameEvent) end
|
||||
|
||||
---@param frameEvent FrameEvent
|
||||
---@return any owner
|
||||
function EventRegistry:RegisterFrameEventAndCallback(frameEvent, ...) end
|
||||
|
||||
---@param frameEvent FrameEvent
|
||||
---@return table
|
||||
function EventRegistry:RegisterFrameEventAndCallbackWithHandle(frameEvent, ...) end
|
||||
|
||||
---@param frameEvent FrameEvent
|
||||
function EventRegistry:UnregisterFrameEventAndCallback(frameEvent, ...) end
|
||||
|
||||
---@return string
|
||||
function EventRegistry:GetEventCounts(...) end
|
||||
@@ -0,0 +1,38 @@
|
||||
---@meta _
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Mixin)
|
||||
--- Copies mixins into an existing object
|
||||
---@generic T1, T2
|
||||
---@param object T1
|
||||
---@param ... T2
|
||||
---@return T1|T2 mixin
|
||||
function Mixin(object, ...)
|
||||
for i = 1, select("#", ...) do
|
||||
local mixin = select(i, ...);
|
||||
for k, v in pairs(mixin) do
|
||||
object[k] = v;
|
||||
end
|
||||
end
|
||||
return object;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CreateFromMixins)
|
||||
--- Copies mixins into a new object
|
||||
---@generic T1, T2
|
||||
---@param mixin T1
|
||||
---@param ... T2
|
||||
---@return T1|T2 mixin
|
||||
function CreateFromMixins(mixin, ...)
|
||||
return Mixin({}, mixin, ...)
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CreateAndInitFromMixin)
|
||||
--- Copies mixins into a new object and initializes it
|
||||
---@generic T
|
||||
---@param mixin T
|
||||
---@param ... any
|
||||
---@return T mixin
|
||||
function CreateAndInitFromMixin(mixin, ...)
|
||||
local object = CreateFromMixins(mixin);
|
||||
object:Init(...);
|
||||
return object;
|
||||
end
|
||||
@@ -0,0 +1,233 @@
|
||||
---@meta _
|
||||
local function ripairsiter(table, index)
|
||||
index = index - 1;
|
||||
if index > 0 then
|
||||
return index, table[index];
|
||||
end
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ripairs)
|
||||
-- Reverse iterates over a sequential table. Example:
|
||||
-- ```
|
||||
-- for i, v in ripairs(tbl) do body end
|
||||
-- ```
|
||||
---@param tbl table
|
||||
---@return function iter
|
||||
---@return table invariant
|
||||
---@return number init
|
||||
function ripairs(tbl)
|
||||
return ripairsiter, tbl, #tbl + 1;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/tDeleteItem)
|
||||
-- Removes a value from a sequential table.
|
||||
---@param tbl table
|
||||
---@param item any
|
||||
function tDeleteItem(tbl, item)
|
||||
local index = 1;
|
||||
while tbl[index] do
|
||||
if ( item == tbl[index] ) then
|
||||
tremove(tbl, index);
|
||||
else
|
||||
index = index + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/tIndexOf)
|
||||
-- Returns the index for a value in a table.
|
||||
---@param tbl table
|
||||
---@param item any
|
||||
---@return number? index
|
||||
function tIndexOf(tbl, item)
|
||||
for i, v in ipairs(tbl) do
|
||||
if item == v then
|
||||
return i;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/tContains)
|
||||
-- Returns true if a table contains a value.
|
||||
---@param tbl table
|
||||
---@param item any
|
||||
---@return boolean
|
||||
function tContains(tbl, item)
|
||||
for k, v in pairs(tbl) do
|
||||
if item == v then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
return false;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/tCompare)
|
||||
-- This is a deep compare on the values of the table (based on depth) but not a deep comparison
|
||||
-- of the keys, as this would be an expensive check and won't be necessary in most cases.
|
||||
---@param lhsTable table
|
||||
---@param rhsTable table
|
||||
---@param depth? number
|
||||
---@return boolean
|
||||
function tCompare(lhsTable, rhsTable, depth)
|
||||
depth = depth or 1;
|
||||
for key, value in pairs(lhsTable) do
|
||||
if type(value) == "table" then
|
||||
local rhsValue = rhsTable[key];
|
||||
if type(rhsValue) ~= "table" then
|
||||
return false;
|
||||
end
|
||||
if depth > 1 then
|
||||
if not tCompare(value, rhsValue, depth - 1) then
|
||||
return false;
|
||||
end
|
||||
end
|
||||
elseif value ~= rhsTable[key] then
|
||||
return false;
|
||||
end
|
||||
end
|
||||
|
||||
-- Check for any keys that are in rhsTable and not lhsTable.
|
||||
for key, value in pairs(rhsTable) do
|
||||
if lhsTable[key] == nil then
|
||||
return false;
|
||||
end
|
||||
end
|
||||
|
||||
return true;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/tInvert)
|
||||
-- Returns an inverted table.
|
||||
---@param tbl table
|
||||
---@return table
|
||||
function tInvert(tbl)
|
||||
local inverted = {};
|
||||
for k, v in pairs(tbl) do
|
||||
inverted[v] = k;
|
||||
end
|
||||
return inverted;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/tFilter)
|
||||
---@param tbl table
|
||||
---@param pred function
|
||||
---@param isIndexTable boolean
|
||||
---@return table
|
||||
function tFilter(tbl, pred, isIndexTable)
|
||||
local out = {};
|
||||
|
||||
if (isIndexTable) then
|
||||
local currentIndex = 1;
|
||||
for i, v in ipairs(tbl) do
|
||||
if (pred(v)) then
|
||||
out[currentIndex] = v;
|
||||
currentIndex = currentIndex + 1;
|
||||
end
|
||||
end
|
||||
else
|
||||
for k, v in pairs(tbl) do
|
||||
if (pred(v)) then
|
||||
out[k] = v;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return out;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/tAppendAll)
|
||||
-- Appends the contents of a sequential table to another table.
|
||||
---@param tbl table
|
||||
---@param addedArray table
|
||||
function tAppendAll(tbl, addedArray)
|
||||
for i, element in ipairs(addedArray) do
|
||||
tinsert(tbl, element);
|
||||
end
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/tUnorderedRemove)
|
||||
---@param tbl table
|
||||
---@param index number
|
||||
function tUnorderedRemove(tbl, index)
|
||||
if index ~= #tbl then
|
||||
tbl[index] = tbl[#tbl];
|
||||
end
|
||||
|
||||
table.remove(tbl);
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CopyTable)
|
||||
-- Returns a deep copy of a table.
|
||||
---@param settings table
|
||||
---@param shallow? boolean
|
||||
---@return table
|
||||
function CopyTable(settings, shallow)
|
||||
local copy = {};
|
||||
for k, v in pairs(settings) do
|
||||
if type(v) == "table" and not shallow then
|
||||
copy[k] = CopyTable(v);
|
||||
else
|
||||
copy[k] = v;
|
||||
end
|
||||
end
|
||||
return copy;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/AccumulateIf)
|
||||
---@param tbl table
|
||||
---@param pred function
|
||||
---@return number
|
||||
function AccumulateIf(tbl, pred)
|
||||
local count = 0;
|
||||
for k, v in pairs(tbl) do
|
||||
if pred(v) then
|
||||
count = count + 1;
|
||||
end
|
||||
end
|
||||
return count;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ContainsIf)
|
||||
---@param tbl table
|
||||
---@param pred function
|
||||
---@return boolean
|
||||
function ContainsIf(tbl, pred)
|
||||
for k, v in pairs(tbl) do
|
||||
if (pred(v)) then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
|
||||
return false;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/FindInTableIf)
|
||||
---@param tbl table
|
||||
---@param pred function
|
||||
---@return string|number key
|
||||
---@return any value
|
||||
function FindInTableIf(tbl, pred)
|
||||
for k, v in pairs(tbl) do
|
||||
if (pred(v)) then
|
||||
return k, v;
|
||||
end
|
||||
end
|
||||
---@diagnostic disable-next-line: return-type-mismatch
|
||||
return nil;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SafePack)
|
||||
---@param ... any
|
||||
---@return table
|
||||
function SafePack(...)
|
||||
local tbl = { ... };
|
||||
tbl.n = select("#", ...);
|
||||
return tbl;
|
||||
end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SafeUnpack)
|
||||
---@param tbl table
|
||||
---@return ...
|
||||
function SafeUnpack(tbl)
|
||||
return unpack(tbl, 1, tbl.n);
|
||||
end
|
||||
@@ -0,0 +1,148 @@
|
||||
---@meta _
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetTextureInfo)
|
||||
---@param obj Texture
|
||||
---@return string assetName
|
||||
---@return string assetType
|
||||
---@return number ulX
|
||||
---@return number ulY
|
||||
---@return number blX
|
||||
---@return number blY
|
||||
---@return number urX
|
||||
---@return number urY
|
||||
---@return number brX
|
||||
---@return number brY
|
||||
function GetTextureInfo(obj) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SetClampedTextureRotation)
|
||||
---@param texture Texture
|
||||
---@param rotationDegrees number
|
||||
function SetClampedTextureRotation(texture, rotationDegrees) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/ClearClampedTextureRotation)
|
||||
---@param texture Texture
|
||||
function ClearClampedTextureRotation(texture) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetMicroIconForRole
|
||||
---@param role string
|
||||
---@return string icon
|
||||
function GetMicroIconForRole(role) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetTexCoordsByGrid)
|
||||
---@param xOffset number
|
||||
---@param yOffset number
|
||||
---@param textureWidth number
|
||||
---@param textureHeight number
|
||||
---@param gridWidth number
|
||||
---@param gridHeight number
|
||||
---@return number minX
|
||||
---@return number maxX
|
||||
---@return number minY
|
||||
---@return number maxY
|
||||
function GetTexCoordsByGrid(xOffset, yOffset, textureWidth, textureHeight, gridWidth, gridHeight) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetTexCoordsForRole)
|
||||
---@param role string
|
||||
---@return number minX
|
||||
---@return number maxX
|
||||
---@return number minY
|
||||
---@return number maxY
|
||||
function GetTexCoordsForRole(role) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CreateTextureMarkup)
|
||||
---@param file number|string
|
||||
---@param fileWidth number
|
||||
---@param fileHeight number
|
||||
---@param width number
|
||||
---@param height number
|
||||
---@param left number
|
||||
---@param right number
|
||||
---@param top number
|
||||
---@param bottom number
|
||||
---@param xOffset? number
|
||||
---@param yOffset? number
|
||||
---@return string
|
||||
function CreateTextureMarkup(file, fileWidth, fileHeight, width, height, left, right, top, bottom, xOffset, yOffset) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CreateAtlasMarkup)
|
||||
---@param atlasName number|string
|
||||
---@param width? number
|
||||
---@param height? number
|
||||
---@param offsetX? number
|
||||
---@param offsetY? number
|
||||
---@param rVertexColor? number
|
||||
---@param gVertexColor? number
|
||||
---@param bVertexColor? number
|
||||
---@return string
|
||||
function CreateAtlasMarkup(atlasName, width, height, offsetX, offsetY, rVertexColor, gVertexColor, bVertexColor) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CreateAtlasMarkupWithAtlasSize)
|
||||
---@param atlasName number|string
|
||||
---@param offsetX? number
|
||||
---@param offsetY? number
|
||||
---@param rVertexColor? number
|
||||
---@param gVertexColor? number
|
||||
---@param bVertexColor? number
|
||||
---@return string
|
||||
function CreateAtlasMarkupWithAtlasSize(atlasName, offsetX, offsetY, rVertexColor, gVertexColor, bVertexColor, scale) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SetupAtlasesOnRegions)
|
||||
--- Pass in a frame and a table containing parentKeys (on frame) as keys and atlas member names as the values
|
||||
---@param frame Frame
|
||||
---@param regionsToAtlases table
|
||||
---@param useAtlasSize? boolean
|
||||
function SetupAtlasesOnRegions(frame, regionsToAtlases, useAtlasSize) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetFinalNameFromTextureKit)
|
||||
---@param fmt string
|
||||
---@param textureKits string|table
|
||||
---@return string
|
||||
function GetFinalNameFromTextureKit(fmt, textureKits) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SetupTextureKitOnFrame)
|
||||
--- Pass in a TextureKit name, a frame and a formatting string.
|
||||
--- The TextureKit name will be inserted into fmt (at the first %s). The resulting atlas name will be set on frame
|
||||
--- Use "%s" for fmt if the TextureKit name is the entire atlas element name
|
||||
---@param textureKit string|table
|
||||
---@param frame Texture|StatusBar
|
||||
---@param fmt string
|
||||
---@param setVisibility boolean
|
||||
---@param useAtlasSize? boolean
|
||||
function SetupTextureKitOnFrame(textureKit, frame, fmt, setVisibility, useAtlasSize) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SetupTextureKitOnFrames)
|
||||
--- Pass in a TextureKit name and a table containing frames as keys and formatting strings as values
|
||||
--- For each frame key in frames, the TextureKit name will be inserted into fmt (at the first %s). The resulting atlas name will be set on frame
|
||||
--- Use "%s" for fmt if the TextureKit name is the entire atlas element name
|
||||
---@param textureKit string|table
|
||||
---@param frames table
|
||||
---@param setVisibilityOfRegions boolean
|
||||
---@param useAtlasSize? boolean
|
||||
function SetupTextureKitOnFrames(textureKit, frames, setVisibilityOfRegions, useAtlasSize) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SetupTextureKitOnRegions)
|
||||
--- Pass in a TextureKit name, a frame and a table containing parentKeys (on frame) as keys and formatting strings as values
|
||||
--- For each frame key in frames, the TextureKit name will be inserted into fmt (at the first %s). The resulting atlas name will be set on frame
|
||||
--- Use "%s" for fmt if the TextureKit name is the entire atlas element name
|
||||
---@param textureKit string|table
|
||||
---@param frame Frame
|
||||
---@param regions table
|
||||
---@param setVisibilityOfRegions boolean
|
||||
---@param useAtlasSize? boolean
|
||||
function SetupTextureKitOnRegions(textureKit, frame, regions, setVisibilityOfRegions, useAtlasSize) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SetupTextureKitsFromRegionInfo)
|
||||
--- Pass in a TextureKit name, a frame and a table containing parentKeys (on frame) as keys and a table as values
|
||||
--- The values table should contain formatString as a member (setVisibility and useAtlasSize can also be added if desired)
|
||||
--- For each frame key in frames, the TextureKit name will be inserted into formatString (at the first %s). The resulting atlas name will be set on frame
|
||||
--- Use "%s" for formatString if the TextureKit name is the entire atlas element name
|
||||
---@param textureKit string|table
|
||||
---@param frame Frame
|
||||
---@param regionInfoList table
|
||||
function SetupTextureKitsFromRegionInfo(textureKit, frame, regionInfoList) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/GetFinalAtlasFromTextureKitIfExists)
|
||||
--- Pass the texture and the textureKit, if the atlas exists in data then it will return the actual atlas name otherwise, return nil.
|
||||
---@param texture string
|
||||
---@param textureKit string|table
|
||||
---@return string?
|
||||
function GetFinalAtlasFromTextureKitIfExists(texture, textureKit) end
|
||||
@@ -0,0 +1,50 @@
|
||||
---@meta _
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SecondsToMinutes)
|
||||
---@param seconds number
|
||||
---@return number
|
||||
function SecondsToMinutes(seconds) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MinutesToSeconds)
|
||||
---@param minutes number
|
||||
---@return number
|
||||
function MinutesToSeconds(minutes) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/HasTimePassed)
|
||||
---@param testTime number
|
||||
---@param amountOfTime number
|
||||
---@return boolean
|
||||
function HasTimePassed(testTime, amountOfTime) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SecondsToClock)
|
||||
---@param seconds number
|
||||
---@param displayZeroHours? boolean
|
||||
---@return string
|
||||
function SecondsToClock(seconds, displayZeroHours) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SecondsToTime)
|
||||
---@param seconds number
|
||||
---@param noSeconds? boolean
|
||||
---@param notAbbreviated? boolean
|
||||
---@param maxCount? number
|
||||
---@param roundUp? boolean
|
||||
---@return string
|
||||
function SecondsToTime(seconds, noSeconds, notAbbreviated, maxCount, roundUp) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/MinutesToTime)
|
||||
---@param mins number
|
||||
---@param hideDays? boolean
|
||||
---@return string
|
||||
function MinutesToTime(mins, hideDays) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/SecondsToTimeAbbrev)
|
||||
---@param seconds number
|
||||
---@return string format
|
||||
---@return number time
|
||||
function SecondsToTimeAbbrev(seconds) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/FormatShortDate)
|
||||
---@param day number
|
||||
---@param month number
|
||||
---@param year number
|
||||
---@return string
|
||||
function FormatShortDate(day, month, year) end
|
||||
@@ -0,0 +1,84 @@
|
||||
---@meta _
|
||||
|
||||
---@class Vector2DType
|
||||
---@field x number
|
||||
---@field y number
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin)
|
||||
---@class Vector2DMixin : Vector2DType
|
||||
Vector2DMixin = {}
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CreateVector2D)
|
||||
---@param x number
|
||||
---@param y number
|
||||
---@return Vector2DMixin
|
||||
function CreateVector2D(x, y) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/AreVector2DEqual)
|
||||
---@param left Vector2DMixin
|
||||
---@param right Vector2DMixin
|
||||
---@return boolean
|
||||
function AreVector2DEqual(left, right) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:IsEqualTo)
|
||||
---@param otherVector Vector2DMixin
|
||||
---@return boolean
|
||||
function Vector2DMixin:IsEqualTo(otherVector) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:GetXY)
|
||||
---@return number x
|
||||
---@return number y
|
||||
function Vector2DMixin:GetXY() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:SetXY)
|
||||
---@param x number
|
||||
---@param y number
|
||||
function Vector2DMixin:SetXY(x, y) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:ScaleBy)
|
||||
---@param scalar number
|
||||
function Vector2DMixin:ScaleBy(scalar) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:DivideBy)
|
||||
---@param scalar number
|
||||
function Vector2DMixin:DivideBy(scalar) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:Add)
|
||||
---@param other Vector2DMixin
|
||||
function Vector2DMixin:Add(other) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:Subtract)
|
||||
---@param other Vector2DMixin
|
||||
function Vector2DMixin:Subtract(other) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:Cross)
|
||||
---@param other Vector2DMixin
|
||||
function Vector2DMixin:Cross(other) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:Dot)
|
||||
---@param other Vector2DMixin
|
||||
---@return number
|
||||
function Vector2DMixin:Dot(other) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:IsZero)
|
||||
---@return boolean
|
||||
function Vector2DMixin:IsZero() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:GetLengthSquared)
|
||||
---@return number
|
||||
function Vector2DMixin:GetLengthSquared() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:GetLength)
|
||||
---@return number
|
||||
function Vector2DMixin:GetLength() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:Normalize)
|
||||
function Vector2DMixin:Normalize() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:RotateDirection)
|
||||
---@param rotationRadians number
|
||||
function Vector2DMixin:RotateDirection(rotationRadians) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector2DMixin:Clone)
|
||||
---@return Vector2DMixin
|
||||
function Vector2DMixin:Clone() end
|
||||
@@ -0,0 +1,80 @@
|
||||
---@meta _
|
||||
|
||||
---@class Vector3DType
|
||||
---@field x number
|
||||
---@field y number
|
||||
---@field z number
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin)
|
||||
---@class Vector3DMixin : Vector3DType
|
||||
Vector3DMixin = {}
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/CreateVector3D)
|
||||
---@param x number
|
||||
---@param y number
|
||||
---@param z number
|
||||
---@return Vector3DMixin
|
||||
function CreateVector3D(x, y, z) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/AreVector3DEqual)
|
||||
---@param left Vector3DMixin
|
||||
---@param right Vector3DMixin
|
||||
---@return boolean
|
||||
function AreVector3DEqual(left, right) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:IsEqualTo)
|
||||
---@param otherVector Vector3DMixin
|
||||
---@return boolean
|
||||
function Vector3DMixin:IsEqualTo(otherVector) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:GetXYZ)
|
||||
---@return number x
|
||||
---@return number y
|
||||
---@return number z
|
||||
function Vector3DMixin:GetXYZ() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:SetXYZ)
|
||||
---@param x number
|
||||
---@param y number
|
||||
---@param z number
|
||||
function Vector3DMixin:SetXYZ(x, y, z) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:ScaleBy)
|
||||
---@param scalar number
|
||||
function Vector3DMixin:ScaleBy(scalar) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:DivideBy)
|
||||
---@param scalar number
|
||||
function Vector3DMixin:DivideBy(scalar) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:Add)
|
||||
---@param other Vector3DMixin
|
||||
function Vector3DMixin:Add(other) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:Subtract)
|
||||
---@param other Vector3DMixin
|
||||
function Vector3DMixin:Subtract(other) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:Cross)
|
||||
---@param other Vector3DMixin
|
||||
function Vector3DMixin:Cross(other) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:Dot)
|
||||
---@param other Vector3DMixin
|
||||
---@return number
|
||||
function Vector3DMixin:Dot(other) end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:GetLengthSquared)
|
||||
---@return number
|
||||
function Vector3DMixin:GetLengthSquared() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:GetLength)
|
||||
---@return number
|
||||
function Vector3DMixin:GetLength() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:Normalize)
|
||||
function Vector3DMixin:Normalize() end
|
||||
|
||||
---[FrameXML](https://www.townlong-yak.com/framexml/go/Vector3DMixin:Clone)
|
||||
---@return Vector3DMixin
|
||||
function Vector3DMixin:Clone() end
|
||||
Reference in New Issue
Block a user