Option to switch on/off tileset particles
This commit is contained in:
parent
d75fbe51f6
commit
273ab4c502
|
@ -208,7 +208,17 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu):
|
||||||
|
|
||||||
checkBoxUnitParticles.registerGraphicComponent(containerName,"checkBoxUnitParticles");
|
checkBoxUnitParticles.registerGraphicComponent(containerName,"checkBoxUnitParticles");
|
||||||
checkBoxUnitParticles.init(currentColumnStart,currentLine);
|
checkBoxUnitParticles.init(currentColumnStart,currentLine);
|
||||||
checkBoxUnitParticles.setValue(config.getBool("UnitParticles"));
|
checkBoxUnitParticles.setValue(config.getBool("UnitParticles","true"));
|
||||||
|
currentLine-=30;
|
||||||
|
|
||||||
|
//tileset particles
|
||||||
|
labelTilesetParticles.registerGraphicComponent(containerName,"labelTilesetParticles");
|
||||||
|
labelTilesetParticles.init(currentLabelStart,currentLine);
|
||||||
|
labelTilesetParticles.setText(lang.get("ShowTilesetParticles"));
|
||||||
|
|
||||||
|
checkBoxTilesetParticles.registerGraphicComponent(containerName,"checkBoxTilesetParticles");
|
||||||
|
checkBoxTilesetParticles.init(currentColumnStart,currentLine);
|
||||||
|
checkBoxTilesetParticles.setValue(config.getBool("TilesetParticles","true"));
|
||||||
currentLine-=30;
|
currentLine-=30;
|
||||||
|
|
||||||
//unit particles
|
//unit particles
|
||||||
|
@ -511,6 +521,7 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){
|
||||||
listBoxFilter.mouseClick(x, y);
|
listBoxFilter.mouseClick(x, y);
|
||||||
checkBoxTextures3D.mouseClick(x, y);
|
checkBoxTextures3D.mouseClick(x, y);
|
||||||
checkBoxUnitParticles.mouseClick(x, y);
|
checkBoxUnitParticles.mouseClick(x, y);
|
||||||
|
checkBoxTilesetParticles.mouseClick(x, y);
|
||||||
checkBoxMapPreview.mouseClick(x, y);
|
checkBoxMapPreview.mouseClick(x, y);
|
||||||
listBoxLights.mouseClick(x, y);
|
listBoxLights.mouseClick(x, y);
|
||||||
listBoxSoundFactory.mouseClick(x, y);
|
listBoxSoundFactory.mouseClick(x, y);
|
||||||
|
@ -558,6 +569,7 @@ void MenuStateOptions::mouseMove(int x, int y, const MouseState *ms){
|
||||||
listBoxShadows.mouseMove(x, y);
|
listBoxShadows.mouseMove(x, y);
|
||||||
checkBoxTextures3D.mouseMove(x, y);
|
checkBoxTextures3D.mouseMove(x, y);
|
||||||
checkBoxUnitParticles.mouseMove(x, y);
|
checkBoxUnitParticles.mouseMove(x, y);
|
||||||
|
checkBoxTilesetParticles.mouseMove(x, y);
|
||||||
checkBoxMapPreview.mouseMove(x, y);
|
checkBoxMapPreview.mouseMove(x, y);
|
||||||
listBoxLights.mouseMove(x, y);
|
listBoxLights.mouseMove(x, y);
|
||||||
listBoxScreenModes.mouseMove(x, y);
|
listBoxScreenModes.mouseMove(x, y);
|
||||||
|
@ -631,6 +643,7 @@ void MenuStateOptions::render(){
|
||||||
renderer.renderListBox(&listBoxShadows);
|
renderer.renderListBox(&listBoxShadows);
|
||||||
renderer.renderCheckBox(&checkBoxTextures3D);
|
renderer.renderCheckBox(&checkBoxTextures3D);
|
||||||
renderer.renderCheckBox(&checkBoxUnitParticles);
|
renderer.renderCheckBox(&checkBoxUnitParticles);
|
||||||
|
renderer.renderCheckBox(&checkBoxTilesetParticles);
|
||||||
renderer.renderCheckBox(&checkBoxMapPreview);
|
renderer.renderCheckBox(&checkBoxMapPreview);
|
||||||
renderer.renderListBox(&listBoxLights);
|
renderer.renderListBox(&listBoxLights);
|
||||||
renderer.renderListBox(&listBoxFilter);
|
renderer.renderListBox(&listBoxFilter);
|
||||||
|
@ -644,6 +657,7 @@ void MenuStateOptions::render(){
|
||||||
renderer.renderLabel(&labelShadows);
|
renderer.renderLabel(&labelShadows);
|
||||||
renderer.renderLabel(&labelTextures3D);
|
renderer.renderLabel(&labelTextures3D);
|
||||||
renderer.renderLabel(&labelUnitParticles);
|
renderer.renderLabel(&labelUnitParticles);
|
||||||
|
renderer.renderLabel(&labelTilesetParticles);
|
||||||
renderer.renderLabel(&labelMapPreview);
|
renderer.renderLabel(&labelMapPreview);
|
||||||
renderer.renderLabel(&labelLights);
|
renderer.renderLabel(&labelLights);
|
||||||
renderer.renderLabel(&labelFilter);
|
renderer.renderLabel(&labelFilter);
|
||||||
|
@ -705,6 +719,7 @@ void MenuStateOptions::saveConfig(){
|
||||||
config.setString("Filter", listBoxFilter.getSelectedItem());
|
config.setString("Filter", listBoxFilter.getSelectedItem());
|
||||||
config.setBool("Textures3D", checkBoxTextures3D.getValue());
|
config.setBool("Textures3D", checkBoxTextures3D.getValue());
|
||||||
config.setBool("UnitParticles", (checkBoxUnitParticles.getValue()));
|
config.setBool("UnitParticles", (checkBoxUnitParticles.getValue()));
|
||||||
|
config.setBool("TilesetParticles", (checkBoxTilesetParticles.getValue()));
|
||||||
config.setBool("MapPreview", checkBoxMapPreview.getValue());
|
config.setBool("MapPreview", checkBoxMapPreview.getValue());
|
||||||
config.setInt("MaxLights", listBoxLights.getSelectedItemIndex()+1);
|
config.setInt("MaxLights", listBoxLights.getSelectedItemIndex()+1);
|
||||||
config.setString("FactorySound", listBoxSoundFactory.getSelectedItem());
|
config.setString("FactorySound", listBoxSoundFactory.getSelectedItem());
|
||||||
|
|
|
@ -36,6 +36,7 @@ private:
|
||||||
GraphicLabel labelTextures3D;
|
GraphicLabel labelTextures3D;
|
||||||
GraphicLabel labelLights;
|
GraphicLabel labelLights;
|
||||||
GraphicLabel labelUnitParticles;
|
GraphicLabel labelUnitParticles;
|
||||||
|
GraphicLabel labelTilesetParticles;
|
||||||
GraphicLabel labelSoundFactory;
|
GraphicLabel labelSoundFactory;
|
||||||
GraphicLabel labelVolumeFx;
|
GraphicLabel labelVolumeFx;
|
||||||
GraphicLabel labelVolumeAmbient;
|
GraphicLabel labelVolumeAmbient;
|
||||||
|
@ -46,6 +47,7 @@ private:
|
||||||
GraphicCheckBox checkBoxTextures3D;
|
GraphicCheckBox checkBoxTextures3D;
|
||||||
GraphicListBox listBoxLights;
|
GraphicListBox listBoxLights;
|
||||||
GraphicCheckBox checkBoxUnitParticles;
|
GraphicCheckBox checkBoxUnitParticles;
|
||||||
|
GraphicCheckBox checkBoxTilesetParticles;
|
||||||
GraphicListBox listBoxSoundFactory;
|
GraphicListBox listBoxSoundFactory;
|
||||||
GraphicListBox listBoxVolumeFx;
|
GraphicListBox listBoxVolumeFx;
|
||||||
GraphicListBox listBoxVolumeAmbient;
|
GraphicListBox listBoxVolumeAmbient;
|
||||||
|
|
|
@ -69,7 +69,7 @@ void Object::initParticles(){
|
||||||
if(this->objectType==NULL) return;
|
if(this->objectType==NULL) return;
|
||||||
if(this->objectType->hasParticles()){
|
if(this->objectType->hasParticles()){
|
||||||
ObjectParticleSystemTypes *particleTypes= this->objectType->getObjectParticleSystemTypes(variation);
|
ObjectParticleSystemTypes *particleTypes= this->objectType->getObjectParticleSystemTypes(variation);
|
||||||
if(Config::getInstance().getBool("UnitParticles") && (particleTypes->empty() == false)
|
if(Config::getInstance().getBool("TilesetParticles","true") && (particleTypes->empty() == false)
|
||||||
&& (unitParticleSystems.empty() == true)){
|
&& (unitParticleSystems.empty() == true)){
|
||||||
for(ObjectParticleSystemTypes::const_iterator it= particleTypes->begin(); it != particleTypes->end(); ++it){
|
for(ObjectParticleSystemTypes::const_iterator it= particleTypes->begin(); it != particleTypes->end(); ++it){
|
||||||
UnitParticleSystem *ups= new UnitParticleSystem(200);
|
UnitParticleSystem *ups= new UnitParticleSystem(200);
|
||||||
|
|
|
@ -234,7 +234,7 @@ Unit::Unit(int id, UnitPathInterface *unitpath, const Vec2i &pos, const UnitType
|
||||||
setModelFacing(placeFacing);
|
setModelFacing(placeFacing);
|
||||||
|
|
||||||
Config &config= Config::getInstance();
|
Config &config= Config::getInstance();
|
||||||
showUnitParticles= config.getBool("UnitParticles");
|
showUnitParticles= config.getBool("UnitParticles","true");
|
||||||
|
|
||||||
lastPos= pos;
|
lastPos= pos;
|
||||||
progress= 0;
|
progress= 0;
|
||||||
|
|
|
@ -50,7 +50,7 @@ World::World(){
|
||||||
Config &config= Config::getInstance();
|
Config &config= Config::getInstance();
|
||||||
|
|
||||||
staggeredFactionUpdates = config.getBool("StaggeredFactionUpdates","false");
|
staggeredFactionUpdates = config.getBool("StaggeredFactionUpdates","false");
|
||||||
unitParticlesEnabled=config.getBool("UnitParticles");
|
unitParticlesEnabled=config.getBool("UnitParticles","true");
|
||||||
|
|
||||||
ExploredCellsLookupItemCache.clear();
|
ExploredCellsLookupItemCache.clear();
|
||||||
ExploredCellsLookupItemCacheTimer.clear();
|
ExploredCellsLookupItemCacheTimer.clear();
|
||||||
|
|
Loading…
Reference in New Issue