mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-20 06:33:26 +02:00
Version 0.95 BETA
This commit is contained in:
125
modules/client_options/graphics.otui
Normal file
125
modules/client_options/graphics.otui
Normal file
@@ -0,0 +1,125 @@
|
||||
Panel
|
||||
Label
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
text-wrap: false
|
||||
@onSetup: |
|
||||
self:setText(tr("GPU: ") .. g_graphics.getRenderer())
|
||||
|
||||
Label
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
text-wrap: false
|
||||
@onSetup: |
|
||||
self:setText(tr("Version: ") .. g_graphics.getVersion())
|
||||
|
||||
HorizontalSeparator
|
||||
id: separator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin: 5 5 5 5
|
||||
|
||||
OptionCheckBox
|
||||
id: vsync
|
||||
!text: tr('Enable vertical synchronization')
|
||||
!tooltip: tr('Limits FPS (usually to 60)')
|
||||
@onSetup: |
|
||||
if g_window.getPlatformType() == 'WIN32-EGL' then
|
||||
self:setEnabled(false)
|
||||
self:setText(tr('Enable vertical synchronization') .. " " .. tr('(OpenGL only)'))
|
||||
end
|
||||
|
||||
OptionCheckBox
|
||||
id: showFps
|
||||
!text: tr('Show frame rate')
|
||||
|
||||
OptionCheckBox
|
||||
id: enableLights
|
||||
!text: tr('Enable lights')
|
||||
|
||||
OptionCheckBox
|
||||
id: fullscreen
|
||||
!text: tr('Fullscreen')
|
||||
tooltip: Ctrl+Shift+F
|
||||
|
||||
Label
|
||||
margin-top: 12
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
id: optimizationLevelLabel
|
||||
!text: tr("Optimization level")
|
||||
|
||||
ComboBox
|
||||
id: optimizationLevel
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 3
|
||||
margin-right: 2
|
||||
margin-left: 2
|
||||
@onOptionChange: modules.client_options.setOption(self:getId(), self.currentIndex)
|
||||
@onSetup: |
|
||||
self:addOption("Automatic")
|
||||
self:addOption("None")
|
||||
self:addOption("Low")
|
||||
self:addOption("Medium")
|
||||
self:addOption("High")
|
||||
self:addOption("Maximum")
|
||||
|
||||
Label
|
||||
id: backgroundFrameRateLabel
|
||||
!text: tr('Game framerate limit: %s', 'max')
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 12
|
||||
@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))
|
||||
|
||||
OptionScrollbar
|
||||
id: backgroundFrameRate
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 3
|
||||
minimum: 10
|
||||
maximum: 201
|
||||
|
||||
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))
|
||||
|
||||
OptionScrollbar
|
||||
id: ambientLight
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 3
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
|
||||
Label
|
||||
id: tips
|
||||
margin-top: 20
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
text-auto-resize: true
|
||||
text-align: left
|
||||
text-wrap: true
|
||||
!text: tr("If you have FPS issues:\n- Use OpenGL version (_gl)\n- Disable vertical synchronization\n- Set higher optimization level\n- Lower screen resolution\nOr report it via email to otclient@otclient.ovh")
|
Reference in New Issue
Block a user