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

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@64 51575b47-30f0-44d4-a5cc-537603b46e54
parent dc29acb6
No related branches found
No related tags found
No related merge requests found
......@@ -45,12 +45,18 @@ function _M:incStat(v)
self.actor.unused_stats = self.actor.unused_stats - v
end
function _M:drawDialog(s, w, h)
function _M:drawDialog(s)
-- Description part
self:drawHBorder(s, self.w / 2, 2, self.h - 4)
local lines = self.actor.stats_def[self.statsel].description:splitLines(self.w / 2 - 10, self.font)
self:drawHBorder(s, self.iw / 2, 2, self.ih - 4)
local statshelp = ([[Keyboard: #00FF00#up key/down key#FFFFFF# to select a stat; #00FF00#right key#FFFFFF# to increase stat; #00FF00#left key#FFFFFF# to decrease a stat.
Mouse: #00FF00#Left click#FFFFFF# to increase a stat; #00FF00#right click#FFFFFF# to decrease a stat.
]]):splitLines(self.iw / 2 - 10, self.font)
local lines = self.actor.stats_def[self.statsel].description:splitLines(self.iw / 2 - 10, self.font)
for i = 1, #statshelp do
s:drawColorString(self.font, statshelp[i], self.iw / 2 + 5, 2 + (i-1) * self.font:lineSkip())
end
for i = 1, #lines do
s:drawColorString(self.font, lines[i], self.w / 2 + 5, 2 + i * self.font:lineSkip())
s:drawColorString(self.font, lines[i], self.iw / 2 + 5, 2 + (i + #statshelp + 1) * self.font:lineSkip())
end
-- Stats
......
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