mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-25 23:13:39 +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();
|
||||
}
|
||||
|
||||
int majorPixelSize = floor(this->pixelSize);
|
||||
int minorPixelSize = round((this->pixelSize - majorPixelSize) * 10.0f);
|
||||
|
||||
igSliderInt("Major Pixel Size", &majorPixelSize, 1, 10, NULL, 0);
|
||||
igSliderInt("Minor Pixel Size", &minorPixelSize, 0, 9, NULL, 0);
|
||||
|
||||
float pixelSize = (float)majorPixelSize + (float)minorPixelSize / 10.0f;
|
||||
igText("Pixel Size: %.2f", pixelSize);
|
||||
float pixelSize = this->pixelSize;
|
||||
igInputFloat("Pixel size", &pixelSize, 0.1f, 1.0f, "%.2f", ImGuiInputTextFlags_CharsDecimal);
|
||||
igSliderFloat("##pixelsize", &pixelSize, 1.0f, 10.0f, "%.2f",
|
||||
ImGuiSliderFlags_Logarithmic | ImGuiSliderFlags_NoInput);
|
||||
igText("Resolution: %dx%d", this->width, this->height);
|
||||
|
||||
if (pixelSize != this->pixelSize)
|
||||
{
|
||||
this->pixelSize = pixelSize;
|
||||
|
Loading…
Reference in New Issue
Block a user