Skip to content

Commit

Permalink
* UPD: [xrGame] Add some useful tooltips to imgui hud tuner
Browse files Browse the repository at this point in the history
  • Loading branch information
yohjimane committed Jun 3, 2024
1 parent 23ec627 commit fa01995
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/xrGame/player_hud_tune.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void CHudTuner::OnFrame()
{
IKinematics* ik = current_hud_item->m_model;
ImGui::Text("Bone Count = %i", ik->LL_BoneCount());
ImGui::Text("Root Bone = %s", ik->LL_BoneName_dbg(ik->LL_GetBoneRoot()));
ImGui::Text("Root Bone = %s, ID: %i", ik->LL_BoneName_dbg(ik->LL_GetBoneRoot()), ik->LL_GetBoneRoot());

if (ImGui::BeginTable("Bone Visibility", CalcColumnCount(125.f)))
{
Expand All @@ -291,6 +291,10 @@ void CHudTuner::OnFrame()
ImGui::TableNextColumn();
bool visible = ik->LL_GetBoneVisible(bone_id);
if (ImGui::RadioButton(bone_name.c_str(), visible)) { visible = !visible; }; ImGui::SameLine();
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled))
{
ImGui::SetTooltip("Bone Name = %s, ID: %i", bone_name.c_str(), bone_id);
}
ik->LL_SetBoneVisible(bone_id, visible, FALSE);
}
ImGui::EndTable();
Expand All @@ -305,7 +309,11 @@ void CHudTuner::OnFrame()
if (ImGui::Button(anim_name.c_str()))
{
current_hud_item->m_parent_hud_item->PlayHUDMotion_noCB(anim_name, false);
};
}
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled))
{
ImGui::SetTooltip("%s = %s, %s", anim_name.c_str(), motion.m_base_name.c_str(), motion.m_additional_name.c_str());
}
ImGui::SameLine();
}
ImGui::EndTable();
Expand Down

0 comments on commit fa01995

Please sign in to comment.