Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2009, 11:20:19 PM (14 years ago)
Author:
rgrieder
Message:

Added lua convenience function for console commmands: orxonox.execute(cmd)
Also replaced the config commands with the actual orxonox.config function.

File:
1 edited

Legend:

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

    r6363 r6403  
    4747        scrollposition = mousenormalscrollbarwindow:getScrollPosition()
    4848        mousenormalsensitivity = (math.pow(64,scrollposition)+6)/14
    49         orxonox.CommandExecutor:execute("config KeyBinder mouseSensitivity_ " .. mousenormalsensitivity)
     49        orxonox.config("KeyBinder", "mouseSensitivity_", mousenormalsensitivity)
    5050    end
    5151end
     
    5858    scrollposition = mousenormalscrollbarwindow:getScrollPosition()
    5959    mousenormalsensitivity = (math.pow(64,scrollposition)+6)/14
    60     orxonox.CommandExecutor:execute("config KeyBinder mouseSensitivity_ " .. mousenormalsensitivity)
     60    orxonox.config("KeyBinder", "mouseSensitivity_", mousenormalsensitivity)
    6161    mousenormalscrollbar_active = false
    6262end
     
    6666        scrollposition = mousederivescrollbarwindow:getScrollPosition()
    6767        mousederivesensitivity = (math.pow(64,scrollposition)+6)/14
    68         orxonox.CommandExecutor:execute("config KeyBinder mouseSensitivityDerived_ " .. mousederivesensitivity)
     68        orxonox.config("KeyBinder", "mouseSensitivityDerived_", mousederivesensitivity)
    6969    end
    7070end
     
    7777    scrollposition = mousederivescrollbarwindow:getScrollPosition()
    7878    mousederivesensitivity = (math.pow(64,scrollposition)+6)/14
    79     orxonox.CommandExecutor:execute("config KeyBinder mouseSensitivityDerived_ " .. mousederivesensitivity)
     79    orxonox.config("KeyBinder", "mouseSensitivityDerived_", mousederivesensitivity)
    8080    mousederivescrollbar_active = false
    8181end
     
    8686        derivewindow:setSelected(false)
    8787        block = false
    88         orxonox.CommandExecutor:execute("config KeyBinder bDeriveMouseInput_ false")
     88        orxonox.config("KeyBinder", "bDeriveMouseInput_", 0)
    8989    end
    9090end
     
    9595        normalwindow:setSelected(false)
    9696        block = false
    97         orxonox.CommandExecutor:execute("config KeyBinder bDeriveMouseInput_ true")
     97        orxonox.config("KeyBinder", "bDeriveMouseInput_", 1)
    9898    end
    9999end
Note: See TracChangeset for help on using the changeset viewer.