mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-12 14:01:15 -04:00
Move controls settings to menu context
This commit is contained in:
parent
5b97a93169
commit
c6a27d06b0
@ -2,7 +2,7 @@ paths=(
|
|||||||
openmw_aux/*lua
|
openmw_aux/*lua
|
||||||
scripts/omw/activationhandlers.lua
|
scripts/omw/activationhandlers.lua
|
||||||
scripts/omw/ai.lua
|
scripts/omw/ai.lua
|
||||||
scripts/omw/playercontrols.lua
|
scripts/omw/input/playercontrols.lua
|
||||||
scripts/omw/camera/camera.lua
|
scripts/omw/camera/camera.lua
|
||||||
scripts/omw/mwui/init.lua
|
scripts/omw/mwui/init.lua
|
||||||
scripts/omw/settings/player.lua
|
scripts/omw/settings/player.lua
|
||||||
|
@ -77,7 +77,6 @@ set(BUILTIN_DATA_FILES
|
|||||||
scripts/omw/console/player.lua
|
scripts/omw/console/player.lua
|
||||||
scripts/omw/console/menu.lua
|
scripts/omw/console/menu.lua
|
||||||
scripts/omw/mechanics/playercontroller.lua
|
scripts/omw/mechanics/playercontroller.lua
|
||||||
scripts/omw/playercontrols.lua
|
|
||||||
scripts/omw/settings/menu.lua
|
scripts/omw/settings/menu.lua
|
||||||
scripts/omw/settings/player.lua
|
scripts/omw/settings/player.lua
|
||||||
scripts/omw/settings/global.lua
|
scripts/omw/settings/global.lua
|
||||||
@ -93,6 +92,8 @@ set(BUILTIN_DATA_FILES
|
|||||||
scripts/omw/ui.lua
|
scripts/omw/ui.lua
|
||||||
scripts/omw/usehandlers.lua
|
scripts/omw/usehandlers.lua
|
||||||
scripts/omw/worldeventhandlers.lua
|
scripts/omw/worldeventhandlers.lua
|
||||||
|
scripts/omw/input/settings.lua
|
||||||
|
scripts/omw/input/playercontrols.lua
|
||||||
scripts/omw/input/actionbindings.lua
|
scripts/omw/input/actionbindings.lua
|
||||||
scripts/omw/input/smoothmovement.lua
|
scripts/omw/input/smoothmovement.lua
|
||||||
|
|
||||||
|
@ -12,9 +12,10 @@ GLOBAL: scripts/omw/cellhandlers.lua
|
|||||||
GLOBAL: scripts/omw/usehandlers.lua
|
GLOBAL: scripts/omw/usehandlers.lua
|
||||||
GLOBAL: scripts/omw/worldeventhandlers.lua
|
GLOBAL: scripts/omw/worldeventhandlers.lua
|
||||||
PLAYER: scripts/omw/mechanics/playercontroller.lua
|
PLAYER: scripts/omw/mechanics/playercontroller.lua
|
||||||
PLAYER: scripts/omw/playercontrols.lua
|
|
||||||
MENU: scripts/omw/camera/settings.lua
|
MENU: scripts/omw/camera/settings.lua
|
||||||
PLAYER: scripts/omw/camera/camera.lua
|
PLAYER: scripts/omw/camera/camera.lua
|
||||||
|
MENU: scripts/omw/input/settings.lua
|
||||||
|
PLAYER: scripts/omw/input/playercontrols.lua
|
||||||
PLAYER: scripts/omw/input/actionbindings.lua
|
PLAYER: scripts/omw/input/actionbindings.lua
|
||||||
PLAYER: scripts/omw/input/smoothmovement.lua
|
PLAYER: scripts/omw/input/smoothmovement.lua
|
||||||
NPC,CREATURE: scripts/omw/ai.lua
|
NPC,CREATURE: scripts/omw/ai.lua
|
||||||
|
@ -9,38 +9,6 @@ local Player = require('openmw.types').Player
|
|||||||
|
|
||||||
local I = require('openmw.interfaces')
|
local I = require('openmw.interfaces')
|
||||||
|
|
||||||
local settingsGroup = 'SettingsOMWControls'
|
|
||||||
|
|
||||||
local function boolSetting(key, default)
|
|
||||||
return {
|
|
||||||
key = key,
|
|
||||||
renderer = 'checkbox',
|
|
||||||
name = key,
|
|
||||||
description = key .. 'Description',
|
|
||||||
default = default,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
I.Settings.registerPage({
|
|
||||||
key = 'OMWControls',
|
|
||||||
l10n = 'OMWControls',
|
|
||||||
name = 'ControlsPage',
|
|
||||||
description = 'ControlsPageDescription',
|
|
||||||
})
|
|
||||||
|
|
||||||
I.Settings.registerGroup({
|
|
||||||
key = settingsGroup,
|
|
||||||
page = 'OMWControls',
|
|
||||||
l10n = 'OMWControls',
|
|
||||||
name = 'MovementSettings',
|
|
||||||
permanentStorage = true,
|
|
||||||
settings = {
|
|
||||||
boolSetting('alwaysRun', false),
|
|
||||||
boolSetting('toggleSneak', false), -- TODO: consider removing this setting when we have the advanced binding UI
|
|
||||||
boolSetting('smoothControllerMovement', true),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local settings = storage.playerSection('SettingsOMWControls')
|
local settings = storage.playerSection('SettingsOMWControls')
|
||||||
|
|
||||||
do
|
do
|
33
files/data/scripts/omw/input/settings.lua
Normal file
33
files/data/scripts/omw/input/settings.lua
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
local I = require('openmw.interfaces')
|
||||||
|
|
||||||
|
local settingsGroup = 'SettingsOMWControls'
|
||||||
|
|
||||||
|
local function boolSetting(key, default)
|
||||||
|
return {
|
||||||
|
key = key,
|
||||||
|
renderer = 'checkbox',
|
||||||
|
name = key,
|
||||||
|
description = key .. 'Description',
|
||||||
|
default = default,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
I.Settings.registerPage({
|
||||||
|
key = 'OMWControls',
|
||||||
|
l10n = 'OMWControls',
|
||||||
|
name = 'ControlsPage',
|
||||||
|
description = 'ControlsPageDescription',
|
||||||
|
})
|
||||||
|
|
||||||
|
I.Settings.registerGroup({
|
||||||
|
key = settingsGroup,
|
||||||
|
page = 'OMWControls',
|
||||||
|
l10n = 'OMWControls',
|
||||||
|
name = 'MovementSettings',
|
||||||
|
permanentStorage = true,
|
||||||
|
settings = {
|
||||||
|
boolSetting('alwaysRun', false),
|
||||||
|
boolSetting('toggleSneak', false), -- TODO: consider removing this setting when we have the advanced binding UI
|
||||||
|
boolSetting('smoothControllerMovement', true),
|
||||||
|
},
|
||||||
|
})
|
Loading…
x
Reference in New Issue
Block a user