
class PropertiesPannel : DockPanel {
    float slider = 0;
    vec3 slid;
    vec3 slid2;

    void onRender() {
        Entity entity = activeEntity;

        // We don't want to change root options
        if (entity.isRoot)
            return;
        // NAME
        // -------
        // Id:0      [+ add component]
        UI::title(entity.name);
        if (!entity.isRoot)
            UI::contextItemPopup("##MenuOptions", any(entity), ReciverFunc(this.renameEntityMenu));
        UI::separator();
        UI::textColor(0.5, 0.5, 0.5f, "Id : " + entity.id);


        UI::sameline();
        if (UI::buttonEnd("Add Component")) {
            UI::openPopup("ADD_COMPONENT", any(entity));
        }

        UI::space();

        UI::componentNode("Transform Component", any(entity), renderTransformComponent);
        
        if (entity.hasMeshComponent()) {
            UI::componentNode_contextMenu("Mesh Component", any(entity), renderMeshComponent, removeMeshComponent);
        }

        if (entity.hasShaderComponent()) {
            UI::componentNode_contextMenu("Shader Component", any(entity), renderShaderComponent, removeShaderComponent);
        }
        
        if (entity.hasCameraComponent()) {
            UI::componentNode_contextMenu("Camera Component", any(entity), renderCameraComponent, removeCameraComponent);
        }
        
        
        UI::space();
        
        UI::separator();

        if (UI::buttonCenter("Add Component##2")) {
            UI::openPopup("ADD_COMPONENT", any(entity));
        }

        UI::simplePopup("ADD_COMPONENT", addComponentPopup);
        UI::modalPopup("Rename entity", renameEntity);
    }
    
    void renameEntityMenu(any@ data) {
        Entity entity;
        data.retrieve(entity);

        if (!entity.isRoot) {
            if (UI::menuItem("Rename")) {
                UI::openPopup("Rename entity", data);
            }
        }
    }

}