Compare commits
No commits in common. "662814e30219601fed30e635577999cb1084bd86" and "20bfb3e6275454e2128992411297387bfd7d4e3a" have entirely different histories.
662814e302
...
20bfb3e627
2 changed files with 52 additions and 51 deletions
|
@ -1,54 +1,4 @@
|
||||||
-- local _, u = ...
|
local _, u = ...
|
||||||
|
|
||||||
-- Hex formatted as "AARRGGBB"
|
|
||||||
local COLOR = {
|
|
||||||
blue = "FF" .. "0000FF",
|
|
||||||
green = "FF" .. "00FF00",
|
|
||||||
red = "FF" .. "FF0000",
|
|
||||||
legendary = "FF" .. "A335EE",
|
|
||||||
heirloom = "FF" .. "E6CC80",
|
|
||||||
warning = "FF" .. "EED202",
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Wrap the text in a color code
|
|
||||||
local function colorWrap(text, colorCode)
|
|
||||||
return "|c" .. colorCode .. text .. "|r"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Special case of the color function
|
|
||||||
local function prefix()
|
|
||||||
return colorWrap("ImbusBinds> ", COLOR.legendary)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Special print
|
|
||||||
local function bprint(msg)
|
|
||||||
print(prefix() .. msg)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Prints some separators
|
|
||||||
function u.guards()
|
|
||||||
local accum = ""
|
|
||||||
for _ = 1, 30 do
|
|
||||||
accum = accum .. "="
|
|
||||||
end
|
|
||||||
print(colorWrap(accum, COLOR.legendary))
|
|
||||||
end
|
|
||||||
|
|
||||||
function u.info(msg)
|
|
||||||
bprint(colorWrap(msg, COLOR.heirloom))
|
|
||||||
end
|
|
||||||
|
|
||||||
function u.warn(msg)
|
|
||||||
bprint(colorWrap(msg, COLOR.warning))
|
|
||||||
end
|
|
||||||
|
|
||||||
function u.error(msg)
|
|
||||||
bprint(colorWrap(msg, COLOR.red))
|
|
||||||
end
|
|
||||||
|
|
||||||
function u.success(msg)
|
|
||||||
bprint(colorWrap(msg, COLOR.green))
|
|
||||||
end
|
|
||||||
|
|
||||||
-- https://wowpedia.fandom.com/wiki/BindingID
|
-- https://wowpedia.fandom.com/wiki/BindingID
|
||||||
local myBinds = {
|
local myBinds = {
|
||||||
|
|
51
Util.lua
Normal file
51
Util.lua
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
local _, u = ...
|
||||||
|
|
||||||
|
-- Hex formatted as "AARRGGBB"
|
||||||
|
local COLOR = {
|
||||||
|
blue = "FF" .. "0000FF",
|
||||||
|
green = "FF" .. "00FF00",
|
||||||
|
red = "FF" .. "FF0000",
|
||||||
|
legendary = "FF" .. "A335EE",
|
||||||
|
heirloom = "FF" .. "E6CC80",
|
||||||
|
warning = "FF" .. "EED202",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Wrap the text in a color code
|
||||||
|
local function colorWrap(text, colorCode)
|
||||||
|
return "|c" .. colorCode .. text .. "|r"
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Special case of the color function
|
||||||
|
local function prefix()
|
||||||
|
return colorWrap("ImbusBinds> ", COLOR.legendary)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Special print
|
||||||
|
local function bprint(msg)
|
||||||
|
print(prefix() .. msg)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Prints some separators
|
||||||
|
function u.guards()
|
||||||
|
local accum = ""
|
||||||
|
for _ = 1, 30 do
|
||||||
|
accum = accum .. "="
|
||||||
|
end
|
||||||
|
print(colorWrap(accum, COLOR.legendary))
|
||||||
|
end
|
||||||
|
|
||||||
|
function u.info(msg)
|
||||||
|
bprint(colorWrap(msg, COLOR.heirloom))
|
||||||
|
end
|
||||||
|
|
||||||
|
function u.warn(msg)
|
||||||
|
bprint(colorWrap(msg, COLOR.warning))
|
||||||
|
end
|
||||||
|
|
||||||
|
function u.error(msg)
|
||||||
|
bprint(colorWrap(msg, COLOR.red))
|
||||||
|
end
|
||||||
|
|
||||||
|
function u.success(msg)
|
||||||
|
bprint(colorWrap(msg, COLOR.green))
|
||||||
|
end
|
Loading…
Add table
Reference in a new issue