Skip to content

Commit

Permalink
replace SetTooltip with CustomTooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Noy-Zini committed Jan 8, 2025
1 parent fd02c62 commit 6c2341b
Show file tree
Hide file tree
Showing 12 changed files with 174 additions and 203 deletions.
17 changes: 9 additions & 8 deletions common/calibration-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "device-model.h"
#include "os.h"
#include "ux-window.h"
#include <realsense_imgui.h>

#include "../src/ds/d400/d400-private.h"

Expand Down Expand Up @@ -176,7 +177,7 @@ void calibration_model::update(ux_window& window, std::string& error_message)
if (ImGui::IsItemHovered())
{
window.link_hovered();
ImGui::SetTooltip("%s", "Load calibration from file");
RsImGui::CustomTooltip("%s", "Load calibration from file");
}
ImGui::SameLine();
if (ImGui::Button(u8"\uF0C7 Save As...", ImVec2(100, 30)))
Expand Down Expand Up @@ -232,7 +233,7 @@ void calibration_model::update(ux_window& window, std::string& error_message)
if (ImGui::IsItemHovered())
{
window.link_hovered();
ImGui::SetTooltip("%s", "Save calibration image to file");
RsImGui::CustomTooltip("%s", "Save calibration image to file");
}
ImGui::SameLine();
if (_accept)
Expand Down Expand Up @@ -263,7 +264,7 @@ void calibration_model::update(ux_window& window, std::string& error_message)
if (ImGui::IsItemHovered())
{
window.link_hovered();
ImGui::SetTooltip("%s", "Restore calibration in flash to factory settings");
RsImGui::CustomTooltip("%s", "Restore calibration in flash to factory settings");
}
}
else
Expand All @@ -274,7 +275,7 @@ void calibration_model::update(ux_window& window, std::string& error_message)
ImGui::Button(u8"\uF275 Restore Factory", ImVec2(115, 30));
if (ImGui::IsItemHovered())
{
ImGui::SetTooltip("%s", "Write selected calibration table to the device. For advanced users");
RsImGui::CustomTooltip("%s", "Write selected calibration table to the device. For advanced users");
}

ImGui::PopStyleColor(2);
Expand Down Expand Up @@ -361,7 +362,7 @@ void calibration_model::update(ux_window& window, std::string& error_message)
}
if (ImGui::IsItemHovered())
{
ImGui::SetTooltip("%s", "Changing calibration will affect depth quality. Changes are persistent.\nThere is an option to get back to factory calibration, but it maybe worse than current calibration\nBefore writing to flash, we strongly recommend to make a file backup");
RsImGui::CustomTooltip("%s", "Changing calibration will affect depth quality. Changes are persistent.\nThere is an option to get back to factory calibration, but it maybe worse than current calibration\nBefore writing to flash, we strongly recommend to make a file backup");
}

ImGui::SetCursorScreenPos({ (float)(x0 + w - 230), (float)(y0 + h - 30) });
Expand All @@ -373,7 +374,7 @@ void calibration_model::update(ux_window& window, std::string& error_message)
if (ImGui::IsItemHovered())
{
window.link_hovered();
ImGui::SetTooltip("%s", "Close without saving any changes");
RsImGui::CustomTooltip("%s", "Close without saving any changes");
}
ImGui::SameLine();

Expand Down Expand Up @@ -403,7 +404,7 @@ void calibration_model::update(ux_window& window, std::string& error_message)
if (ImGui::IsItemHovered())
{
window.link_hovered();
ImGui::SetTooltip("%s", "Write selected calibration table to the device");
RsImGui::CustomTooltip("%s", "Write selected calibration table to the device");
}
}
else
Expand All @@ -414,7 +415,7 @@ void calibration_model::update(ux_window& window, std::string& error_message)
ImGui::Button(u8"\uF2DB Write Table", ImVec2(120, 25));
if (ImGui::IsItemHovered())
{
ImGui::SetTooltip("%s", "Write selected calibration table to the device. For advanced users");
RsImGui::CustomTooltip("%s", "Write selected calibration table to the device. For advanced users");
}

ImGui::PopStyleColor(2);
Expand Down
Loading

0 comments on commit 6c2341b

Please sign in to comment.