Package fr.formiko.usuel
Class Options
java.lang.Object
fr.formiko.usuel.Options
- All Implemented Interfaces:
Serializable
Options class.
It contain all globals options and can save it.
It contain all globals options and can save it.
- Author:
- Hydrolien
- See Also:
- Serialized Form
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private Font
private Font
private boolean
private boolean
private boolean
private byte
language can be save as byte or String in properties & options file.private String
private boolean
private boolean
private byte
private byte
private String
private int
private int
private String
private String
private boolean
private int
private int
private int
private boolean
private byte
private byte
private boolean
private boolean
private boolean
private byte
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private byte
private boolean
private boolean
private byte
private int
private byte
private boolean
private boolean
private boolean
private boolean
private byte
private boolean
private SortedProperties
private boolean
private byte
private boolean
private byte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getAffG()
boolean
byte
boolean
boolean
byte
boolean
getBSon()
int
int
int
private SortedProperties
get defaultProperties of the Options.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
byte
boolean
boolean
getError()
boolean
getFont1()
getFont2()
int
int
getFontTitle(String s)
Return a font that can display given String.boolean
boolean
int
getFps()
int
int
boolean
boolean
boolean
byte
boolean
byte
boolean
boolean
boolean
boolean
boolean
byte
boolean
byte
int
byte
byte
boolean
boolean
void
Initialize Options.private void
Initialize properties of the Options.static Options
Builder with only default properties.private void
tranform properties into Options var.private void
tranform properties into Options var.private void
Save default properties.private void
saveOp()
Save Options.void
void
saveOptions(boolean threaded)
Save Options.private void
Save properties of the Options.void
setAffG(boolean b)
void
setAnimationEnable(boolean b)
void
setAntColorLevel(byte x)
void
setAutoCleaning(boolean b)
void
setBMusic(boolean b)
void
setBorderButtonSize(int x)
void
setBSon(boolean b)
void
setbuttonSizeAction(byte x)
void
setbuttonSizeTX(byte x)
void
setbuttonSizeZoom(byte x)
void
setDateFormat(String s)
void
setDiscordRP(boolean b)
void
setDrawAllAnthillColor(boolean x)
void
setDrawAllyCreatures(boolean b)
void
setDrawDrawBlades(boolean b)
void
setDrawEnemyCreatures(boolean b)
void
setDrawGrid(boolean b)
void
setDrawNeutralCreatures(boolean b)
void
setDrawOnlyEatable(boolean b)
void
setDrawPlayerMessagePanel(boolean x)
void
setDrawRelationsIcons(boolean b)
void
setDrawSeeds(boolean b)
void
setDrawStatesIconsLevel(byte b)
void
setEndTurnAuto(boolean b)
void
setError(boolean b)
void
setFollowAntAtStartTurn(boolean b)
void
void
void
setFontSizeText(int x)
void
setFontSizeTitle(int x)
void
setFontText(String s)
void
setFontTitle(String s)
void
setFontTitlePersonalised(boolean b)
void
setForceQuit(boolean b)
void
setFps(int b)
void
setFrameHeight(int x)
void
setFrameWidth(int x)
void
setFullscreen(boolean b)
void
setInstantaneousMovement(boolean b)
void
setKeepFilesRotated(boolean b)
void
setLanguage(byte x)
Set language of Options & Locale.void
setLanguage(int x)
void
setLoadingDuringMenus(boolean b)
void
setMaxMessageDisplay(int x)
void
setMessage(boolean b)
void
setModeFPS(boolean b)
void
setOrientedObjectOnMap(boolean b)
void
setPaintHitBox(boolean b)
void
setPerformance(boolean b)
void
setPositionCase(byte x)
void
void
setQuickMovement(boolean b)
void
setRealisticSize(byte x)
void
setRealisticSize(int x)
void
setSizeOfMapLines(int x)
void
setVolMusic(byte x)
void
setVolSon(byte x)
void
setWaring(boolean b)
void
setWhaitBeforeLaunchGame(boolean b)
private int
tailleBouton(byte x)
tranform a byte into a button size.void
update the 2 font.
-
Field Details
-
game_endTurnAuto
private boolean game_endTurnAuto -
game_forceQuit
private boolean game_forceQuit -
game_language
private byte game_languagelanguage can be save as byte or String in properties & options file. -
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
-
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
-
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
-
font2
-
properties
-
-
Constructor Details
-
Options
public Options()
-
-
Method Details
-
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
-
getFont1
-
setFont1
-
getFont2
-
getFontTitle
Return a font that can display given String.- Parameters:
s
- String to test displayability.
-
setFont2
-
getFontSizeText
public int getFontSizeText() -
setFontSizeText
public void setFontSizeText(int x) -
getFontSizeTitle
public int getFontSizeTitle() -
setFontSizeTitle
public void setFontSizeTitle(int x) -
getFontText
-
setFontText
-
getFontTitle
-
setFontTitle
-
getPseudo
-
setPseudo
-
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
-
setDateFormat
-
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
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.
-