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

Party icon tooltip now indicates life

git-svn-id: http://svn.net-core.org/repos/t-engine4@2652 51575b47-30f0-44d4-a5cc-537603b46e54
parent 78d1e5fc
No related branches found
No related tags found
No related merge requests found
......@@ -120,10 +120,10 @@ function _M:mouseHandleDefault(key, allow_move, button, mx, my, xrel, yrel, even
self:mouseScrollMap(game.level.map, xrel, yrel)
moving_around = true
-- Zoom map
elseif config.settings.cheat and button == "wheelup" then
game.level.map:setZoom(0.1, tmx, tmy)
elseif config.settings.cheat and button == "wheeldown" then
game.level.map:setZoom(-0.1, tmx, tmy)
-- elseif config.settings.cheat and button == "wheelup" then
-- game.level.map:setZoom(0.1, tmx, tmy)
-- elseif config.settings.cheat and button == "wheeldown" then
-- game.level.map:setZoom(-0.1, tmx, tmy)
-- Pass any other buttons to the keybinder
elseif button ~= "none" and not xrel and not yrel and event == "button" then
key:receiveKey(button, core.key.modState("ctrl") and true or false, core.key.modState("shift") and true or false, core.key.modState("alt") and true or false, core.key.modState("meta") and true or false, nil, false, true)
......
......@@ -211,26 +211,26 @@ end
--- Scan the run direction and sides with the given function
function _M:runScan(fct)
fct(self.x, self.y)
fct(self.x, self.y, "self")
if not self.running.path then
-- Ahead
local dx, dy = dir_to_coord[self.running.dir][1], dir_to_coord[self.running.dir][2]
local x, y = self.x + dx, self.y + dy
fct(x, y)
fct(x, y, "ahead")
-- Ahead left
local dx, dy = dir_to_coord[sides[self.running.dir].left][1], dir_to_coord[sides[self.running.dir].left][2]
local x, y = self.x + dx, self.y + dy
fct(x, y)
fct(x, y, "ahead left")
-- Ahead right
local dx, dy = dir_to_coord[sides[self.running.dir].right][1], dir_to_coord[sides[self.running.dir].right][2]
local x, y = self.x + dx, self.y + dy
fct(x, y)
fct(x, y, "ahead right")
elseif self.running.path[self.running.cnt] then
-- Ahead
local x, y = self.running.path[self.running.cnt].x, self.running.path[self.running.cnt].y
fct(x, y)
fct(x, y, "ahead")
end
end
......
......@@ -108,7 +108,7 @@ function _M:makePortrait(a, current, x, y)
local hl = 32 * math.max(0, a.life) / a.max_life
s:erase(colors.RED.r * 0.7, colors.RED.g * 0.7, colors.RED.b * 0.7, 255, 6, 32+6-hl, 32, hl)
self:mouseTooltip("#GOLD##{bold}#"..a.name.."\n#WHITE##{normal}#Level: "..a.level.."\n"..def.title, 40, 40, x, y, function()
self:mouseTooltip("#GOLD##{bold}#"..a.name.."\n#WHITE##{normal}#Life: "..math.floor(100 * a.life / a.max_life).."%\nLevel: "..a.level.."\n"..def.title, 40, 40, x, y, function()
if def.control == "full" then
game.party:select(a)
end
......
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