light/modules/mirror/public/panels/properties.hpp

34 lines
625 B
C++
Raw Normal View History

#pragma once
2025-07-11 01:16:52 +03:30
#include <ecs/entity.hpp>
#include <math/vec3.hpp>
2025-07-20 04:46:15 +03:30
#include <mirror/panels/panel.hpp>
2025-07-11 00:05:48 +03:30
namespace lt {
2022-03-06 22:25:23 +03:30
class PropertiesPanel: public Panel
{
public:
2025-07-05 13:28:41 +03:30
PropertiesPanel() = default;
void on_user_interface_update();
2025-07-06 15:10:34 +03:30
void set_entity_context(const Entity &entity);
2022-03-06 22:25:23 +03:30
private:
void draw_vec3_control(
2025-07-05 13:28:41 +03:30
const std::string &label,
math::vec3 &values,
2025-07-06 15:10:34 +03:30
float reset_value = 0.0f,
float column_width = 100.0f
2025-07-05 13:28:41 +03:30
);
2022-03-06 22:25:23 +03:30
template<typename ComponentType, typename UIFunction>
void draw_component(const std::string &name, Entity entity, UIFunction function);
Entity m_entity_context;
2022-03-06 22:25:23 +03:30
};
2025-07-11 00:05:48 +03:30
} // namespace lt