Skip to content

Commit

Permalink
* UPD: [xrGame] Add some useful tooltips to imgui hud tuner [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
yohjimane committed Jun 3, 2024
1 parent 1be6894 commit 7578772
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 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 @@ -290,7 +290,11 @@ void CHudTuner::OnFrame()

ImGui::TableNextColumn();
bool visible = ik->LL_GetBoneVisible(bone_id);
if (ImGui::RadioButton(bone_name.c_str(), visible)) { visible = !visible; }
if (ImGui::RadioButton(bone_name.c_str(), visible)) { visible = !visible; };
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::EndTable();
}
Expand Down

0 comments on commit 7578772

Please sign in to comment.