mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[client] egl: make downscale filter use text input widget
The major/minor pixel size hack is too confusing. This commit replaces that with a text input and a slider.
This commit is contained in:
parent
7045760490
commit
96738ab9d0
@ -217,15 +217,12 @@ static bool egl_filterDownscaleImguiConfig(EGL_Filter * filter)
|
|||||||
igEndCombo();
|
igEndCombo();
|
||||||
}
|
}
|
||||||
|
|
||||||
int majorPixelSize = floor(this->pixelSize);
|
float pixelSize = this->pixelSize;
|
||||||
int minorPixelSize = round((this->pixelSize - majorPixelSize) * 10.0f);
|
igInputFloat("Pixel size", &pixelSize, 0.1f, 1.0f, "%.2f", ImGuiInputTextFlags_CharsDecimal);
|
||||||
|
igSliderFloat("##pixelsize", &pixelSize, 1.0f, 10.0f, "%.2f",
|
||||||
igSliderInt("Major Pixel Size", &majorPixelSize, 1, 10, NULL, 0);
|
ImGuiSliderFlags_Logarithmic | ImGuiSliderFlags_NoInput);
|
||||||
igSliderInt("Minor Pixel Size", &minorPixelSize, 0, 9, NULL, 0);
|
|
||||||
|
|
||||||
float pixelSize = (float)majorPixelSize + (float)minorPixelSize / 10.0f;
|
|
||||||
igText("Pixel Size: %.2f", pixelSize);
|
|
||||||
igText("Resolution: %dx%d", this->width, this->height);
|
igText("Resolution: %dx%d", this->width, this->height);
|
||||||
|
|
||||||
if (pixelSize != this->pixelSize)
|
if (pixelSize != this->pixelSize)
|
||||||
{
|
{
|
||||||
this->pixelSize = pixelSize;
|
this->pixelSize = pixelSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user