<?xml version="1.0" encoding="UTF-8"?>
<!--
    *  Copyright (C) 2002-2022  The FreeCol Team
    *
    *  This file is part of FreeCol.
    *
    *  FreeCol is free software: you can redistribute it and/or modify
    *  it under the terms of the GNU General Public License as published by
    *  the Free Software Foundation, either version 2 of the License, or
    *  (at your option) any later version.
    *
    *  FreeCol is distributed in the hope that it will be useful,
    *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    *  GNU General Public License for more details.
    *
    *  You should have received a copy of the GNU General Public License
    *  along with FreeCol.  If not, see <http://www.gnu.org/licenses/>.
    *
  -->
<optionGroup id="clientOptions">
    <optionGroup id="clientOptions.personal">
      <!-- Player name customization. -->
      <textOption id="model.option.playerName" defaultValue="" />
      
      <!-- Option for setting the language -->
      <languageOption id="model.option.languageOption"
                      defaultValue="clientOptions.gui.languageOption.automatic" />
    </optionGroup>

    <optionGroup id="clientOptions.display" >
      <!-- Control the display scale -->
      <rangeOption id="model.option.displayScaling"
                   defaultValue="0" localizedLabels="true">
        <rangeValue label="model.option.displayScaling.automatic" value="0"/>
        <rangeValue label="model.option.displayScaling.100" value="100"/>
        <rangeValue label="model.option.displayScaling.125" value="125"/>
        <rangeValue label="model.option.displayScaling.150" value="150"/>
        <rangeValue label="model.option.displayScaling.175" value="175"/>
        <rangeValue label="model.option.displayScaling.200" value="200"/>
      </rangeOption>
      
      <booleanOption id="model.option.manualMainFontSize" defaultValue="false"/>
      <integerOption id="model.option.mainFontSize"
               defaultValue="12" minimumValue="10" maximumValue="48" stepSize="1" enabledBy="model.option.manualMainFontSize"/>
     
      <!-- Use openGL or not? -->
      <booleanOption id="model.option.useOpenGL"
                     defaultValue="true"/>
      <!-- Use pixmaps or not? -->
      <booleanOption id="model.option.usePixmaps"
                     defaultValue="true"/>
      <!-- Use XRender or not? -->
      <booleanOption id="model.option.useXRender"
                     defaultValue="true"/>

      <booleanOption id="model.option.useTerrainAnimations" defaultValue="true"/>

      <rangeOption id="model.option.graphicsQuality"
                   defaultValue="20" localizedLabels="true">
        <rangeValue label="clientOptions.gui.graphicsQuality.lowest" value="0"/>
        <rangeValue label="clientOptions.gui.graphicsQuality.low" value="10"/>
        <rangeValue label="clientOptions.gui.graphicsQuality.normal" value="20"/>
        <rangeValue label="clientOptions.gui.graphicsQuality.high" value="30"/>
        <rangeValue label="clientOptions.gui.graphicsQuality.highest" value="40"/>
      </rangeOption>      

      <!-- Animation speed for our units. -->
      <rangeOption id="model.option.moveAnimationSpeed"
                   defaultValue="3" localizedLabels="true">
        <rangeValue label="clientOptions.gui.moveAnimationSpeed.off" value="0"/>
        <rangeValue label="clientOptions.gui.moveAnimationSpeed.slow" value="1"/>
        <rangeValue label="clientOptions.gui.moveAnimationSpeed.normal" value="2"/>
        <rangeValue label="clientOptions.gui.moveAnimationSpeed.fast" value="3"/>
      </rangeOption>
      <!-- Animation speed for other enemy units. -->
      <rangeOption id="model.option.enemyMoveAnimationSpeed"
                   defaultValue="3" localizedLabels="true">
        <rangeValue label="clientOptions.gui.enemyMoveAnimationSpeed.off" value="0"/>
        <rangeValue label="clientOptions.gui.enemyMoveAnimationSpeed.slow" value="1"/>
        <rangeValue label="clientOptions.gui.enemyMoveAnimationSpeed.normal" value="2"/>
        <rangeValue label="clientOptions.gui.enemyMoveAnimationSpeed.fast" value="3"/>
      </rangeOption>
      <!-- Animation speed for other friendly units. -->
      <rangeOption id="model.option.friendlyMoveAnimationSpeed"
                   defaultValue="3" localizedLabels="true">
        <rangeValue label="clientOptions.gui.friendlyMoveAnimationSpeed.off" value="0"/>
        <rangeValue label="clientOptions.gui.friendlyMoveAnimationSpeed.slow" value="1"/>
        <rangeValue label="clientOptions.gui.friendlyMoveAnimationSpeed.normal" value="2"/>
        <rangeValue label="clientOptions.gui.friendlyMoveAnimationSpeed.fast" value="3"/>
      </rangeOption>
    </optionGroup>
    
    <optionGroup id="clientOptions.interface" >
      <optionGroup id="clientOptions.interface.mapView" >
        <!-- The default zoom level. -->
        <rangeOption id="model.option.defaultZoomLevel"
                     defaultValue="2" localizedLabels="false">
          <rangeValue label="1" value="1"/>
          <rangeValue label="2" value="2"/>
          <rangeValue label="3" value="3"/>
          <rangeValue label="4" value="4"/>
          <rangeValue label="5" value="5"/>
          <rangeValue label="6" value="6"/>
        </rangeOption>
        
        <!-- Selected tiles always gets centered if this option is enabled. -->
        <booleanOption id="model.option.alwaysCenter"
                       defaultValue="false"/>
        <!-- If this option is enabled, the display will recenter in
             order to display the active unit. -->
        <booleanOption id="model.option.jumpToActiveUnit"
                       defaultValue="true"/>
        <!-- Option for activating autoscroll when dragging units on the
             mapboard. -->
        <booleanOption id="model.option.mapScrollOnDrag"
                       defaultValue="true"/>
        <!-- Option for autoscrolling when hitting the boundaries of the
             mapboard. -->
        <booleanOption id="model.option.autoScroll"
                       defaultValue="false"/>
        <!-- Whether to display the grid by default or not. -->
        <booleanOption id="model.option.displayGrid"
                       defaultValue="false"/>
        <!-- Whether to display borders by default or not. -->
        <booleanOption id="model.option.displayBorders"
                       defaultValue="false"/>
        <!-- Whether to draw the fog of war on the actual map or not. -->
        <booleanOption id="model.option.displayFogOfWar"
                       defaultValue="false"/>
        <!-- Whether to have a delay on a unit's last move or not. -->
        <booleanOption id="model.option.unitLastMoveDelay"
                       defaultValue="true"/>
                       
        <!-- Option for in tile text display -->
        <selectOption id="model.option.displayTileText"
                      defaultValue="0" localizedLabels="true">
          <selectValue label="clientOptions.gui.displayTileText.empty" value="0"/>
          <selectValue label="clientOptions.gui.displayTileText.names" value="1"/>
          <selectValue label="clientOptions.gui.displayTileText.owners" value="2"/>
          <selectValue label="clientOptions.gui.displayTileText.regions" value="3"/>
        </selectOption>
        <!-- The type of colony labels on the map. -->
        <selectOption id="model.option.displayColonyLabels"
                      defaultValue="1" localizedLabels="true">
          <selectValue label="clientOptions.gui.displayColonyLabels.none" value="0"/>
          <selectValue label="clientOptions.gui.displayColonyLabels.classic" value="1"/>
          <selectValue label="clientOptions.gui.displayColonyLabels.modern" value="2"/>
        </selectOption>

      </optionGroup>
      <optionGroup id="clientOptions.interface.mapControls" >
        <!-- Whether to display a compass rose or not. -->
        <booleanOption id="model.option.displayCompassRose"
                       defaultValue="false"/>
        <!-- Whether to display the map controls by default or not. -->
        <booleanOption id="model.option.displayMapControls"
                       defaultValue="true"/>
        <!-- What type of map controls, corner or classic? -->
        <stringOption id="model.option.mapControls"
                      defaultValue="clientOptions.gui.mapControls.CornerMapControls">
          <choice value="clientOptions.gui.mapControls.CornerMapControls"/>
          <choice value="clientOptions.gui.mapControls.ClassicMapControls"/>
        </stringOption>
                       
        <!-- Draw the fog of war on the minimap. -->
        <booleanOption id="model.option.miniMapToggleFogOfWar"
                       defaultValue="true"/>
        <!-- Draw the borders on the minimap. -->
        <booleanOption id="model.option.miniMapToggleBorders"
                       defaultValue="true"/>
        <!-- The color to fill in around the actual map on the minimap. -->
        <selectOption id="model.option.color.background"
                      defaultValue="0" localizedLabels="true">
          <selectValue label="clientOptions.minimap.color.background.black" value="0"/>
          <selectValue label="clientOptions.minimap.color.background.gray.dark.very" value="1"/>
          <selectValue label="clientOptions.minimap.color.background.gray.dark" value="2"/>
          <selectValue label="clientOptions.minimap.color.background.gray" value="3"/>
          <selectValue label="clientOptions.minimap.color.background.gray.light" value="4"/>
          <selectValue label="clientOptions.minimap.color.background.gray.light.very" value="5"/>
          <selectValue label="clientOptions.minimap.color.background.blue.light" value="6"/>
        </selectOption>
      </optionGroup>
      <optionGroup id="clientOptions.messages" >
        <!-- Used by GUI, this defines the grouping of ModelMessages. -->
        <selectOption id="model.option.guiMessagesGroupBy"
                      defaultValue="0" localizedLabels="true">
          <selectValue label="clientOptions.messages.guiMessagesGroupBy.nothing" value="0"/>
          <selectValue label="clientOptions.messages.guiMessagesGroupBy.type" value="1"/>
          <selectValue label="clientOptions.messages.guiMessagesGroupBy.source" value="2"/>
        </selectOption>
        <!-- Switches to enable display of particular message types. -->
        <booleanOption id="model.option.guiShowBuildingCompleted"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowCombatResult"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowDemands"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowDisasters"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowForeignDiplomacy"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowGifts"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowGoodsMovement"
                       defaultValue="false"/>
        <booleanOption id="model.option.guiShowGovernmentEfficiency"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowMarketPrices"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowMissingGoods"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowSonsOfLiberty"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowTutorial"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowUnitAdded"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowUnitArrived"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowUnitDemoted"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowUnitImproved"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowUnitLost"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowUnitRepaired"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowWarehouseCapacity"
                       defaultValue="true"/>
        <booleanOption id="model.option.guiShowWarning"
                       defaultValue="true"/>
        <!-- Show warnings about colony sites. -->
        <booleanOption id="model.option.guiShowColonyWarnings"
                       defaultValue="true"/>
        <!-- Show the pre-combat dialog. -->
        <booleanOption id="model.option.guiShowPreCombat"
                       defaultValue="true"/>
        <!-- Show the warnings about poor choice of tile worker. -->
        <booleanOption id="model.option.guiShowNotBestTile"
                       defaultValue="true"/>
        <!-- Show the Region Naming dialog -->
        <booleanOption id="model.option.guiShowRegionNaming"
                       defaultValue="true"/>
        <!-- Type of colony report. -->
        <selectOption id="model.option.colonyReport"
                      defaultValue="0" localizedLabels="true">
          <selectValue label="clientOptions.messages.colonyReport.classic" value="0"/>
          <selectValue label="clientOptions.messages.colonyReport.compact" value="1"/>
        </selectOption>
        <!-- Type of labour report. -->
        <selectOption id="model.option.labourReport"
                      defaultValue="0" localizedLabels="true">
          <selectValue label="clientOptions.messages.labourReport.classic" value="0"/>
          <selectValue label="clientOptions.messages.labourReport.compact" value="1"/>
        </selectOption>
      </optionGroup>
      <optionGroup id="clientOptions.warehouse" >
        <!-- The Stock the custom house should keep when selling goods. -->
        <integerOption id="model.option.customStock"
                       defaultValue="50" minimumValue="0" maximumValue="300"/>
        <!-- Generate warning of stock drops below this percentage of
             capacity. -->
        <integerOption id="model.option.lowLevel"
                       defaultValue="10" minimumValue="0" maximumValue="100"/>
        <!-- Generate warning of stock exceeds this percentage of capacity. -->
        <integerOption id="model.option.highLevel"
                       defaultValue="90" minimumValue="0" maximumValue="100"/>
        <!-- Should trade routes check production to determine whether
             to visit a stop? -->
        <booleanOption id="model.option.stockAccountsForProduction"
                       defaultValue="false"/>
      </optionGroup>
      <optionGroup id="clientOptions.other" >
        <!-- Remember panel positions? -->
        <booleanOption id="model.option.rememberPanelPositions"
                       defaultValue="false"/>
        <!-- Remember panel sizes? -->
        <booleanOption id="model.option.rememberPanelSizes"
                       defaultValue="true"/>
        <!-- Option to disable end turn grey background. -->
        <booleanOption id="model.option.disableGrayLayer"
                       defaultValue="false"/>
        <!-- Option for autoload emigrants on sailing to america. -->
        <booleanOption id="model.option.autoloadEmigrants"
                       defaultValue="false"/>
        <!-- Option to autoload sentried units. -->
        <booleanOption id="model.option.autoloadSentries"
                       defaultValue="false"/>
        <!-- Automatically ends the turn when no units can be made active. -->
        <booleanOption id="model.option.autoEndTurn"
                       defaultValue="false"/>
        <!-- Show the end turn dialog. -->
        <booleanOption id="model.option.showEndTurnDialog"
                       defaultValue="true"/>
        <!-- What to do when the natives make a demand. -->
        <selectOption id="model.option.indianDemandResponse"
                      defaultValue="0" localizedLabels="true">
          <selectValue label="clientOptions.other.indianDemandResponse.ask" value="0"/>
          <selectValue label="clientOptions.other.indianDemandResponse.accept" value="1"/>
          <selectValue label="clientOptions.other.indianDemandResponse.reject" value="2"/>
        </selectOption>
        <!-- The action to take on warehouse overflow. -->
        <selectOption id="model.option.unloadOverflowResponse"
                      defaultValue="0" localizedLabels="true">
          <selectValue label="clientOptions.other.unloadOverflowResponse.ask" value="0"/>
          <selectValue label="clientOptions.other.unloadOverflowResponse.never" value="1"/>
          <selectValue label="clientOptions.other.unloadOverflowResponse.always" value="2"/>
        </selectOption>

        <!-- Used by GUI, the number will be displayed when a group of
             goods are higher than this number. -->
        <integerOption id="model.option.guiMinNumberToDisplayGoodsCount"
                       defaultValue="7" minimumValue="0" maximumValue="10"/>
        <!-- Used by GUI, this is the most repetitions drawn of a goods
             image for a single goods grouping. -->
        <integerOption id="model.option.guiMaxNumberOfGoodsImages"
                       defaultValue="7" minimumValue="1" maximumValue="10"/>
        <!-- Used by GUI, the good will be displayed in the warehouse
             panel when its quantity is at least this number. -->
        <integerOption id="model.option.guiMinNumberToDisplayGoods"
                       defaultValue="0" minimumValue="0" maximumValue="100"/>
        <!-- Used by GUI to sort colonies. -->
        <selectOption id="model.option.colonyComparator"
                      defaultValue="0" localizedLabels="true">
          <selectValue label="clientOptions.gui.colonyComparator.byName" value="0"/>
          <selectValue label="clientOptions.gui.colonyComparator.byAge" value="1"/>
          <selectValue label="clientOptions.gui.colonyComparator.byPosition" value="2"/>
          <selectValue label="clientOptions.gui.colonyComparator.bySize" value="3"/>
          <selectValue label="clientOptions.gui.colonyComparator.bySoL" value="4"/>
        </selectOption>
      </optionGroup>
    </optionGroup>

    <optionGroup id="clientOptions.savegames" >
      <!-- Use default values for savegames instead of displaying a
           dialog. -->
      <selectOption id="model.option.showSavegameSettings"
                    defaultValue="1" localizedLabels="true">
        <selectValue label="clientOptions.savegames.showSavegameSettings.never" value="0"/>
        <selectValue label="clientOptions.savegames.showSavegameSettings.multiplayer" value="1"/>
        <selectValue label="clientOptions.savegames.showSavegameSettings.always" value="2"/>
      </selectOption>
      <!-- Option for setting the period of autosaves.  The value 0
           signals that autosaving is disabled -->
      <integerOption id="model.option.autosavePeriod"
                     defaultValue="1" minimumValue="0" maximumValue="100"/>
      <!-- Option for setting the number of days autosaves are kept
           (valid time).  0 to ignore this condition. -->
      <integerOption id="model.option.autosaveValidity"
                     defaultValue="30" minimumValue="0" maximumValue="360"/>
      <!-- Option to delete old save games when a new game is started. -->
      <booleanOption id="model.option.autosaveDelete"
                     defaultValue="false"/>
      <!-- Option to confirm the overwrite of existing save files. -->
      <booleanOption id="model.option.confirmSaveOverwrite"
                     defaultValue="false"/>
      <!-- Prefix for the auto-save files. -->
      <textOption id="model.option.autoSavePrefix"
                  defaultValue="Autosave"/>
      <!-- Stem for the last-turn save file name. -->
      <textOption id="model.option.lastTurnName"
                  defaultValue="last-turn"/>
      <!-- Stem for the before-last-turn save file name. -->
      <textOption id="model.option.beforeLastTurnName"
                  defaultValue="before-last-turn"/>
    </optionGroup>

    <optionGroup id="clientOptions.audio">
      <!-- Which mixer to use by default. -->
      <audioMixerOption id="model.option.audioMixer"
                        defaultValue="AUTO" />

      <!--The music volume -->
      <percentageOption id="model.option.musicVolume"
                        defaultValue="100" previewEnabled="true"/>
                        
      <!--The sound effects volume -->
      <percentageOption id="model.option.soundEffectsVolume"
                        defaultValue="100" previewEnabled="true"/>
                        
      <!-- Play an alert sound on message arrival. -->
      <booleanOption id="model.option.audioAlerts"
                     defaultValue="false"/>
    </optionGroup>

    <optionGroup id="clientOptions.mods">
      <!-- Which mods are enabled.  Initially empty. -->
      <modListOption id="clientOptions.mods.userMods">
        <template>
          <modOption id="model.option.mod" />
        </template>
      </modListOption>
    </optionGroup>

    <optionGroup id="clientOptions.etc" editable="false" visible="false">
      <!-- Placement options, set dynamically, not from the options dialogs. -->
    </optionGroup>
</optionGroup>
