84 ImGuiIO& io = ImGui::GetIO();
88 ImVec2 pos(io.DisplaySize.x - 16.f, 48.f);
106 text_color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
111 text_color = ImVec4(0.0f, 0.0f, 0.0f, 1.0f);
116 text_color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
120 ImGui::SetNextWindowBgAlpha(bg.w);
121 ImGui::SetNextWindowPos(pos, ImGuiCond_Always, ImVec2(1.f, 0.f));
122 ImGuiWindowFlags flags =
123 ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_AlwaysAutoResize |
124 ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoNav |
125 ImGuiWindowFlags_NoFocusOnAppearing;
128 {{ImGuiCol_WindowBg, bg}, {ImGuiCol_Text, text_color}});
130 {{ImGuiStyleVar_WindowRounding, 6.0f},
131 {ImGuiStyleVar_WindowPadding, ImVec2(12.0f, 8.0f)}});
134 char window_name[32];
135 snprintf(window_name,
sizeof(window_name),
"##toast_%p", (
void*)&t);
137 if (ImGui::Begin(window_name,
nullptr, flags)) {
138 ImGui::TextUnformatted(t.
message.c_str());
148 pos.y += ImGui::GetItemRectSize().y + 8.f;