MCPcopy Create free account
hub / github.com/JRickey/BattleShip / InsertHelpHoverText

Function InsertHelpHoverText

port/gui/UIWidgets.cpp:248–256  ·  view source on GitHub ↗

Adds a "?" next to the previous ImGui item with a custom tooltip

Source from the content-addressed store, hash-verified

246
247// Adds a "?" next to the previous ImGui item with a custom tooltip
248void InsertHelpHoverText(const std::string& text) {
249 ImGui::SameLine();
250 ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "?");
251 if (ImGui::IsItemHovered()) {
252 ImGui::BeginTooltip();
253 ImGui::Text("%s", WrappedText(text, 60).c_str());
254 ImGui::EndTooltip();
255 }
256}
257
258void InsertHelpHoverText(const char* text) {
259 ImGui::SameLine();

Callers

nothing calls this directly

Calls 1

WrappedTextFunction · 0.85

Tested by

no test coverage detected