Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PushStyleVar and PopStyleVar #1609

Closed
El3ctr1cR opened this issue Feb 11, 2018 · 1 comment
Closed

PushStyleVar and PopStyleVar #1609

El3ctr1cR opened this issue Feb 11, 2018 · 1 comment

Comments

@El3ctr1cR
Copy link

El3ctr1cR commented Feb 11, 2018

So I tried to Push a style and pop the style, but when I try to pop it it will not pop it officially, because the style will be everywhere (in other windows, etc)

Code:
` ```
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f));
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
ImGui::PushStyleVar(ImGuiStyleVar_IndentSpacing, ImVec2(0.0f, 0.0f));
ImGui::Text("");
if (ImGui::Button("Tab1", ImVec2(172, 50))) Global::MenuTab = 0;
ImGui::SameLine();
if (ImGui::Button("Tab2", ImVec2(172, 50))) Global::MenuTab = 1;
ImGui::SameLine();
if (ImGui::Button("Tab3", ImVec2(172, 50))) Global::MenuTab = 2;
ImGui::SameLine();
if (ImGui::Button("Tab4", ImVec2(172, 50))) Global::MenuTab = 3;
ImGui::SameLine();
if (ImGui::Button("Tab5", ImVec2(172, 50))) Global::MenuTab = 4;
ImGui::PopStyleVar();
ImGui::End();

@ocornut
Copy link
Owner

ocornut commented Feb 11, 2018

Sorry but #1586

@ocornut ocornut closed this as completed Feb 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants