Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/DevBranch' into DevBranch
Browse files Browse the repository at this point in the history
  • Loading branch information
se5a committed May 11, 2024
2 parents 31c4ebc + bb002e4 commit 5fafa3f
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions Pulsar4X/Pulsar4X.Client/EmpireManagement/Selector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,32 @@ internal override void Display()
FleetWindow.GetInstance().SetActive(true);
FleetWindow.GetInstance().SelectFleet(fleet);
}

if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();

if(fleet.TryGetDatablob<OrderableDB>(out var orderableDb)
&& orderableDb.ActionList.Count > 0)
void Callback()
{
ImGui.Text("Orders:");
for(int i = 0; i < orderableDb.ActionList.Count; i++)
if(fleet.TryGetDatablob<OrderableDB>(out var orderableDb)
&& orderableDb.ActionList.Count > 0)
{
ImGui.Text(orderableDb.ActionList[i].Name);
ImGui.Text("Orders:");
for(int i = 0; i < orderableDb.ActionList.Count; i++)
{
ImGui.Text(orderableDb.ActionList[i].Name);
}
}
else
{
ImGui.Text("No orders");
}
}
else

var flagshipID = fleet.GetDataBlob<FleetDB>().FlagShipID;
if(fleet.Manager?.TryGetEntityById(flagshipID, out var flagship) ?? false)
{
ImGui.Text("No orders");
var positionDB = flagship.GetDataBlob<PositionDB>();
DisplayHelpers.DescriptiveTooltip(display, positionDB.Parent?.GetName(_uiState.Faction.Id) ?? "Unknown", "", Callback);
}
ImGui.EndTooltip();
}
}
}
Expand Down

0 comments on commit 5fafa3f

Please sign in to comment.