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

Screenshots works in dialogs & targetting mode too

Reseted keybinds, this should be the last time, hopefully


git-svn-id: http://svn.net-core.org/repos/t-engine4@4421 51575b47-30f0-44d4-a5cc-537603b46e54
parent c96dfc98
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,7 @@ function _M:saveRemap(file)
if not file then
restore = fs.getWritePath()
fs.setWritePath(engine.homepath)
file = "keybinds1.3.cfg"
file = "keybinds2.cfg"
end
local f = fs.open(file, "w")
......@@ -217,7 +217,7 @@ function _M:receiveKey(sym, ctrl, shift, alt, meta, unicode, isup, key, ismouse)
local ks, us
if not ismouse then ks, kks, us = self:makeKeyString(sym, ctrl, shift, alt, meta, unicode, key)
else ks = self:makeMouseString(sym, ctrl, shift, alt, meta) end
-- print("[BIND]", sym, ctrl, shift, alt, meta, unicode, " :=: ", ks, kks, us, " ?=? ", self.binds[ks], kks and self.binds[kks], us and self.binds[us])
print(self, "[BIND]", sym, ctrl, shift, alt, meta, unicode, " :=: ", ks, kks, us, " ?=? ", self.binds[ks], kks and self.binds[kks], us and self.binds[us])
if self.binds[ks] then
for virt, _ in pairs(self.binds[ks]) do if self.virtuals[virt] then
if isup and not _M.binds_def[virt].updown then return end
......
......@@ -89,8 +89,8 @@ core.sound.enable(config.settings.audio.enable)
engine.KeyBind:load("move,hotkeys,inventory,actions,interface,debug")
-- Load remaps
if fs.exists("/keybinds1.3.cfg") then
engine.KeyBind:loadRemap("/keybinds1.3.cfg")
if fs.exists("/keybinds2.cfg") then
engine.KeyBind:loadRemap("/keybinds2.cfg")
end
fs.umount(engine.homepath)
......
......@@ -207,6 +207,7 @@ function _M:targetSetupKey()
self.target:setSpot(self.target.source_actor.x, self.target.source_actor.y, "freemove")
self.tooltip_x, self.tooltip_y = self.level.map:getTileToScreen(self.target.target.x, self.target.target.y)
end,
SCREENSHOT = function() self.normal_key:triggerVirtual("SCREENSHOT") end,
}
end
......
......@@ -309,6 +309,7 @@ function _M:generate()
_LEFT = function() self:moveFocus(-1) end,
_RIGHT = function() self:moveFocus(1) end,
}
self.key:addBind("SCREENSHOT", function() if type(game) == "table" and game.key then game.key:triggerVirtual("SCREENSHOT") end end)
end
function _M:updateTitle(title)
......
......@@ -239,6 +239,7 @@ end
function _M:updateKeys(kind)
self.key:reset()
self.key:unicodeInput(true)
self.key:addBind("SCREENSHOT", function() if type(game) == "table" and game.key then game.key:triggerVirtual("SCREENSHOT") end end)
if kind == "Stats" then
self.key:addCommands{
......
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