-
Notifications
You must be signed in to change notification settings - Fork 1
/
paperdoll.lua
40 lines (33 loc) · 1.13 KB
/
paperdoll.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- paperdoll by Catweazle Waldschrath
-- depends on libsota.0.4.6
function ShroudOnStart()
ui.onInit(function()
paperdoll = {}
function paperdoll.refresh()
local c = string.style(player.stat(317).value, { color = "#ef2929"})
local l = string.style(player.stat(318).value, { color = "#ad7fa8"})
local t = string.style(player.stat(319).value, { color = "#729fcf"})
local f = string.style("Courage: %s Love: %s Truth: %s", { size=14 })
setLabelCaption(paperdoll.label, string.format(f, c, l, t))
end
paperdoll.label = createLabelWithShadow()
paperdoll.timer = setInterval(10, paperdoll.refresh)
paperdoll.refresh()
end)
ui.onClientWindow(function(what, window)
if what == "moved" then
moveLabelTo(paperdoll.label, window.left+3, window.top + window.height)
elseif window.open then
moveLabelTo(paperdoll.label, window.left+3, window.top + window.height)
showLabel(paperdoll.label)
resumeTimer(paperdoll.timer)
else
hideLabel(paperdoll.label)
pauseTimer(paperdoll.timer)
end
end)
end
-- not needed
function ShroudOnConsoleInput() end
function ShroudOnGUI() end
function ShroudOnUpdate() end