UIWidget
  anchors.fill: parent
  visible: false

  SmallReversedQtPanel
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: parent.top

    height: 60
  
    OptionCheckBox
      id: enableLights
      !text: tr('Enable lights')

    OptionScaleScroll
      id: ambientLight
      anchors.top: prev.bottom
      &minimumScrollValue: 0
      &maximumScrollValue: 100
      &scrollSize: 21
      @onSetup: |
        local value = modules.client_options.getOption('ambientLight')
        self:setText(string.format('Ambient light: %s%%', value))

    OptionScaleScroll
      id: shadowFloorIntensity
      anchors.top: prev.bottom
      &minimumScrollValue: 0
      &maximumScrollValue: 100
      &scrollSize: 21
      @onSetup: |
        local value = modules.client_options.getOption('shadowFloorIntensity')
        self:setText(string.format('Floor Shadowing Intensity: %s%%', value))

    OptionScaleScroll
      id: floorFading
      anchors.top: prev.bottom
      &minimumScrollValue: 0
      &maximumScrollValue: 1000
      &scrollSize: 21
      @onSetup: |
        local value = modules.client_options.getOption('floorFading')
        self:setText(tr('Floor Fading: %s ms', value))

  SmallReversedQtPanel
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: prev.bottom
    margin-top: 7
    height: 32
  
    Label
      !text: 'Floor View Mode:'
      anchors.left: parent.left
      margin-left: 18
      color: #c0c0c0ff
      anchors.verticalCenter: parent.verticalCenter

    QtComboBox
      id: floorViewMode
      width: 180
      margin-left: 10
      anchors.verticalCenter: prev.verticalCenter
      anchors.left: prev.right
      mouse-scroll: false

  SmallReversedQtPanel
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: prev.bottom
    margin-top: 7
    height: 22

    OptionCheckBoxMarked
      id: drawEffectOnTop
      !text: tr('Draw Effect On Top')
      !tooltip: tr('Draw effect after drawing the entire floor.')

  SmallReversedQtPanel
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: prev.bottom
    margin-top: 7
    height: 22
  
    OptionCheckBoxMarked
      id: limitVisibleDimension
      !text: tr('Limit Visible Dimension')
      !tooltip: tr('The limit is based on your maximum range.')

  SmallReversedQtPanel
    id: floatingEffectPanel
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: prev.bottom
    margin-top: 7
    height: 22
  
    OptionCheckBox
      id: floatingEffect
      !text: 'Draw Floating Effects'
      
  SmallReversedQtPanel
    id: clientEffectOpacity
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: prev.bottom
    margin-top: 7
    height: 22

    OptionScaleScroll
      id: setEffectAlphaScroll
      anchors.fill: parent
      &minimumScrollValue: 10
      &maximumScrollValue: 100
      &scrollSize: 21

  SmallReversedQtPanel
    id: clientMissileOpacity
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: prev.bottom
    margin-top: 7
    height: 22

    OptionScaleScroll
      id: setMissileAlphaScroll
      anchors.fill: parent
      &minimumScrollValue: 10
      &maximumScrollValue: 100
      &scrollSize: 21

  SmallReversedQtPanel
    id: GameEffectSource
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: floatingEffectPanel.bottom
    margin-top: 7
    height: 100
    visible: false
    OptionLabelMarked
      !text: tr('Opacity Of Spells Effects')
      margin-top:5
      margin-left:-15
      !tooltip: tr("Adjust the opacity of spell effects cast by yourself, other players,\nregular creatures and boss creatures separately.\n\nNote that some effects, such as long-lasting map effects, spawn\neffects, and others, are not affected by these settings.")
      anchors.top: parent.top
      anchors.left: parent.left
    OptionScaleScroll
      id: setOwnSpellEffectAlphaScroll
      margin-top:5
      anchors.top: prev.bottom
      &minimumScrollValue: 10
      &maximumScrollValue: 100
      &scrollSize: 5
      @onSetup: |
        local value = modules.client_options.getOption('setOwnSpellEffectAlphaScroll')
        self:setText(tr('Own Spells Effect: %s %%', value))
    OptionScaleScroll
      id: setOtherPlayerSpellEffectAlphaScroll
      margin-top:5
      anchors.top: prev.bottom
      &minimumScrollValue: 10
      &maximumScrollValue: 100
      &scrollSize: 5
      @onSetup: |
        local value = modules.client_options.getOption('setOtherPlayerSpellEffectAlphaScroll')
        self:setText(tr('Other Player Spells Effect: %s %%', value))
    OptionScaleScroll
      id: setCreatureSpellEffectAlphaScroll
      margin-top:5
      anchors.top: prev.bottom
      &minimumScrollValue: 10
      &maximumScrollValue: 100
      &scrollSize: 5
      @onSetup: |
        local value = modules.client_options.getOption('setCreatureSpellEffectAlphaScroll')
        self:setText(tr('Creature Spells Effect: %s %%', value))

    OptionScaleScroll
      id: setBossAreaCreatureEffectAlphaScroll
      margin-top:5
      anchors.top: prev.bottom
      &minimumScrollValue: 10
      &maximumScrollValue: 100
      &scrollSize: 5
      @onSetup: |
        local value = modules.client_options.getOption('setBossAreaCreatureEffectAlphaScroll')
        self:setText(tr('Boss Area Creature Effect: %s %%', value))
