Skip to content

Commit

Permalink
Improve storage display
Browse files Browse the repository at this point in the history
  • Loading branch information
behindcurtain3 committed Apr 29, 2024
1 parent 46860c5 commit fbd3a60
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ public static void Display(this VolumeStorageDB storage, EntityState entityState
ImGui.PushID(entityState.Entity.Id.ToString());
if(ImGui.CollapsingHeader(header + "###" + headerId, flags))
{
if(ImGui.BeginTable(header + "table", 2, Styles.TableFlags))
ImGui.Columns(2);
DisplayHelpers.PrintRow("Total Volume", Stringify.Volume(storageType.MaxVolume));
DisplayHelpers.PrintRow("Available Volume", Stringify.Volume(freeVolume), null, null, false);
ImGui.Columns(1);

if(ImGui.BeginTable(header + "table", 3, Styles.TableFlags))
{
ImGui.TableSetupColumn("Item");
ImGui.TableSetupColumn("Quantity");
ImGui.TableSetupColumn("Volume");
ImGui.TableHeadersRow();

var cargoables = storageType.GetCargoables();
Expand Down Expand Up @@ -86,6 +92,8 @@ public static void Display(this VolumeStorageDB storage, EntityState entityState
ImGui.Text("Volume: " + Stringify.Volume(volumeStored) + " (" + Stringify.Volume(cargoType.VolumePerUnit, "#.#####") + " each)");
ImGui.EndTooltip();
}
ImGui.TableNextColumn();
ImGui.Text(Stringify.Volume(volumeStored));
}

ImGui.EndTable();
Expand Down

0 comments on commit fbd3a60

Please sign in to comment.