33 lines
		
	
	
	
		
			625 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			625 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#pragma once
 | 
						|
 | 
						|
#include <ecs/entity.hpp>
 | 
						|
#include <math/vec3.hpp>
 | 
						|
#include <mirror/panels/panel.hpp>
 | 
						|
 | 
						|
namespace lt {
 | 
						|
 | 
						|
class PropertiesPanel: public Panel
 | 
						|
{
 | 
						|
public:
 | 
						|
	PropertiesPanel() = default;
 | 
						|
 | 
						|
	void on_user_interface_update();
 | 
						|
 | 
						|
	void set_entity_context(const Entity &entity);
 | 
						|
 | 
						|
private:
 | 
						|
	void draw_vec3_control(
 | 
						|
	    const std::string &label,
 | 
						|
	    math::vec3 &values,
 | 
						|
	    float reset_value = 0.0f,
 | 
						|
	    float column_width = 100.0f
 | 
						|
	);
 | 
						|
 | 
						|
	template<typename ComponentType, typename UIFunction>
 | 
						|
	void draw_component(const std::string &name, Entity entity, UIFunction function);
 | 
						|
 | 
						|
	Entity m_entity_context;
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
} // namespace lt
 |