mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-16 21:38:07 -04:00
Copy cleanups (#1932)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user