MCPcopy Create free account
hub / github.com/RenderKit/embree / PushStyleVar

Method PushStyleVar

tutorials/common/imgui/imgui.cpp:3007–3019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3005}
3006
3007void ImGui::PushStyleVar(ImGuiStyleVar idx, float val)
3008{
3009 const ImGuiStyleVarInfo* var_info = GetStyleVarInfo(idx);
3010 if (var_info->Type == ImGuiDataType_Float && var_info->Count == 1)
3011 {
3012 ImGuiContext& g = *GImGui;
3013 float* pvar = (float*)var_info->GetVarPtr(&g.Style);
3014 g.StyleVarStack.push_back(ImGuiStyleMod(idx, *pvar));
3015 *pvar = val;
3016 return;
3017 }
3018 IM_ASSERT(0 && "Called PushStyleVar() float variant but variable is not a float!");
3019}
3020
3021void ImGui::PushStyleVar(ImGuiStyleVar idx, const ImVec2& val)
3022{

Callers

nothing calls this directly

Calls 4

GetStyleVarInfoFunction · 0.85
ImGuiStyleModClass · 0.85
GetVarPtrMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected