Class Options

java.lang.Object
fr.formiko.usuel.Options
All Implemented Interfaces:
Serializable

public class Options extends Object implements Serializable
Options class.
It contain all globals options and can save it.
Author:
Hydrolien
See Also:
Serialized Form
  • Field Details

    • game_endTurnAuto

      private boolean game_endTurnAuto
    • game_forceQuit

      private boolean game_forceQuit
    • game_language

      private byte game_language
      language can be save as byte or String in properties & options file.
    • game_pseudo

      private String game_pseudo
    • game_whaitBeforeLaunchGame

      private boolean game_whaitBeforeLaunchGame
    • game_discordRP

      private boolean game_discordRP
    • partie_autoCleaning

      private boolean partie_autoCleaning
    • debug_error

      private boolean debug_error
    • debug_alerte

      private boolean debug_alerte
    • debug_info

      private boolean debug_info
    • debug_message

      private boolean debug_message
    • debug_performance

      private boolean debug_performance
    • debug_gui

      private boolean debug_gui
    • debug_paintHitBox

      private boolean debug_paintHitBox
    • sounds_music

      private boolean sounds_music
    • sounds_sound

      private boolean sounds_sound
    • sounds_musicVolume

      private byte sounds_musicVolume
    • sounds_soundVolume

      private byte sounds_soundVolume
    • gui_hide_buttonSizeZoom

      private byte gui_hide_buttonSizeZoom
    • gui_global_buttonSizeAction

      private byte gui_global_buttonSizeAction
    • gui_hide_buttonSizeTX

      private byte gui_hide_buttonSizeTX
    • gui_partie_quickMovement

      private boolean gui_partie_quickMovement
    • gui_partie_instantaneousMovement

      private boolean gui_partie_instantaneousMovement
    • gui_partie_orientedObjectOnMap

      private boolean gui_partie_orientedObjectOnMap
    • gui_partie_maxMessageDisplay

      private byte gui_partie_maxMessageDisplay
    • gui_partie_drawSeeds

      private boolean gui_partie_drawSeeds
    • gui_partie_drawAllyCreatures

      private boolean gui_partie_drawAllyCreatures
    • gui_partie_drawNeutralCreatures

      private boolean gui_partie_drawNeutralCreatures
    • gui_partie_drawEnemyCreatures

      private boolean gui_partie_drawEnemyCreatures
    • gui_partie_drawOnlyEatable

      private boolean gui_partie_drawOnlyEatable
    • gui_partie_drawBlades

      private boolean gui_partie_drawBlades
    • gui_pgo_drawGrid

      private boolean gui_pgo_drawGrid
    • gui_global_borderButtonSize

      private byte gui_global_borderButtonSize
    • gui_pgo_drawRelationsIcons

      private boolean gui_pgo_drawRelationsIcons
    • gui_pgo_drawStatesIconsLevel

      private byte gui_pgo_drawStatesIconsLevel
    • gui_global_fontSizeText

      private int gui_global_fontSizeText
    • gui_global_fontSizeTitle

      private int gui_global_fontSizeTitle
    • gui_global_fontText

      private String gui_global_fontText
    • gui_global_fontTitle

      private String gui_global_fontTitle
    • gui_global_fontTitlePersonalised

      private boolean gui_global_fontTitlePersonalised
    • gui_global_fullscreen

      private boolean gui_global_fullscreen
    • gui_global_frameWidth

      private int gui_global_frameWidth
    • gui_global_frameHeight

      private int gui_global_frameHeight
    • gui_hide_loadingDuringMenus

      private boolean gui_hide_loadingDuringMenus
    • gui_hide_keepFilesRotated

      private boolean gui_hide_keepFilesRotated
    • gui_partie_sizeOfMapLines

      private int gui_partie_sizeOfMapLines
    • gui_partie_followAntAtStartTurn

      private boolean gui_partie_followAntAtStartTurn
    • gui_hide_positionCase

      private byte gui_hide_positionCase
    • gui_partie_realisticSize

      private byte gui_partie_realisticSize
    • gui_hide_modeFPS

      private boolean gui_hide_modeFPS
    • gui_global_fps

      private int gui_global_fps
    • gui_global_animationEnable

      private boolean gui_global_animationEnable
    • gui_global_dateFormat

      private String gui_global_dateFormat
    • gui_pgo_antColorLevel

      private byte gui_pgo_antColorLevel
    • gui_pgo_drawAllAnthillColor

      private boolean gui_pgo_drawAllAnthillColor
    • gui_pgo_drawPlayerMessagePanel

      private boolean gui_pgo_drawPlayerMessagePanel
    • font1

      private Font font1
    • font2

      private Font font2
    • properties

      private SortedProperties properties
  • Constructor Details

    • Options

      public Options()
  • Method Details

    • newDefaultOptions

      public static Options newDefaultOptions()
      Builder with only default properties.
    • getLanguage

      public byte getLanguage()
    • setLanguage

      public void setLanguage(byte x)
      Set language of Options & Locale.
    • setLanguage

      public void setLanguage(int x)
    • getbuttonSizeZoom

      public int getbuttonSizeZoom()
    • setbuttonSizeZoom

      public void setbuttonSizeZoom(byte x)
    • getbuttonSizeAction

      public int getbuttonSizeAction()
    • setbuttonSizeAction

      public void setbuttonSizeAction(byte x)
    • getbuttonSizeTX

      public int getbuttonSizeTX()
    • setbuttonSizeTX

      public void setbuttonSizeTX(byte x)
    • getQuickMovement

      public boolean getQuickMovement()
    • setQuickMovement

      public void setQuickMovement(boolean b)
    • getDrawSeeds

      public boolean getDrawSeeds()
    • setDrawSeeds

      public void setDrawSeeds(boolean b)
    • getDrawOnlyEatable

      public boolean getDrawOnlyEatable()
    • setDrawOnlyEatable

      public void setDrawOnlyEatable(boolean b)
    • getDrawBlades

      public boolean getDrawBlades()
    • setDrawDrawBlades

      public void setDrawDrawBlades(boolean b)
    • getDrawEnemyCreatures

      public boolean getDrawEnemyCreatures()
    • setDrawEnemyCreatures

      public void setDrawEnemyCreatures(boolean b)
    • getDrawNeutralCreatures

      public boolean getDrawNeutralCreatures()
    • setDrawNeutralCreatures

      public void setDrawNeutralCreatures(boolean b)
    • getDrawAllyCreatures

      public boolean getDrawAllyCreatures()
    • setDrawAllyCreatures

      public void setDrawAllyCreatures(boolean b)
    • getInstantaneousMovement

      public boolean getInstantaneousMovement()
    • setInstantaneousMovement

      public void setInstantaneousMovement(boolean b)
    • getOrientedObjectOnMap

      public boolean getOrientedObjectOnMap()
    • setOrientedObjectOnMap

      public void setOrientedObjectOnMap(boolean b)
    • getMaxMessageDisplay

      public byte getMaxMessageDisplay()
    • setMaxMessageDisplay

      public void setMaxMessageDisplay(int x)
    • getDrawGrid

      public boolean getDrawGrid()
    • setDrawGrid

      public void setDrawGrid(boolean b)
    • getForceQuit

      public boolean getForceQuit()
    • setForceQuit

      public void setForceQuit(boolean b)
    • getBorderButtonSize

      public byte getBorderButtonSize()
    • setBorderButtonSize

      public void setBorderButtonSize(int x)
    • getDrawRelationsIcons

      public boolean getDrawRelationsIcons()
    • setDrawRelationsIcons

      public void setDrawRelationsIcons(boolean b)
    • getDrawStatesIconsLevel

      public byte getDrawStatesIconsLevel()
    • setDrawStatesIconsLevel

      public void setDrawStatesIconsLevel(byte b)
    • getFont1

      public Font getFont1()
    • getFont1

      public Font getFont1(Double d)
    • setFont1

      public void setFont1(Font f)
    • getFont2

      public Font getFont2()
    • getFontTitle

      public Font getFontTitle(String s)
      Return a font that can display given String.
      Parameters:
      s - String to test displayability.
    • setFont2

      public void setFont2(Font f)
    • getFontSizeText

      public int getFontSizeText()
    • setFontSizeText

      public void setFontSizeText(int x)
    • getFontSizeTitle

      public int getFontSizeTitle()
    • setFontSizeTitle

      public void setFontSizeTitle(int x)
    • getFontText

      public String getFontText()
    • setFontText

      public void setFontText(String s)
    • getFontTitle

      public String getFontTitle()
    • setFontTitle

      public void setFontTitle(String s)
    • getPseudo

      public String getPseudo()
    • setPseudo

      public void setPseudo(String s)
    • getFullscreen

      public boolean getFullscreen()
    • setFullscreen

      public void setFullscreen(boolean b)
    • getFrameWidth

      public int getFrameWidth()
    • setFrameWidth

      public void setFrameWidth(int x)
    • getFrameHeight

      public int getFrameHeight()
    • setFrameHeight

      public void setFrameHeight(int x)
    • getLoadingDuringMenus

      public boolean getLoadingDuringMenus()
    • setLoadingDuringMenus

      public void setLoadingDuringMenus(boolean b)
    • getKeepFilesRotated

      public boolean getKeepFilesRotated()
    • setKeepFilesRotated

      public void setKeepFilesRotated(boolean b)
    • getWhaitBeforeLaunchGame

      public boolean getWhaitBeforeLaunchGame()
    • setWhaitBeforeLaunchGame

      public void setWhaitBeforeLaunchGame(boolean b)
    • getDiscordRP

      public boolean getDiscordRP()
    • setDiscordRP

      public void setDiscordRP(boolean b)
    • getMessage

      public boolean getMessage()
    • setMessage

      public void setMessage(boolean b)
    • getError

      public boolean getError()
    • setError

      public void setError(boolean b)
    • getWarning

      public boolean getWarning()
    • setWaring

      public void setWaring(boolean b)
    • getPerformance

      public boolean getPerformance()
    • setPerformance

      public void setPerformance(boolean b)
    • getAffG

      public boolean getAffG()
    • setAffG

      public void setAffG(boolean b)
    • getPaintHitBox

      public boolean getPaintHitBox()
    • setPaintHitBox

      public void setPaintHitBox(boolean b)
    • getSizeOfMapLines

      public int getSizeOfMapLines()
    • setSizeOfMapLines

      public void setSizeOfMapLines(int x)
    • getFollowAntAtStartTurn

      public boolean getFollowAntAtStartTurn()
    • setFollowAntAtStartTurn

      public void setFollowAntAtStartTurn(boolean b)
    • getPositionCase

      public byte getPositionCase()
    • setPositionCase

      public void setPositionCase(byte x)
    • getBMusic

      public boolean getBMusic()
    • setBMusic

      public void setBMusic(boolean b)
    • getBSon

      public boolean getBSon()
    • setBSon

      public void setBSon(boolean b)
    • getVolMusic

      public byte getVolMusic()
    • setVolMusic

      public void setVolMusic(byte x)
    • getVolSon

      public byte getVolSon()
    • setVolSon

      public void setVolSon(byte x)
    • getRealisticSize

      public byte getRealisticSize()
    • setRealisticSize

      public void setRealisticSize(byte x)
    • setRealisticSize

      public void setRealisticSize(int x)
    • getAutoCleaning

      public boolean getAutoCleaning()
    • setAutoCleaning

      public void setAutoCleaning(boolean b)
    • getModeFPS

      public boolean getModeFPS()
    • setModeFPS

      public void setModeFPS(boolean b)
    • getFps

      public int getFps()
    • setFps

      public void setFps(int b)
    • getAntColorLevel

      public byte getAntColorLevel()
    • setAntColorLevel

      public void setAntColorLevel(byte x)
    • getDrawAllAnthillColor

      public boolean getDrawAllAnthillColor()
    • setDrawAllAnthillColor

      public void setDrawAllAnthillColor(boolean x)
    • getDrawPlayerMessagePanel

      public boolean getDrawPlayerMessagePanel()
    • setDrawPlayerMessagePanel

      public void setDrawPlayerMessagePanel(boolean x)
    • getEndTurnAuto

      public boolean getEndTurnAuto()
    • setEndTurnAuto

      public void setEndTurnAuto(boolean b)
    • getAnimationEnable

      public boolean getAnimationEnable()
    • setAnimationEnable

      public void setAnimationEnable(boolean b)
    • getFontTitlePersonalised

      public boolean getFontTitlePersonalised()
    • setFontTitlePersonalised

      public void setFontTitlePersonalised(boolean b)
    • getDateFormat

      public String getDateFormat()
    • setDateFormat

      public void setDateFormat(String s)
    • iniOptions

      public void iniOptions()
      Initialize Options.
      It load properties from Option.md, transform it to all the Option value & delete properties.
    • saveOptions

      public void saveOptions(boolean threaded)
      Save Options.
      It load properties from data of Options.java, transform it to properties & then destory properties.
      Parameters:
      threaded - true if we can do the save in an other tread
    • saveOptions

      public void saveOptions()
    • saveOp

      private void saveOp()
      Save Options.
    • iniProperties

      private void iniProperties()
      Initialize properties of the Options.
    • saveProperties

      private void saveProperties()
      Save properties of the Options.
    • saveDeflautProperties

      private void saveDeflautProperties()
      Save default properties.
    • getDefaultProperties

      private SortedProperties getDefaultProperties()
      get defaultProperties of the Options.
      It can be used to save default Options or to repair Options.md file if something is mising.
      Value for version, language, fontSize & butonSize depend of the user computer.
    • tailleBouton

      private int tailleBouton(byte x)
      tranform a byte into a button size.
    • propertiesToOptions

      private void propertiesToOptions()
      tranform properties into Options var.
    • updateFont

      public void updateFont()
      update the 2 font.
    • optionToProperties

      private void optionToProperties()
      tranform properties into Options var.