Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2009, 12:43:12 PM (14 years ago)
Author:
rgrieder
Message:

Added LuaFunctor that can execute arbitrary lua code.
Also added LuaState::createLuaFunctor(std::string) and implemented that for the keybindings menu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/data/gui/scripts/KeyBindMenu.lua

    r6268 r6281  
    8686   
    8787    openInfoPopup("Press any button/key or move a mouse/joystick axis.", KeyBindMenu.keybind)
    88 
    8988end
    9089
    9190function P.keybind()
     91    local funct = luaState:createLuaFunctor("InfoPopup:close()")
     92    orxonox.KeyBinderManager:getInstance():registerKeybindCallback(funct)
    9293    orxonox.KeyBinderManager:getInstance():keybind(commandList[commandNr])
    9394end
Note: See TracChangeset for help on using the changeset viewer.