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

ops

git-svn-id: http://svn.net-core.org/repos/t-engine4@1603 51575b47-30f0-44d4-a5cc-537603b46e54
parent 4799939e
No related branches found
No related tags found
No related merge requests found
......@@ -455,15 +455,6 @@ end
tstring = {}
tstring.is_tstring = true
local tsmeta = {__index=tstring}
setmetatable(tstring, {
__call = function(self, t)
setmetatable(t, tsmeta)
return t
end,
__tostring = tstring.toString,
})
function tstring:add(...)
local v = {...}
......@@ -695,6 +686,15 @@ function tstring:drawOnSurface(s, max_width, max_lines, font, x, y, r, g, b)
end
end
-- Make tstring into an object
local tsmeta = {__index=tstring, __tostring = tstring.toString}
setmetatable(tstring, {
__call = function(self, t)
setmetatable(t, tsmeta)
return t
end,
})
dir_to_coord = {
[1] = {-1, 1},
......
......@@ -412,7 +412,7 @@ function _M:getDesc(name_param)
local c, _ = self:getDisplayColor()
local desc = tstring{}
if not self:isIdentified() then
desc:add({"color", unpack(c)}, self:getName(name_param), {"color", "WHITE"})
desc:add({"color", unpack(c)}, self:getName(name_param), {"color", "WHITE"}, true)
else
desc:add({"color", unpack(c)}, self:getName(name_param), {"color", "WHITE"}, true)
desc:merge(self.desc)
......
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