show contact ID in tooltip
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Failing after 13m8s
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 5m26s
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 5m41s
ContinuousIntegration / linux (push) Successful in 3m53s
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 5m18s
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 5m39s
ContinuousDelivery / windows (push) Has been cancelled
ContinuousDelivery / windows-asan (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled

This commit is contained in:
Green Sky 2024-07-01 14:00:00 +02:00
parent 1d212c5fab
commit 21243ea979
No known key found for this signature in database

View File

@ -1,6 +1,7 @@
#include "./contact_list.hpp" #include "./contact_list.hpp"
#include <solanaceae/contact/components.hpp> #include <solanaceae/contact/components.hpp>
#include <solanaceae/util/utils.hpp>
#include <imgui/imgui.h> #include <imgui/imgui.h>
//#include <imgui/imgui_internal.h> //#include <imgui/imgui_internal.h>
@ -96,6 +97,11 @@ bool renderContactBig(
const auto* cstate = c.try_get<Contact::Components::ConnectionState>(); const auto* cstate = c.try_get<Contact::Components::ConnectionState>();
if (ImGui::BeginItemTooltip()) { if (ImGui::BeginItemTooltip()) {
if (c.all_of<Contact::Components::ID>()) {
const auto id_str = bin2hex(c.get<Contact::Components::ID>().data);
ImGui::Text("ID: %s", id_str.c_str());
}
if (cstate != nullptr) { if (cstate != nullptr) {
ImGui::Text("Connection state: %s", ImGui::Text("Connection state: %s",
(cstate->state == Contact::Components::ConnectionState::disconnected) (cstate->state == Contact::Components::ConnectionState::disconnected)