From 334245183ec7bd9b24a65084cf1715c37400281a Mon Sep 17 00:00:00 2001 From: konstin Date: Tue, 30 Dec 2014 01:23:31 +0100 Subject: [PATCH] finer grained control over the values --- src/utils/debug.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/utils/debug.cpp b/src/utils/debug.cpp index 116d8b9df..45da6db7a 100644 --- a/src/utils/debug.cpp +++ b/src/utils/debug.cpp @@ -602,40 +602,40 @@ bool onEvent(const SEvent &event) else if (cmdID == DEBUG_LIGHT_SETTINGS) { DebugSliderDialog *dsd = new DebugSliderDialog(); - dsd->setSliderHook("red_slider", 0, 255, + dsd->setSliderHook("red_slider", 0, 100, []() { - return findNearestLight()->getColor().X; + return findNearestLight()->getColor().X*100; }, [](int intensity) { LightNode* nearest = findNearestLight(); core::vector3df color = nearest->getColor(); - nearest->setColor(intensity, color.Y, color.Z); + nearest->setColor(intensity/100.0, color.Y, color.Z); } ); - dsd->setSliderHook("green_slider", 0, 255, + dsd->setSliderHook("green_slider", 0, 100, []() { - return findNearestLight()->getColor().Y; + return findNearestLight()->getColor().Y*100; }, [](int intensity) { LightNode* nearest = findNearestLight(); core::vector3df color = nearest->getColor(); - nearest->setColor(color.X, intensity, color.Z); + nearest->setColor(color.X, intensity/100.0, color.Z); } ); - dsd->setSliderHook("blue_slider", 0, 255, + dsd->setSliderHook("blue_slider", 0, 100, []() { - return findNearestLight()->getColor().Z; + return findNearestLight()->getColor().Z*100; }, [](int intensity) { LightNode* nearest = findNearestLight(); core::vector3df color = nearest->getColor(); - nearest->setColor(color.X, color.Y, intensity); + nearest->setColor(color.X, color.Y, intensity/100.0); } ); }