Interface MWUIΒΆ
Usage:
require('openmw.interfaces').MWUI
Type MWUI
MWUI.interval |
Standard spacing interval |
MWUI.padding |
Container that adds padding around its content. |
MWUI.templates | |
MWUI.version |
Interface version |
Type Templates
Templates.border |
Standard rectangular border |
Templates.box |
Container wrapping the content with borders |
Templates.boxTransparent |
Same as box, but with a semi-transparent background |
Templates.disabled |
Shades its children and makes them uninteractible |
Templates.textEditBox |
Multiline text input |
Templates.textEditLine |
Single line text input |
Templates.textHeader |
Header white colored text |
Templates.textNormal |
Standard "sand" colored text |
Templates.textParagraph |
Standard "sand" colored multiline text |
Type MWUI
Field(s)
- #number MWUI.interval
-
Standard spacing interval
- #table MWUI.padding
-
Container that adds padding around its content.
- #number MWUI.version
-
Interface version
Type Templates
Usage:
local I = require('openmw.interfaces')
local ui = require('openmw.ui')
local auxUi = require('openmw_aux.ui')
ui.create {
template = I.MWUI.templates.textNormal,
layer = 'Windows',
type = ui.TYPE.Text,
props = {
text = 'Hello, world!',
},
}
-- important to copy here
local myText = auxUi.deepLayoutCopy(I.MWUI.templates.textNormal)
myText.props.textSize = 20
I.MWUI.templates.textNormal = myText
ui.updateAll()
Field(s)
- openmw.ui#Layout Templates.border
-
Standard rectangular border
- openmw.ui#Layout Templates.box
-
Container wrapping the content with borders
- openmw.ui#Layout Templates.boxTransparent
-
Same as box, but with a semi-transparent background
- openmw.ui#Layout Templates.disabled
-
Shades its children and makes them uninteractible
- openmw.ui#Layout Templates.textEditBox
-
Multiline text input
- openmw.ui#Layout Templates.textEditLine
-
Single line text input
- openmw.ui#Layout Templates.textHeader
-
Header white colored text
- openmw.ui#Layout Templates.textNormal
-
Standard "sand" colored text
- openmw.ui#Layout Templates.textParagraph
-
Standard "sand" colored multiline text