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

Tooltip correctly updates

git-svn-id: http://svn.net-core.org/repos/t-engine4@972 51575b47-30f0-44d4-a5cc-537603b46e54
parent f59bc9ab
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ function _M:init(fontname, fontsize, color, bgcolor)
self.max = max or 400
self.changed = true
self.old_tmx, self.old_tmy = -1,-1
self.old_turn = -1
end
--- Set the tooltip text
......@@ -109,8 +110,9 @@ function _M:displayAtMap(tmx, tmy, mx, my)
mx, my = game.level.map:getTileToScreen(tmx, tmy)
end
if self.old_tmx ~= tmx or self.old_tmy ~= tmy then
if self.old_tmx ~= tmx or self.old_tmy ~= tmy or (game.paused and self.old_turn ~= game.turn) then
self.old_tmx, self.old_tmy = tmx, tmy
self.old_turn = game.turn
local tt = {}
local seen = game.level.map.seens(tmx, tmy)
local remember = game.level.map.remembers(tmx, tmy)
......
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