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

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@3739 51575b47-30f0-44d4-a5cc-537603b46e54
parent 639d93ab
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,8 @@ function _M:bindKeys()
-- Bind defaults
for type, t in pairs(_M.binds_def) do
for i, ks in ipairs(_M.binds_remap[type] or t.default) do
self.binds[ks] = type
self.binds[ks] = self.binds[ks] or {}
self.binds[ks][type] = true
end
end
end
......@@ -135,7 +136,7 @@ end
function _M:findBoundKeys(virtual)
local bs = {}
for ks, virt in pairs(self.binds) do
if virt == virtual then bs[#bs+1] = ks end
if virt[virtual] then bs[#bs+1] = ks end
end
return unpack(bs)
end
......@@ -207,14 +208,18 @@ function _M:receiveKey(sym, ctrl, shift, alt, meta, unicode, isup, ismouse)
if not ismouse then ks, us = self:makeKeyString(sym, ctrl, shift, alt, meta, unicode)
else ks = self:makeMouseString(sym, ctrl, shift, alt, meta) end
-- print("[BIND]", sym, ctrl, shift, alt, meta, unicode, " :=: ", ks, us, " ?=? ", self.binds[ks], us and self.binds[us])
if self.binds[ks] and self.virtuals[self.binds[ks]] then
if isup and not _M.binds_def[self.binds[ks]].updown then return end
self.virtuals[self.binds[ks]](sym, ctrl, shift, alt, meta, unicode, isup)
return true
elseif us and self.binds[us] and self.virtuals[self.binds[us]] then
if isup and not _M.binds_def[self.binds[us]].updown then return end
self.virtuals[self.binds[us]](sym, ctrl, shift, alt, meta, unicode, isup)
return true
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
self.virtuals[virt](sym, ctrl, shift, alt, meta, unicode, isup)
return true
end end
elseif us and self.binds[us] then
for virt, _ in pairs(self.binds[us]) do if self.virtuals[virt] then
if isup and not _M.binds_def[virt].updown then return end
self.virtuals[virt](sym, ctrl, shift, alt, meta, unicode, isup)
return true
end end
end
if isup then return end
......
......@@ -973,9 +973,6 @@ function _M:selectTile()
end}
local list = ImageList.new{width=500, height=500, tile_w=64, tile_h=64, padding=10, list=list, fct=function(item)
game:unregisterDialog(d)
--DONATORS GET REGISTER in IPN and LM_PAYPAL but not in PROFILES !!!!
if not profile.auth or not tonumber(profile.auth.donated) or tonumber(profile.auth.donated) <= 1 then
self:selectTileNoDonations()
else
......
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