Files
WickedEngine/Editor/MaterialPickerWindow.h
T
Stanislav Denisov 03ce3f0009 Add parameters to show\hide mesh and internal materials (#1240)
* Add internal material flag

* Add parameters to show\hide internal and transform materials

* Filter materials by meshes instead
2025-10-16 07:48:17 +02:00

27 lines
685 B
C++

#pragma once
class EditorComponent;
class MaterialPickerWindow : public wi::gui::Window
{
public:
void Create(EditorComponent* editor);
EditorComponent* editor = nullptr;
std::deque<wi::gui::Button> buttons;
wi::gui::Slider zoomSlider;
wi::gui::CheckBox showMeshMaterialCheckBox;
wi::gui::CheckBox showInternalMaterialCheckBox;
void ResizeLayout() override;
// Recreating buttons shouldn't be done every frame because interaction states need multi-frame execution
void RecreateButtons();
private:
bool ShouldShowMaterial(const wi::scene::MaterialComponent& material, wi::ecs::Entity entity) const;
bool MaterialIsUsedInMesh(wi::ecs::Entity materialEntity) const;
};