Copy cleanups (#1932)

This commit is contained in:
louist103
2022-12-07 00:28:35 -05:00
committed by GitHub
parent 8337e4e24f
commit 31947cd51b
3 changed files with 67 additions and 113 deletions
+18
View File
@@ -75,6 +75,14 @@ namespace UIWidgets {
}
}
void SetLastItemHoverText(const char* text) {
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::Text("%s", WrappedText(text, 60));
ImGui::EndTooltip();
}
}
// Adds a "?" next to the previous ImGui item with a custom tooltip
void InsertHelpHoverText(const std::string& text) {
ImGui::SameLine();
@@ -86,6 +94,16 @@ namespace UIWidgets {
}
}
void InsertHelpHoverText(const char* text) {
ImGui::SameLine();
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "?");
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::Text("%s", WrappedText(text, 60));
ImGui::EndTooltip();
}
}
// MARK: - UI Elements