Skip to content

Commit

Permalink
adjusting hide code to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgdevx committed Jan 15, 2025
1 parent d7a1526 commit d14b3c4
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@
"table": "disable",
"utf8": "disable"
},
"Lua.workspace.library": ["~\\.vscode\\extensions\\ketho.wow-api-0.18.1\\Annotations"]
"Lua.workspace.library": ["~\\.vscode\\extensions\\ketho.wow-api-0.18.2\\Annotations"]
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Healer In Range

## [v1.1.5](https://github.com/rbgdevx/healer-in-range/releases/tag/v1.1.5) (2024-01-15)

- Fixing hiding text after un-checking test mode, and unifying this approach everywhere it needs to be hidden
- Minor Cleanup

## [v1.1.4](https://github.com/rbgdevx/healer-in-range/releases/tag/v1.1.4) (2024-12-20)

- Fixing show outside logic
Expand Down
4 changes: 2 additions & 2 deletions HealerInRange.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ do
Interface.textFrame:Show()
Interface.textFrame:SetAlpha(1)
else
Interface.textFrame:Hide()
Interface.textFrame:SetAlpha(0)
end
end
else
Expand Down Expand Up @@ -108,7 +108,7 @@ do
Interface.textFrame:Show()
Interface.textFrame:SetAlpha(1)
else
Interface.textFrame:Hide()
Interface.textFrame:SetAlpha(0)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion HealerInRange.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 110007
## Title: HealerInRange
## Version: 1.1.4
## Version: 1.1.5
## Author: RBGDEV
## Notes: Shows text if you're in or out of range of a healer
## OptionalDeps: AceConfig-3.0, AceGUI-3.0, AceGUI-3.0-SharedMediaWidgets, CallbackHandler-1.0, LibSharedMedia-3.0, LibStub
Expand Down
25 changes: 1 addition & 24 deletions helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local getmetatable = getmetatable
local print = print
local IsInInstance = IsInInstance

local wipe = table.wipe
-- local wipe = table.wipe
local sformat = string.format

local SharedMedia = LibStub("LibSharedMedia-3.0")
Expand Down Expand Up @@ -190,26 +190,3 @@ NS.CleanupDB = function(src, dst)
end
return dst
end

-- Pool for reusing tables. (Garbage collector isn't ran in combat unless max garbage is reached, which causes fps drops)
do
local pool = {}

NS.NewTable = function()
local t = next(pool) or {}
pool[t] = nil -- remove from pool
return t
end

NS.RemoveTable = function(tbl)
if tbl then
pool[wipe(tbl)] = true -- add to pool, wipe returns pointer to tbl here
end
end

NS.ReleaseTables = function()
if next(pool) then
pool = {}
end
end
end
4 changes: 2 additions & 2 deletions interface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ function Interface:ShowText(value)
end
end
else
Interface.textFrame:Hide()
Interface.textFrame:SetAlpha(0)
end
else
if NS.db.global.test then
Interface.textFrame:Show()
Interface.textFrame:SetAlpha(1)
else
Interface.textFrame:Hide()
Interface.textFrame:SetAlpha(0)
end
end
end
4 changes: 2 additions & 2 deletions options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ NS.AceConfig = {
NS.Interface.textFrame:Show()
NS.Interface.textFrame:SetAlpha(1)
else
NS.Interface.textFrame:Hide()
NS.Interface.textFrame:SetAlpha(0)
end
end
end,
Expand Down Expand Up @@ -198,7 +198,7 @@ function Options:Setup()
AceConfig:RegisterOptionsTable(AddonName, NS.AceConfig)
AceConfigDialog:AddToBlizOptions(AddonName, AddonName)

SLASH_HIR1 = AddonName
SLASH_HIR1 = "/healerinrange"
SLASH_HIR2 = "/hir"

function SlashCmdList.HIR(message)
Expand Down

0 comments on commit d14b3c4

Please sign in to comment.