#include "Style.h" #include Style::Style(std::unordered_map stylesFloat, std::unordered_map stylesVec2, std::unordered_map colors) { this->stylesFloat = stylesFloat; this->stylesVec2 = stylesVec2; this->colors = colors; } void Style::Push() { for (auto style : stylesFloat) { ImGui::PushStyleVar(style.first, style.second); } for (auto style : stylesVec2) { ImGui::PushStyleVar(style.first, style.second); } for (auto color : colors) { ImGui::PushStyleColor(color.first, color.second); } } void Style::Pop() { ImGui::PopStyleColor(colors.size()); ImGui::PopStyleVar(stylesVec2.size()); ImGui::PopStyleVar(stylesFloat.size()); }