Solving a few warnings
This commit is contained in:
		@ -38,6 +38,6 @@ libdirs {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
files { 
 | 
			
		||||
  "./src/*.h",
 | 
			
		||||
  "./src/*.cpp"
 | 
			
		||||
  "./src/**.h",
 | 
			
		||||
  "./src/**.cpp"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -57,6 +57,7 @@ namespace YAML {
 | 
			
		||||
				return false;
 | 
			
		||||
			rhs.setName(node["Project"].as<std::string>());
 | 
			
		||||
			rhs.setProjectDirectory(node["Directory"].as<std::string>());
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -47,17 +47,17 @@ void Inspector(entt::entity ent , Scene& scene) {
 | 
			
		||||
        ImGui::NewLine();
 | 
			
		||||
        
 | 
			
		||||
        auto component = entity.GetComponent<IdentifierComponent>();
 | 
			
		||||
        char* buf = new char(component.name.length());
 | 
			
		||||
        char* buf = new char(component.name.size());
 | 
			
		||||
        strcpy(buf, component.name.c_str());
 | 
			
		||||
        ImGui::InputText("Name:",buf , IM_ARRAYSIZE(buf), ImGuiInputTextFlags_ReadOnly);
 | 
			
		||||
        ImGui::InputText("Name:",buf , sizeof(buf), ImGuiInputTextFlags_ReadOnly);
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        if (entity.HasComponent<TransformComponent>()) {
 | 
			
		||||
            auto& transform = entity.GetComponent<TransformComponent>();
 | 
			
		||||
            if (ImGui::CollapsingHeader("Transform", ImGuiTreeNodeFlags_DefaultOpen)) {
 | 
			
		||||
                ImGui::DragFloat3("Position", glm::value_ptr(transform.Position), 0.01);
 | 
			
		||||
                ImGui::DragFloat3("Rotation", glm::value_ptr(transform.Rotation), 0.01);
 | 
			
		||||
                ImGui::DragFloat3("Scale", glm::value_ptr(transform.Scale), 0.01, 0);
 | 
			
		||||
                ImGui::DragFloat3("Position", glm::value_ptr(transform.Position), 0.01f);
 | 
			
		||||
                ImGui::DragFloat3("Rotation", glm::value_ptr(transform.Rotation), 0.01f);
 | 
			
		||||
                ImGui::DragFloat3("Scale", glm::value_ptr(transform.Scale), 0.01f, 0.0f);
 | 
			
		||||
            }
 | 
			
		||||
                
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user