Save decorations and gravity field drawing to prefs
This commit is contained in:
parent
99b2d8d67d
commit
df26523e10
@ -51,6 +51,9 @@ GameModel::GameModel():
|
|||||||
std::vector<unsigned int> renderModes(tempArray.begin(), tempArray.end());
|
std::vector<unsigned int> renderModes(tempArray.begin(), tempArray.end());
|
||||||
ren->SetRenderMode(renderModes);
|
ren->SetRenderMode(renderModes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ren->gravityFieldEnabled = Client::Ref().GetPrefBool("Renderer.GravityField", false);
|
||||||
|
ren->decorations_enable = Client::Ref().GetPrefBool("Renderer.Decorations", true);
|
||||||
}
|
}
|
||||||
catch(json::Exception & e)
|
catch(json::Exception & e)
|
||||||
{
|
{
|
||||||
@ -98,6 +101,9 @@ GameModel::~GameModel()
|
|||||||
std::vector<unsigned int> renderModes = ren->GetRenderMode();
|
std::vector<unsigned int> renderModes = ren->GetRenderMode();
|
||||||
Client::Ref().SetPref("Renderer.RenderModes", std::vector<unsigned int>(renderModes.begin(), renderModes.end()));
|
Client::Ref().SetPref("Renderer.RenderModes", std::vector<unsigned int>(renderModes.begin(), renderModes.end()));
|
||||||
|
|
||||||
|
Client::Ref().SetPref("Renderer.GravityField", (bool)ren->gravityFieldEnabled);
|
||||||
|
Client::Ref().SetPref("Renderer.Decorations", (bool)ren->decorations_enable);
|
||||||
|
|
||||||
Client::Ref().SetPref("Simulation.EdgeMode", sim->edgeMode);
|
Client::Ref().SetPref("Simulation.EdgeMode", sim->edgeMode);
|
||||||
|
|
||||||
Client::Ref().SetPref("Decoration.Red", (int)colour.Red);
|
Client::Ref().SetPref("Decoration.Red", (int)colour.Red);
|
||||||
|
Loading…
Reference in New Issue
Block a user