mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-22 11:23:52 +00:00
35 lines
No EOL
967 B
Lua
35 lines
No EOL
967 B
Lua
local ui = require('openmw.ui')
|
|
local async = require('openmw.async')
|
|
local util = require('openmw.util')
|
|
|
|
local common = require('scripts.omw.settings.common')
|
|
local render = require('scripts.omw.settings.render')
|
|
|
|
render.registerRenderer('text', function(value, set, arg)
|
|
return {
|
|
type = ui.TYPE.TextEdit,
|
|
props = {
|
|
size = util.vector2(arg and arg.size or 150, 30),
|
|
text = value,
|
|
textColor = util.color.rgb(1, 1, 1),
|
|
textSize = 15,
|
|
textAlignV = ui.ALIGNMENT.End,
|
|
},
|
|
events = {
|
|
textChanged = async:callback(function(s) set(s) end),
|
|
},
|
|
}
|
|
end)
|
|
|
|
return {
|
|
interfaceName = 'Settings',
|
|
interface = {
|
|
registerPage = render.registerPage,
|
|
registerRenderer = render.registerRenderer,
|
|
registerGroup = common.registerGroup,
|
|
},
|
|
engineHandlers = {
|
|
onLoad = common.onLoad,
|
|
onSave = common.onSave,
|
|
},
|
|
} |