Skip to content

Commit c209e5b

Browse files
committed
userfriendly
1 parent ce78f23 commit c209e5b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/frontend/explorer/ParameterWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void ParameterWidget::onRender(Widget*)
137137
changed = true;
138138

139139
const char* current_method = ToneMappingMethodOptions[(int)parameters.ToneMappingMethod];
140-
if (ImGui::BeginCombo("Method", current_method)) {
140+
if (ImGui::BeginCombo("Tonemap", current_method)) {
141141
for (int i = 0; i < IM_ARRAYSIZE(ToneMappingMethodOptions); ++i) {
142142
bool is_selected = (current_method == ToneMappingMethodOptions[i]);
143143
if (ImGui::Selectable(ToneMappingMethodOptions[i], is_selected)) {

src/frontend/ui/PropertyView.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ bool ui_property_view(Runtime* runtime, bool readonly)
245245
} else {
246246
ImGui::Text("%i", value);
247247
}
248+
249+
if (!param.second.Description.empty())
250+
ImGui::SetItemTooltip("%s", param.second.Description.c_str());
248251
}
249252

250253
// Content (Float)
@@ -271,6 +274,9 @@ bool ui_property_view(Runtime* runtime, bool readonly)
271274
} else {
272275
ImGui::Text("%.3f", value);
273276
}
277+
278+
if (!param.second.Description.empty())
279+
ImGui::SetItemTooltip("%s", param.second.Description.c_str());
274280
}
275281

276282
// Content (Vector)
@@ -293,6 +299,9 @@ bool ui_property_view(Runtime* runtime, bool readonly)
293299
} else {
294300
ImGui::Text("[%.3f, %.3f, %.3f]", value.x(), value.y(), value.z());
295301
}
302+
303+
if (!param.second.Description.empty())
304+
ImGui::SetItemTooltip("%s", param.second.Description.c_str());
296305
}
297306

298307
// Content (Color)
@@ -308,6 +317,9 @@ bool ui_property_view(Runtime* runtime, bool readonly)
308317

309318
if (ImGui::ColorEdit4(param.first.c_str(), value.data(), ColorFlags | (!readonly ? ImGuiColorEditFlags_NoInputs : 0)))
310319
updated = true;
320+
321+
if (!param.second.Description.empty())
322+
ImGui::SetItemTooltip("%s", param.second.Description.c_str());
311323
}
312324

313325
// Content (String)
@@ -328,6 +340,9 @@ bool ui_property_view(Runtime* runtime, bool readonly)
328340
} else {
329341
ImGui::TextUnformatted(value.c_str());
330342
}
343+
344+
if (!param.second.Description.empty())
345+
ImGui::SetItemTooltip("%s", param.second.Description.c_str());
331346
}
332347

333348
ImGui::EndTable();

0 commit comments

Comments
 (0)