mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-29 18:40:06 +00:00
Add tooltip to NO DATA AVAILABLE indication
This commit is contained in:
parent
2beac20ee3
commit
403a556b30
1 changed files with 14 additions and 0 deletions
|
|
@ -573,6 +573,20 @@ void OverlayLayer::Impl::RenderProductDetails(
|
|||
ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(255, 0, 0, 255));
|
||||
ImGui::TextUnformatted("NO DATA AVAILABLE");
|
||||
ImGui::PopStyleColor();
|
||||
if (ImGui::BeginItemTooltip())
|
||||
{
|
||||
static constexpr float kFontSizeFactor_ = 20.0f;
|
||||
static constexpr double kMaxWidthPercent_ = 0.8;
|
||||
|
||||
ImGui::PushTextWrapPos(
|
||||
std::min(ImGui::GetFontSize() * kFontSizeFactor_,
|
||||
static_cast<float>(params.width * kMaxWidthPercent_)));
|
||||
ImGui::TextUnformatted(
|
||||
"No data found for the selected product and time. Please select a "
|
||||
"different product, or update your time selection.");
|
||||
ImGui::PopTextWrapPos();
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue