MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / PushStyleVar

Method PushStyleVar

KBotExt/imgui/imgui.cpp:3131–3143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3129}
3130
3131void ImGui::PushStyleVar(ImGuiStyleVar idx, float val)
3132{
3133 ImGuiContext& g = *GImGui;
3134 const ImGuiDataVarInfo* var_info = GetStyleVarInfo(idx);
3135 if (var_info->Type == ImGuiDataType_Float && var_info->Count == 1)
3136 {
3137 float* pvar = (float*)var_info->GetVarPtr(&g.Style);
3138 g.StyleVarStack.push_back(ImGuiStyleMod(idx, *pvar));
3139 *pvar = val;
3140 return;
3141 }
3142 IM_ASSERT_USER_ERROR(0, "Called PushStyleVar() variant with wrong type!");
3143}
3144
3145void ImGui::PushStyleVar(ImGuiStyleVar idx, const ImVec2& val)
3146{

Callers

nothing calls this directly

Calls 2

ImGuiStyleModClass · 0.85
GetVarPtrMethod · 0.80

Tested by

no test coverage detected