You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.5 KiB

--========================================================--
-- Scorpio Secure Macro Text Handler --
-- --
-- Author : kurapica125@outlook.com --
-- Create Date : 2021/03/29 --
--========================================================--
--========================================================--
Scorpio "Scorpio.Secure.MacroTextHandler" "1.0.0"
--========================================================--
------------------------------------------------------
-- Action Handler
------------------------------------------------------
handler = ActionTypeHandler {
Name = "macrotext",
Type = "macro",
Target = "macrotext",
DragStyle = "Clear",
ReceiveStyle = "Clear",
ReceiveMap = "macrotext", -- avoid conflict with macro handler
ClearSnippet = [[
Manager:CallMethod("ClearCustom", self:GetName())
]],
}
------------------------------------------------------
-- Overwrite methods
------------------------------------------------------
function handler:GetActionText()
return self.CustomText
end
function handler:GetActionTexture()
return self.CustomTexture
end
function handler:SetTooltip(tip)
if self.CustomTooltip then
tip:SetText(self.CustomTooltip)
end
end