ImTricks is a collection of useful functions for expanding / improving the functionality of the ImGui.
At the moment it has in itself:
- Functions to speed up the creation of animations.
- Functions for creating and displaying notifications.
- Widgets that are missing in the standard ImGui.
- A customized ImColor structure with an additional constructor from the HEX HTML color code and a method for obtaining HEX HTML from an already existing color.
void RenderMyGUI() {
...
if (ImGui::Button("Create Notify", { 120, 25 }))
ImTricks::NotifyManager::AddNotify("The notification was displayed successfully.", ImTrickNotify_Success);
...
ImTricks::NotifyManager::HandleNotifies(ImGui::GetOverlayDrawList());
}
void RenderMyGUI() {
...
ImGui::Checkbox("Enable Animation", &enable_animation);
float trickFloat = ImTricks::Animations::FastFloatLerp("header", enable_animation, 0.f, 1.f, 0.05f);
ImVec2 pos1 = ImTricks::Animations::FastImVec2Lerp("pos1", enable_animation, ImVec2(0, 50), ImVec2(100, 50), 5);
ImVec2 pos2 = ImTricks::Animations::FastImVec2Lerp("pos2", enable_animation, ImVec2(413, 80), ImVec2(513, 80), 5);
draw->AddRectFilled(p + pos1, p + pos2, ImTricks::Animations::FastColorLerp(ImColor(255, 0, 0), ImColor(0, 255, 0), trickFloat));
...
}
grMVvxMRqo.mp4
void RenderMyGUI() {
...
static ImColor col = ImColor(23, 23, 23);
ImTricks::Widgets::ColorEdit4("test", col, NULL);
static ImTrickyColor col2 = ImColor(23, 23, 23);
ImTricks::Widgets::ColorEdit4("test2", col2, NULL);
...
}
void RenderMyGUI() {
...
ImTrickyColor color = ImTrickyColor("#eb4034ff");
ImGui::Text(color.HTML().c_str());
...
}