03ce3f0009
* Add internal material flag * Add parameters to show\hide internal and transform materials * Filter materials by meshes instead
27 lines
685 B
C++
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;
|
|
};
|
|
|