Skip to content

Commit

Permalink
#5532: Map type selection
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Mar 20, 2021
1 parent 9e198da commit 915fc72
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions radiant/ui/materials/MaterialEditor.cpp
Expand Up @@ -462,6 +462,18 @@ void MaterialEditor::setupMaterialStageProperties()
mapTypeDropdown->Append(_(SPECIAL_MAP_TYPE));
mapTypeDropdown->Bind(wxEVT_CHOICE, &MaterialEditor::_onStageMapTypeChanged, this);

auto mapTypeNotSpecial = getControl<wxRadioButton>("MaterialStageMapTypeNotSpecial");
mapTypeNotSpecial->Bind(wxEVT_RADIOBUTTON, [this, mapTypeDropdown](wxCommandEvent& ev)
{
auto stage = getEditableStageForSelection();

if (stage && ev.IsChecked())
{
stage->setMapType(IShaderLayer::MapType::Map);
updateStageControls();
}
});

// Texture
setupStageFlag("MaterialStageFilterNearest", IShaderLayer::FLAG_FILTER_NEAREST);
setupStageFlag("MaterialStageFilterLinear", IShaderLayer::FLAG_FILTER_LINEAR);
Expand Down

0 comments on commit 915fc72

Please sign in to comment.