This commit is contained in:
Бранимир Караџић
2021-04-01 20:09:16 -07:00
parent 117b5ec4ee
commit 0df2e90edb
4 changed files with 88 additions and 60 deletions

View File

@@ -119,6 +119,20 @@ namespace ImGui
;
}
inline void PushEnabled(bool _enabled)
{
extern void PushItemFlag(int option, bool enabled);
PushItemFlag(1<<2 /*ImGuiItemFlags_Disabled*/, !_enabled);
PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * (_enabled ? 1.0f : 0.5f) );
}
inline void PopEnabled()
{
extern void PopItemFlag();
PopItemFlag();
PopStyleVar();
}
} // namespace ImGui
#endif // IMGUI_H_HEADER_GUARD