mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-04 11:35:06 +03:00
pp
This commit is contained in:
@@ -50,6 +50,15 @@ public:
|
||||
ComponentTableReset(component.HasCollisions, true);
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
ImGui::Text("Auto Rebuild");
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGui::Checkbox("##AutoRebuild", &component.AutoRebuild);
|
||||
ImGui::TableNextColumn();
|
||||
ComponentTableReset(component.AutoRebuild, false);
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
ImGui::Text("Build");
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
@@ -14,13 +14,14 @@ namespace Nuake {
|
||||
std::string Path;
|
||||
float ScaleFactor = 1.0f;
|
||||
bool HasCollisions = false;
|
||||
bool AutoRebuild = false;
|
||||
|
||||
json Serialize()
|
||||
{
|
||||
BEGIN_SERIALIZE();
|
||||
SERIALIZE_VAL(HasCollisions);
|
||||
SERIALIZE_VAL(Path);
|
||||
|
||||
SERIALIZE_VAL(AutoRebuild);
|
||||
for (unsigned int i = 0; i < m_Meshes.size(); i++)
|
||||
{
|
||||
j["Meshes"][i] = m_Meshes[i]->Serialize();
|
||||
@@ -32,6 +33,11 @@ namespace Nuake {
|
||||
bool Deserialize(std::string str)
|
||||
{
|
||||
BEGIN_DESERIALIZE();
|
||||
if (j.contains("AutoRebuild"))
|
||||
{
|
||||
this->AutoRebuild = j["AutoRebuild"];
|
||||
}
|
||||
|
||||
this->Path = j["Path"];
|
||||
this->HasCollisions = j["HasCollisions"];
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user