Let FloatProperty and derived properties render at higher resolution in Onscreen GUI

This commit is contained in:
Alexander Bock
2017-03-13 11:17:52 -04:00
parent d61bb20992
commit 0d157ac165
2 changed files with 16 additions and 10 deletions

View File

@@ -49,7 +49,7 @@ namespace {
const char* KeyPotentialTargets = "PotentialTargets";
const char* KeyFrameConversions = "FrameConversions";
const int InterpolationSteps = 10;
const int InterpolationSteps = 5;
} // namespace
namespace openspace {
@@ -130,7 +130,7 @@ RenderableFov::RenderableFov(const ghoul::Dictionary& dictionary)
: Renderable(dictionary)
, _lineWidth("lineWidth", "Line Width", 1.f, 1.f, 20.f)
, _drawSolid("solidDraw", "Draw as Quads", false)
, _standOffDistance("standOffDistance", "Standoff Distance", 0.9999, 0.999, 1.0)
, _standOffDistance("standOffDistance", "Standoff Distance", 0.9999, 0.99, 1.0, 0.000001)
, _colors({
{
"colors.defaultStart",

View File

@@ -176,7 +176,7 @@ void renderDoubleProperty(properties::Property* prop, const std::string& ownerNa
float min = p->minValue();
float max = p->maxValue();
ImGui::SliderFloat(name.c_str(), &value, min, max);
ImGui::SliderFloat(name.c_str(), &value, min, max, "%.5f");
renderTooltip(prop);
if (value != static_cast<float>(p->value())) {
@@ -299,7 +299,7 @@ void renderFloatProperty(Property* prop, const std::string& ownerName) {
FloatProperty::ValueType value = *p;
float min = p->minValue();
float max = p->maxValue();
ImGui::SliderFloat(name.c_str(), &value, min, max);
ImGui::SliderFloat(name.c_str(), &value, min, max, "%.5f");
renderTooltip(prop);
if (value != p->value()) {
@@ -321,7 +321,8 @@ void renderVec2Property(Property* prop, const std::string& ownerName) {
name.c_str(),
&value.x,
min,
max
max,
"%.5f"
);
renderTooltip(prop);
@@ -349,7 +350,8 @@ void renderVec3Property(Property* prop, const std::string& ownerName) {
name.c_str(),
glm::value_ptr(value),
min,
max
max,
"%.5f"
);
renderTooltip(prop);
@@ -380,7 +382,8 @@ void renderVec4Property(Property* prop, const std::string& ownerName) {
name.c_str(),
&value.x,
min,
max
max,
"%.5f"
);
renderTooltip(prop);
@@ -409,7 +412,8 @@ void renderDVec2Property(Property* prop, const std::string& ownerName) {
name.c_str(),
&value.x,
min,
max
max,
"%.5f"
);
renderTooltip(prop);
@@ -436,7 +440,8 @@ void renderDVec3Property(Property* prop, const std::string& ownerName) {
name.c_str(),
glm::value_ptr(value),
min,
max
max,
"%.5f"
);
renderTooltip(prop);
@@ -467,7 +472,8 @@ void renderDVec4Property(Property* prop, const std::string& ownerName) {
name.c_str(),
&value.x,
min,
max
max,
"%.5f"
);
renderTooltip(prop);