223 {
225
226 T f = std::any_cast<T>(value.value.paramValue);
227 T df = std::any_cast<T>(value.defaultValue.paramValue);
228
230 if (value.hasMinValue) minf = std::any_cast<T>(value.min.paramValue);
232 if (value.hasMaxValue) maxf = std::any_cast<T>(value.max.paramValue);
233
234 bool moved = false;
237 "##",
238 data_type,
239 &f,
240 components,
241 0.01f,
242 (const void*)&minf,
243 (const void*)&maxf,
244 format
245 ))
246 {
247 value.value.paramValue =
f;
248 material->UpdateMaterial();
249 moved = true;
250 }
251
252 ImGui::PopItemWidth();
253 ImGui::SameLine();
255 {
256 value.value.paramValue = df;
257 material->UpdateMaterial();
258 moved = true;
259 }
260
261 return moved;
262 }
#define SPICES_PROFILE_ZONE
static bool S_DragScalarN(const char *label, ImGuiDataType data_type, void *p_data, int components, float v_speed=1.0f, const void *p_min=NULL, const void *p_max=NULL, const char *format=NULL, ImGuiSliderFlags flags=0)
Draw Drag Scale with different p_min p_max.
static ImVec2 GetLineItemSize()
Get Line Width's Square Size.
static bool DrawResetIcon(const bool &isMove)
Draw Reset Icon.