mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-12-05 03:33:27 +01:00
add float and double support for the scalar range widget
This commit is contained in:
parent
9b53c72826
commit
5ee0b7017f
@ -44,5 +44,16 @@ namespace MM::ImGuiWidgets {
|
||||
return DragScalarRange2EXT(label, ImGuiDataType_S64, &range.min(), &range.max(), 0.1f, v_min, v_max);
|
||||
}
|
||||
|
||||
// float, double
|
||||
template<>
|
||||
bool DragScalarRange2(const char* label, ScalarRange2<float>& range, float v_min , float v_max) {
|
||||
return DragScalarRange2EXT(label, ImGuiDataType_Float, &range.min(), &range.max(), 0.1f, v_min, v_max);
|
||||
}
|
||||
|
||||
template<>
|
||||
bool DragScalarRange2(const char* label, ScalarRange2<double>& range, double v_min , double v_max) {
|
||||
return DragScalarRange2EXT(label, ImGuiDataType_Double, &range.min(), &range.max(), 0.1f, v_min, v_max);
|
||||
}
|
||||
|
||||
} // MM::ImGuiWidgets
|
||||
|
||||
|
@ -69,7 +69,11 @@ namespace MM::ImGuiWidgets {
|
||||
template<>
|
||||
bool DragScalarRange2(const char* label, ScalarRange2<int64_t>& range, int64_t v_min , int64_t v_max);
|
||||
|
||||
// TODO: float, double
|
||||
// float, double
|
||||
template<>
|
||||
bool DragScalarRange2(const char* label, ScalarRange2<float>& range, float v_min , float v_max);
|
||||
template<>
|
||||
bool DragScalarRange2(const char* label, ScalarRange2<double>& range, double v_min , double v_max);
|
||||
|
||||
} // MM::ImGuiWidgets
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user