Skip to content
Snippets Groups Projects
Commit 0f8334a8 authored by dg's avatar dg
Browse files

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@2458 51575b47-30f0-44d4-a5cc-537603b46e54
parent 5d3a92ca
No related branches found
No related tags found
No related merge requests found
......@@ -278,11 +278,29 @@ function _M:display()
h = h + self.font_h
end
h = h + self.font_h
for tid, act in pairs(player.sustain_talents) do
if act then
local t = player:getTalentFromId(tid)
local displayName = t.name
if t.getDisplayName then displayName = t.getDisplayName(player, t, player:isTalentActive(tid)) end
local desc = "#GOLD##{bold}#"..displayName.."#{normal}##WHITE#\n"..tostring(player:getTalentFullDescription(t))
self:mouseTooltip(desc, self:makeTexture(("#LIGHT_GREEN#%s"):format(displayName), x, h, 255, 255, 255)) h = h + self.font_h
end
end
for eff_id, p in pairs(player.tmp) do
local e = player.tempeffect_def[eff_id]
local dur = p.dur + 1
local desc = e.long_desc(player, p)
if e.status == "detrimental" then
self:mouseTooltip(desc, self:makeTexture(("#LIGHT_RED#%s(%d)"):format(e.desc,dur), x, h, 255, 255, 255)) h = h + self.font_h
else
self:mouseTooltip(desc, self:makeTexture(("#LIGHT_GREEN#%s(%d)"):format(e.desc,dur), x, h, 255, 255, 255)) h = h + self.font_h
end
end
if game.level and game.level.arena then
h = h + self.font_h
local arena = game.level.arena
self:makeTexture(("-Arena mode-"), x, h, 255, 255, 255) h = h + self.font_h
if arena.score > world.arena.scores[1].score then
self:makeTexture(("Score(TOP): %d"):format(arena.score), x, h, 255, 255, 100) h = h + self.font_h
else
......@@ -321,27 +339,6 @@ function _M:display()
h = h + self.font_h
end
h = h + self.font_h
for tid, act in pairs(player.sustain_talents) do
if act then
local t = player:getTalentFromId(tid)
local displayName = t.name
if t.getDisplayName then displayName = t.getDisplayName(player, t, player:isTalentActive(tid)) end
local desc = "#GOLD##{bold}#"..displayName.."#{normal}##WHITE#\n"..tostring(player:getTalentFullDescription(t))
self:mouseTooltip(desc, self:makeTexture(("#LIGHT_GREEN#%s"):format(displayName), x, h, 255, 255, 255)) h = h + self.font_h
end
end
for eff_id, p in pairs(player.tmp) do
local e = player.tempeffect_def[eff_id]
local dur = p.dur + 1
local desc = e.long_desc(player, p)
if e.status == "detrimental" then
self:mouseTooltip(desc, self:makeTexture(("#LIGHT_RED#%s(%d)"):format(e.desc,dur), x, h, 255, 255, 255)) h = h + self.font_h
else
self:mouseTooltip(desc, self:makeTexture(("#LIGHT_GREEN#%s(%d)"):format(e.desc,dur), x, h, 255, 255, 255)) h = h + self.font_h
end
end
end
function _M:toScreen()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment