tibia-client/modules/client_options/graphics.otui

117 lines
2.7 KiB
Plaintext

FrameRateScrollbar < HorizontalScrollBar
step: 1
@onValueChange: modules.client_options.setOption(self:getId(), self:getValue())
@onSetup: |
UIScrollBar.onSetup(self)
local value = modules.client_options.getOption(self:getId())
if value == 0 then value = self:getMaximum() end
self:setValue(value)
Panel
Label
!text: tr('Graphics Engine:')
anchors.left: parent.left
anchors.top: parent.top
ButtonBox
id: opengl1
anchors.left: prev.right
anchors.verticalCenter: prev.verticalCenter
text: OpenGL 1
size: 80 20
margin-left: 6
ButtonBox
id: opengl2
anchors.left: prev.right
anchors.verticalCenter: prev.verticalCenter
text: OpenGL 2
size: 80 20
margin-left: 4
OptionCheckBox
id: vsync
!text: tr('Enable vertical synchronization')
!tooltip: tr('Limits FPS to 60')
OptionCheckBox
id: showFps
!text: tr('Show frame rate')
OptionCheckBox
id: fullscreen
!text: tr('Fullscreen')
OptionCheckBox
id: dontStretchShrink
!text: tr('Don\'t stretch/shrink Game Window')
Label
id: backgroundFrameRateLabel
!text: tr('Game framerate limit: %s', 'max')
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 16
@onSetup: |
local value = modules.client_options.getOption('backgroundFrameRate')
local text = value
if value <= 0 or value >= 201 then
text = 'max'
end
self:setText(tr('Game framerate limit: %s', text))
FrameRateScrollbar
id: backgroundFrameRate
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 3
minimum: 10
maximum: 201
Label
id: foregroundFrameRateLabel
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 6
@onSetup: |
local value = modules.client_options.getOption('foregroundFrameRate')
local text = value
if value <= 0 or value >= 61 then
text = 'max'
end
self:setText(tr('Interface framerate limit: %s', text))
FrameRateScrollbar
id: foregroundFrameRate
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 3
minimum: 1
maximum: 61
Label
id: ambientLightLabel
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 6
@onSetup: |
local value = modules.client_options.getOption('ambientLight')
self:setText(tr('Ambient light: %s%%', value))
FrameRateScrollbar
id: ambientLight
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 3
minimum: 0
maximum: 100