Skip to content

Commit

Permalink
VOXEDIT: fixed ImGuiInputTextFlags_EnterReturnsTrue usage for InputFl…
Browse files Browse the repository at this point in the history
…oat3

there is a new assert stating that this isn't supported
  • Loading branch information
mgerhardy committed Oct 20, 2024
1 parent f75c0c3 commit 16618bc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/tools/voxedit/modules/voxedit-ui/NodeInspectorPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ void NodeInspectorPanel::sceneView(command::CommandExecutionListener &listener)
ImGui::CheckboxVar(_("Auto Keyframe"), cfg::VoxEditAutoKeyFrame);

bool change = false;
change |= ImGui::InputFloat3(_("Tr"), glm::value_ptr(matrixTranslation), "%.3f",
ImGuiInputTextFlags_EnterReturnsTrue);
ImGui::InputFloat3(_("Tr"), glm::value_ptr(matrixTranslation), "%.3f");
change |= ImGui::IsItemDeactivatedAfterEdit();
if (_localSpace->boolVal()) {
ImGui::SameLine();
if (ImGui::Button(ICON_LC_X "##resettr")) {
Expand All @@ -240,7 +240,8 @@ void NodeInspectorPanel::sceneView(command::CommandExecutionListener &listener)
}

glm::vec3 matrixRotation = glm::degrees(glm::eulerAngles(matrixOrientation));
change |= ImGui::InputFloat3(_("Rt"), glm::value_ptr(matrixRotation), "%.3f", ImGuiInputTextFlags_EnterReturnsTrue);
ImGui::InputFloat3(_("Rt"), glm::value_ptr(matrixRotation), "%.3f");
change |= ImGui::IsItemDeactivatedAfterEdit();
if (_localSpace->boolVal()) {
ImGui::SameLine();
if (ImGui::Button(ICON_LC_X "##resetrt")) {
Expand All @@ -250,7 +251,8 @@ void NodeInspectorPanel::sceneView(command::CommandExecutionListener &listener)
ImGui::TooltipTextUnformatted(_("Reset"));
}

change |= ImGui::InputFloat3(_("Sc"), glm::value_ptr(matrixScale), "%.3f", ImGuiInputTextFlags_EnterReturnsTrue);
ImGui::InputFloat3(_("Sc"), glm::value_ptr(matrixScale), "%.3f");
change |= ImGui::IsItemDeactivatedAfterEdit();
if (_localSpace->boolVal()) {
ImGui::SameLine();
if (ImGui::Button(ICON_LC_X "##resetsc")) {
Expand All @@ -261,8 +263,8 @@ void NodeInspectorPanel::sceneView(command::CommandExecutionListener &listener)
}

glm::vec3 pivot = node.pivot();
bool pivotChanged =
ImGui::InputFloat3(_("Pv"), glm::value_ptr(pivot), "%.3f", ImGuiInputTextFlags_EnterReturnsTrue);
ImGui::InputFloat3(_("Pv"), glm::value_ptr(pivot), "%.3f");
bool pivotChanged = ImGui::IsItemDeactivatedAfterEdit();
change |= pivotChanged;
ImGui::SameLine();
if (ImGui::Button(ICON_LC_X "##resetpv")) {
Expand Down

0 comments on commit 16618bc

Please sign in to comment.