hide inv added

This commit is contained in:
p.kosyh 2010-07-07 13:48:15 +00:00
parent 3187695c53
commit 17e725bf15
3 changed files with 14 additions and 1 deletions

View file

@ -24,6 +24,7 @@ install:
$(INSTALL) timer.lua $(STEADPATH)/timer.lua
$(INSTALL) kbd.lua $(STEADPATH)/kbd.lua
$(INSTALL) hotkeys.lua $(STEADPATH)/hotkeys.lua
$(INSTALL) hideinv.lua $(STEADPATH)/hideinv.lua
uninstall:
$(RM) $(STEADPATH)/stead.lua

View file

@ -21,4 +21,4 @@ install:
copy timer.lua ..\bin\stead
copy kbd.lua ..\bin\stead
copy hotkeys.lua ..\bin\stead
copy hideinv.lua ..\bin\stead

12
stead/hideinv.lua Normal file
View file

@ -0,0 +1,12 @@
dlg = stead.inherit(dlg, function(v)
v.entered = stead.hook(v.entered, function(f, ...)
local r,v = f(unpack(arg))
me():disable_all();
return r,v
end)
v.left = stead.hook(v.left, function(f, ...)
me():enable_all();
return f(unpack(arg))
end)
return v
end)