@@ -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