Skip to content

Commit

Permalink
#6048: Wire up select button to choose the material of the test room
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Jul 31, 2022
1 parent d2dd67f commit f7a228d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions radiant/ui/materials/editor/MaterialEditor.cpp
Expand Up @@ -38,6 +38,7 @@
#include "CheckBoxBinding.h"
#include "MapExpressionEntry.h"
#include "TexturePreview.h"
#include "ui/common/ShaderChooser.h"

namespace ui
{
Expand Down Expand Up @@ -325,6 +326,14 @@ void MaterialEditor::setupPreviewLightProperties(wxWindow* previewPanel)
{
_preview->resetLightColour();
});

getControl<wxButton>("MaterialPreviewRoomMaterialButton")->Bind(wxEVT_BUTTON, [this](wxCommandEvent& ev)
{
auto textCtrl = getControl<wxTextCtrl>("MaterialPreviewRoomMaterial");
auto selector = new ShaderChooser(this, ShaderSelector::TextureFilter::Regular, textCtrl);
selector->ShowModal();
selector->Destroy();
});
}

void MaterialEditor::_onReloadImages(wxCommandEvent& ev)
Expand Down

0 comments on commit f7a228d

Please sign in to comment.