| 1178 | } |
| 1179 | |
| 1180 | void ImGuiFullscreen::RenderTextClippedWithShadow(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, |
| 1181 | const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align, const ImRect* clip_rect) |
| 1182 | { |
| 1183 | ImFont* font = ImGui::GetFont(); |
| 1184 | const float font_size = ImGui::GetFontSize(); |
| 1185 | ImDrawList* dl = ImGui::GetWindowDrawList(); |
| 1186 | const ImVec2 text_size = text_size_if_known ? *text_size_if_known : |
| 1187 | font->CalcTextSizeA(font_size, FLT_MAX, 0.0f, text, text_end); |
| 1188 | |
| 1189 | ImVec2 pos = pos_min; |
| 1190 | if (align.x > 0.0f) |
| 1191 | pos.x = ImMax(pos.x, pos_min.x + (pos_max.x - pos_min.x - text_size.x) * align.x); |
| 1192 | if (align.y > 0.0f) |
| 1193 | pos.y = ImMax(pos.y, pos_min.y + (pos_max.y - pos_min.y - text_size.y) * align.y); |
| 1194 | |
| 1195 | const ImVec2& clip_min = clip_rect ? clip_rect->Min : pos_min; |
| 1196 | const ImVec2& clip_max = clip_rect ? clip_rect->Max : pos_max; |
| 1197 | dl->PushClipRect(clip_min, clip_max, true); |
| 1198 | AddTextWithShadow(dl, std::pair<ImFont*, float>(font, font_size), pos, ImGui::GetColorU32(ImGuiCol_Text), text, text_end, 0.0f, nullptr, |
| 1199 | IM_COL32(0, 0, 0, 64), true); |
| 1200 | dl->PopClipRect(); |
| 1201 | } |
| 1202 | |
| 1203 | void ImGuiFullscreen::DrawWindowTitle(const char* title) |
| 1204 | { |
nothing calls this directly
no test coverage detected