Added option to choose mirror or repeat texture on source

This commit is contained in:
brunoherbelin
2021-03-18 19:43:51 +01:00
parent 0de1b87028
commit dd9c8ac0b8
7 changed files with 36 additions and 8 deletions

View File

@@ -828,6 +828,16 @@ void TextureView::draw()
ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.36f, 0.36f, 0.36f, 0.44f));
Source *s = Mixer::manager().currentSource();
if (s != nullptr) {
if (s->textureMirrored()) {
if (ImGui::Selectable( ICON_FA_TH " Repeat " ))
s->setTextureMirrored(false);
} else {
if (ImGui::Selectable( ICON_FA_TH " Mirror " ))
s->setTextureMirrored(true);
}
ImGui::Separator();
if (ImGui::Selectable( ICON_FA_VECTOR_SQUARE " Reset" )){
s->group(mode_)->scale_ = glm::vec3(1.f);
s->group(mode_)->rotation_.z = 0;