small fix for boolean values

develop
Warmist 2012-09-01 01:27:01 +03:00
parent af155db3be
commit c9c587af9a
1 changed files with 2 additions and 0 deletions

@ -78,6 +78,8 @@ local item_screen={
if trg_type=='number' or trg_type=='string' then --ugly TODO: add metatable get selected if trg_type=='number' or trg_type=='string' then --ugly TODO: add metatable get selected
self.mode=MODE_EDIT self.mode=MODE_EDIT
self.input=tostring(trg.target[trg.keys[trg.selected]]) self.input=tostring(trg.target[trg.keys[trg.selected]])
elseif trg_type=='boolean' then
trg.target[trg.keys[trg.selected]]= not trg.target[trg.keys[trg.selected]]
elseif trg_type=='userdata' then elseif trg_type=='userdata' then
self:pushTarget(trg.target[trg.keys[trg.selected]]) self:pushTarget(trg.target[trg.keys[trg.selected]])
--local screen = mkinstance(gui.FramedScreen,item_screen):init(trg.target[trg.keys[trg.selected]]) -- does not work --local screen = mkinstance(gui.FramedScreen,item_screen):init(trg.target[trg.keys[trg.selected]]) -- does not work