-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
210 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
---@meta | ||
---@class tdInspectPortraitTemplate : Frame | ||
---@field PortraitRing Texture | ||
---@field Portrait Texture | ||
---@field PortraitRingQuality Texture | ||
---@field LevelBorder Texture | ||
---@field Level FontString | ||
---@field PortraitRingCover Texture | ||
local tdInspectPortraitTemplate = {} | ||
|
||
---@class tdInspectGearTalentFrame : Button | ||
---@field Icon Texture | ||
---@field CircleMask MaskTexture | ||
---@field Text FontString | ||
---@field Point FontString | ||
local tdInspectGearTalentFrame = {} | ||
|
||
---@class __tdInspectGearFrameTemplate_Portrait : tdInspectPortraitTemplate , Frame | ||
|
||
---@class __tdInspectGearFrameTemplate_Talent1 : tdInspectGearTalentFrame , Button | ||
|
||
---@class __tdInspectGearFrameTemplate_Talent2 : tdInspectGearTalentFrame , Button | ||
|
||
---@class tdInspectGearFrameTemplate : BackdropTemplate , Frame | ||
---@field Name FontString | ||
---@field ItemLevel FontString | ||
---@field TopLeft Texture | ||
---@field TopRight Texture | ||
---@field BottomLeft Texture | ||
---@field BottomRight Texture | ||
---@field Portrait __tdInspectGearFrameTemplate_Portrait | ||
---@field Talent1 __tdInspectGearFrameTemplate_Talent1 | ||
---@field Talent2 __tdInspectGearFrameTemplate_Talent2 | ||
local tdInspectGearFrameTemplate = {} | ||
|
||
---@class tdInspectSocketItemTemplate : Button | ||
---@field Icon Texture | ||
---@field Border Texture | ||
---@field CircleMask MaskTexture | ||
local tdInspectSocketItemTemplate = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
-- Pool.lua | ||
-- @Author : Dencer ([email protected]) | ||
-- @Link : https://dengsir.github.io | ||
-- @Date : 9/2/2024, 1:13:38 PM | ||
-- | ||
---@class ns | ||
local ns = select(2, ...) | ||
|
||
---@class Pool | ||
---@field pool table<any, boolean> | ||
---@field OnFree? function | ||
---@field Create? function | ||
---@field New? function | ||
---@field SetParent? function | ||
---@field Hide? function | ||
local Pool = {} | ||
ns.Pool = Pool | ||
|
||
function Pool:Alloc(parent) | ||
local obj = next(self.pool) | ||
if not obj then | ||
if self.Create then | ||
obj = self:Create(parent) | ||
else | ||
obj = self:New(parent) | ||
end | ||
else | ||
self.pool[obj] = nil | ||
|
||
if obj.SetParent then | ||
obj:SetParent(parent) | ||
end | ||
if obj.Show then | ||
obj:Show() | ||
end | ||
end | ||
return obj | ||
end | ||
|
||
function Pool:Free() | ||
print(self, debugstack()) | ||
self.pool[self] = true | ||
|
||
if self.Hide then | ||
self:Hide() | ||
end | ||
if self.SetParent then | ||
self:SetParent(nil) | ||
end | ||
if self.OnFree then | ||
self:OnFree() | ||
end | ||
end | ||
|
||
function Pool:Mixin(class) | ||
class.pool = {} | ||
class.Alloc = Pool.Alloc | ||
class.Free = Pool.Free | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,10 @@ | |
-- @Author : Dencer ([email protected]) | ||
-- @Link : https://dengsir.github.io | ||
-- @Date : 5/22/2020, 9:31:04 AM | ||
|
||
---@type ns | ||
---@class ns | ||
local ns = select(2, ...) | ||
|
||
---@type GameTooltip | ||
---@class TipScaner : GameTooltip | ||
local TipScaner = CreateFrame('GameTooltip') | ||
ns.TipScaner = TipScaner | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.