MCPcopy Create free account
hub / github.com/brenocq/implot3d / PushStyleVar

Function PushStyleVar

implot3d.cpp:3077–3087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3075}
3076
3077void PushStyleVar(ImPlot3DStyleVar idx, float val) {
3078 ImPlot3DContext& gp = *GImPlot3D;
3079 const ImPlot3DStyleVarInfo* var_info = GetPlotStyleVarInfo(idx);
3080 if (var_info->Type == ImGuiDataType_Float && var_info->Count == 1) {
3081 float* pvar = (float*)var_info->GetVarPtr(&gp.Style);
3082 gp.StyleModifiers.push_back(ImGuiStyleMod((ImGuiStyleVar)idx, *pvar));
3083 *pvar = val;
3084 return;
3085 }
3086 IM_ASSERT(0 && "Called PushStyleVar() float variant but variable is not a float!");
3087}
3088
3089void PushStyleVar(ImPlot3DStyleVar idx, int val) {
3090 ImPlot3DContext& gp = *GImPlot3D;

Callers 5

ShowLegendContextMenuFunction · 0.85
ColormapSliderFunction · 0.85
ShowMetricsWindowMethod · 0.85
ColormapButtonFunction · 0.85
ShowStyleEditorFunction · 0.85

Calls 2

GetPlotStyleVarInfoFunction · 0.85
GetVarPtrMethod · 0.80

Tested by

no test coverage detected