initial commit
This commit is contained in:
42
Core/UI/MainUI/Operations/Sniper.lua
Normal file
42
Core/UI/MainUI/Operations/Sniper.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
-- ------------------------------------------------------------------------------ --
|
||||
-- TradeSkillMaster --
|
||||
-- https://tradeskillmaster.com --
|
||||
-- All Rights Reserved - Detailed license information included with addon. --
|
||||
-- ------------------------------------------------------------------------------ --
|
||||
|
||||
local _, TSM = ...
|
||||
local Sniper = TSM.MainUI.Operations:NewPackage("Sniper")
|
||||
local L = TSM.Include("Locale").GetTable()
|
||||
local UIElements = TSM.Include("UI.UIElements")
|
||||
local private = {
|
||||
currentOperationName = nil,
|
||||
}
|
||||
local BAD_PRICE_SOURCES = { sniperopmax = true }
|
||||
|
||||
|
||||
|
||||
-- ============================================================================
|
||||
-- Module Functions
|
||||
-- ============================================================================
|
||||
|
||||
function Sniper.OnInitialize()
|
||||
TSM.MainUI.Operations.RegisterModule("Sniper", private.GetSniperOperationSettings)
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- ============================================================================
|
||||
-- Sniper Operation Settings UI
|
||||
-- ============================================================================
|
||||
|
||||
function private.GetSniperOperationSettings(operationName)
|
||||
TSM.UI.AnalyticsRecordPathChange("main", "operations", "sniper")
|
||||
private.currentOperationName = operationName
|
||||
return UIElements.New("ScrollFrame", "settings")
|
||||
:SetPadding(8, 8, 8, 0)
|
||||
:SetBackgroundColor("PRIMARY_BG")
|
||||
:AddChild(TSM.MainUI.Operations.CreateExpandableSection("Sniper", "settings", L["General Options"], L["Set what items are shown during a Sniper scan."])
|
||||
:AddChild(TSM.MainUI.Operations.CreateLinkedPriceInput("belowPrice", L["Maximum price"], 124, BAD_PRICE_SOURCES))
|
||||
)
|
||||
:AddChild(TSM.MainUI.Operations.GetOperationManagementElements("Sniper", private.currentOperationName))
|
||||
end
|
||||
Reference in New Issue
Block a user