Add a scale config... such as it is
This commit is contained in:
@@ -59,6 +59,7 @@ local function init()
|
|||||||
---@field whisperNotify table<string, string>
|
---@field whisperNotify table<string, string>
|
||||||
---@field stinkies table<string, boolean>
|
---@field stinkies table<string, boolean>
|
||||||
---@field agents table<string, string>
|
---@field agents table<string, string>
|
||||||
|
---@field scale number
|
||||||
|
|
||||||
---@class HeimdallSpotterConfig
|
---@class HeimdallSpotterConfig
|
||||||
---@field enabled boolean
|
---@field enabled boolean
|
||||||
@@ -274,8 +275,6 @@ local function init()
|
|||||||
zoneOverride = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "zoneOverride" }, nil),
|
zoneOverride = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "zoneOverride" }, nil),
|
||||||
duelThrottle = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "duelThrottle" }, 5),
|
duelThrottle = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "duelThrottle" }, 5),
|
||||||
},
|
},
|
||||||
whisperNotify = shared.GetOrDefault(Heimdall_Data, { "config", "whisperNotify" }, {}),
|
|
||||||
stinkies = shared.GetOrDefault(Heimdall_Data, { "config", "stinkies" }, {}),
|
|
||||||
inviter = {
|
inviter = {
|
||||||
enabled = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "enabled" }, false),
|
enabled = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "enabled" }, false),
|
||||||
debug = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "debug" }, false),
|
debug = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "debug" }, false),
|
||||||
@@ -389,7 +388,9 @@ local function init()
|
|||||||
helpTextureFile = shared.GetOrDefault(Heimdall_Data, { "config", "minimapTagger", "helpTextureFile" },
|
helpTextureFile = shared.GetOrDefault(Heimdall_Data, { "config", "minimapTagger", "helpTextureFile" },
|
||||||
"Aura68.tga"),
|
"Aura68.tga"),
|
||||||
},
|
},
|
||||||
|
whisperNotify = shared.GetOrDefault(Heimdall_Data, { "config", "whisperNotify" }, {}),
|
||||||
|
stinkies = shared.GetOrDefault(Heimdall_Data, { "config", "stinkies" }, {}),
|
||||||
|
scale = shared.GetOrDefault(Heimdall_Data, { "config", "scale" }, 1),
|
||||||
}
|
}
|
||||||
|
|
||||||
shared.raceMap = {
|
shared.raceMap = {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
## Interface: 70300
|
## Interface: 70300
|
||||||
## Title: Heimdall
|
## Title: Heimdall
|
||||||
## Version: 3.1.2
|
## Version: 3.1.3
|
||||||
## Notes: Watches over areas and alerts when hostiles spotted
|
## Notes: Watches over areas and alerts when hostiles spotted
|
||||||
## Author: Cyka
|
## Author: Cyka
|
||||||
## SavedVariables: Heimdall_Data
|
## SavedVariables: Heimdall_Data
|
||||||
|
BIN
Heimdall.zip
(Stored with Git LFS)
BIN
Heimdall.zip
(Stored with Git LFS)
Binary file not shown.
@@ -375,6 +375,8 @@ end
|
|||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
shared.Config = {}
|
shared.Config = {}
|
||||||
function shared.Config.Init()
|
function shared.Config.Init()
|
||||||
|
configFrame.frame:SetScale(Heimdall_Data.config.scale)
|
||||||
|
|
||||||
local buttonColors = {
|
local buttonColors = {
|
||||||
enabled = { 0, 1, 0, 1 },
|
enabled = { 0, 1, 0, 1 },
|
||||||
disabled = { 1, 0, 0, 1 }
|
disabled = { 1, 0, 0, 1 }
|
||||||
@@ -514,9 +516,18 @@ function shared.Config.Init()
|
|||||||
return container
|
return container
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local scale = CreateBasicSmallEditBox("HeimdallConfigScale", configFrame.frame, "Scale", Heimdall_Data.config.scale,
|
||||||
|
function(self)
|
||||||
|
local text = self:GetText()
|
||||||
|
if string.match(text, "%d+") then
|
||||||
|
Heimdall_Data.config.scale = tonumber(text)
|
||||||
|
configFrame.frame:SetScale(Heimdall_Data.config.scale)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
configFrame:Add(scale, 2, 2)
|
||||||
local title = configFrame.frame:CreateFontString(nil, "ARTWORK", "GameFontNormal")
|
local title = configFrame.frame:CreateFontString(nil, "ARTWORK", "GameFontNormal")
|
||||||
title:SetText("Heimdall Config")
|
title:SetText("Heimdall Config")
|
||||||
configFrame:Add(title, 2, 12)
|
configFrame:Add(title, 2, 10)
|
||||||
|
|
||||||
-- Spotter
|
-- Spotter
|
||||||
do
|
do
|
||||||
|
@@ -428,7 +428,7 @@ function shared.MinimapTagger.Init()
|
|||||||
end
|
end
|
||||||
if x and y then
|
if x and y then
|
||||||
x, y = tonumber(x), tonumber(y)
|
x, y = tonumber(x), tonumber(y)
|
||||||
PlantHelp(x, y, 2)
|
PlantHelp(x, y, 1)
|
||||||
if TomTom then
|
if TomTom then
|
||||||
if Heimdall_Data.config.minimapTagger.debug then
|
if Heimdall_Data.config.minimapTagger.debug then
|
||||||
print(string.format("[%s] Adding help waypoint to TomTom", ModuleName))
|
print(string.format("[%s] Adding help waypoint to TomTom", ModuleName))
|
||||||
|
Reference in New Issue
Block a user