impr: Only allow scaling factors between 0.1x and 4.0x with slider
The old scaling values can still be entered by ctrl-clicking the slider and entering it manually
This commit is contained in:
parent
91a0be2d78
commit
c1561c7b6a
@ -177,7 +177,12 @@ namespace hex::plugin::builtin {
|
|||||||
return "x%.1f";
|
return "x%.1f";
|
||||||
}();
|
}();
|
||||||
|
|
||||||
bool changed = ImGui::SliderFloat(name.data(), &m_value, 0, 10, format.c_str(), ImGuiSliderFlags_AlwaysClamp);
|
bool changed = ImGui::SliderFloat(name.data(), &m_value, 0, 4, format.c_str());
|
||||||
|
|
||||||
|
if (m_value < 0)
|
||||||
|
m_value = 0;
|
||||||
|
else if (m_value > 10)
|
||||||
|
m_value = 10;
|
||||||
|
|
||||||
if (ImHexApi::Fonts::getCustomFontPath().empty() && (u32(m_value * 10) % 10) != 0) {
|
if (ImHexApi::Fonts::getCustomFontPath().empty() && (u32(m_value * 10) % 10) != 0) {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
Loading…
Reference in New Issue
Block a user