Make little more better
This commit is contained in:
@@ -7,6 +7,17 @@ local configFrame = CreateFrame("Frame", "HeimdallConfig", UIParent)
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
shared.Config = {}
|
||||
function shared.Config.Init()
|
||||
---@class UIElement
|
||||
shared.UIElement = {
|
||||
---@return UIElement
|
||||
new = function()
|
||||
local self = setmetatable({}, {
|
||||
__index = shared.UIElement
|
||||
})
|
||||
return self
|
||||
end
|
||||
}
|
||||
|
||||
configFrame:SetSize(256 + 256, 512)
|
||||
configFrame:SetPoint("CENTER")
|
||||
configFrame:SetFrameStrata("HIGH")
|
||||
@@ -19,7 +30,12 @@ function shared.Config.Init()
|
||||
tile = true,
|
||||
tileSize = 4,
|
||||
edgeSize = 4,
|
||||
insets = { left = 4, right = 4, top = 4, bottom = 4 }
|
||||
insets = {
|
||||
left = 4,
|
||||
right = 4,
|
||||
top = 4,
|
||||
bottom = 4
|
||||
}
|
||||
})
|
||||
configFrame:SetBackdropColor(0, 0, 0, 0.8)
|
||||
configFrame:SetBackdropBorderColor(0.5, 0.5, 0.5, 1)
|
||||
@@ -50,7 +66,12 @@ function shared.Config.Init()
|
||||
tile = true,
|
||||
tileSize = 4,
|
||||
edgeSize = 4,
|
||||
insets = { left = 4, right = 4, top = 4, bottom = 4 }
|
||||
insets = {
|
||||
left = 4,
|
||||
right = 4,
|
||||
top = 4,
|
||||
bottom = 4
|
||||
}
|
||||
})
|
||||
spotterConfigFrame:SetBackdropColor(0, 0, 0, 0.8)
|
||||
spotterConfigFrame:SetBackdropBorderColor(0.5, 0.5, 0.5, 1)
|
||||
@@ -118,13 +139,28 @@ function shared.Config.Init()
|
||||
local spotterThrottleBox = CreateFrame("EditBox", "HeimdallSpotterThrottle", configFrame)
|
||||
spotterThrottleBox.text = spotterThrottleBox:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
spotterThrottleBox.text:SetText("Throttle Time")
|
||||
spotterThrottleBox.text:SetPoint("TOPLEFT", spotterThrottleBox, "TOPLEFT", 0, 8)
|
||||
spotterThrottleBox.text:SetPoint("TOPLEFT", spotterThrottleBox, "TOPLEFT", 0, 8 + 4)
|
||||
spotterThrottleBox:SetNumeric(true)
|
||||
spotterThrottleBox:SetSize(128, 24)
|
||||
spotterThrottleBox:SetPoint("LEFT", spotterAllianceButton, "LEFT", 0, -24-8)
|
||||
spotterThrottleBox:SetSize(128 - 8, 24)
|
||||
spotterThrottleBox:SetPoint("LEFT", spotterAllianceButton, "LEFT", 0, -24 - 8 - 4)
|
||||
spotterThrottleBox:SetAutoFocus(false)
|
||||
spotterThrottleBox:SetFontObject("GameFontNormal")
|
||||
spotterThrottleBox:SetText(Heimdall_Data.config.spotter.throttleTime)
|
||||
spotterThrottleBox:SetBackdrop({
|
||||
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
|
||||
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
|
||||
tile = true,
|
||||
tileSize = 2,
|
||||
edgeSize = 2,
|
||||
insets = {
|
||||
left = 2,
|
||||
right = 2,
|
||||
top = 2,
|
||||
bottom = 2
|
||||
}
|
||||
})
|
||||
spotterThrottleBox:SetBackdropColor(0.8, 0.8, 0.8, 1)
|
||||
spotterThrottleBox:SetBackdropBorderColor(0.5, 0.5, 0.5, 1)
|
||||
spotterThrottleBox:SetScript("OnEnterPressed", function()
|
||||
local throttleTime = tonumber(spotterThrottleBox:GetText())
|
||||
if throttleTime then
|
||||
|
Reference in New Issue
Block a user