Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary view #1357

Merged
merged 11 commits into from
Jan 4, 2024
18 changes: 15 additions & 3 deletions megameklab/src/megameklab/ui/combatVehicle/CVStructureTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import megamek.common.verifier.TestTank;
import megameklab.ui.EntitySource;
import megameklab.ui.generalUnit.*;
import megameklab.ui.generalUnit.summary.*;
import megameklab.ui.listeners.ArmorAllocationListener;
import megameklab.ui.listeners.CVBuildListener;
import megameklab.ui.util.ITab;
Expand All @@ -41,7 +42,7 @@ public class CVStructureTab extends ITab implements CVBuildListener, ArmorAlloca
private CVChassisView panChassis;
private MVFArmorView panArmor;
private MovementView panMovement;
private CVSummaryView panSummary;
private SummaryView panSummary;
private ArmorAllocationView panArmorAllocation;
private PatchworkArmorView panPatchwork;
private CVTransportView panTransport;
Expand All @@ -62,13 +63,25 @@ private void setUpPanels() {
panMovement = new MovementView(panBasicInfo);
panArmorAllocation = new ArmorAllocationView(panBasicInfo, Entity.ETYPE_TANK);
panPatchwork = new PatchworkArmorView(panBasicInfo);
panSummary = new CVSummaryView(eSource);
panTransport = new CVTransportView();
if (getTank().hasPatchworkArmor()) {
panArmorAllocation.showPatchwork(true);
} else {
panPatchwork.setVisible(false);
}
panSummary = new SummaryView(eSource,
new StructureSummaryItem(),
new EngineSummaryItem(),
new PropulsionSummaryItem(),
new HeatsinkSummaryItem(),
new ControlsSummaryItem(),
new ArmorSummaryItem(),
new JumpSummaryItem(),
new TurretSummaryItem(),
new RearTurretSummaryItem(),
new SponsonTurretSummaryItem(),
new PowerAmplifierSummaryItem(),
new EquipmentSummaryItem());

GridBagConstraints gbc;

Expand Down Expand Up @@ -119,7 +132,6 @@ private void setUpPanels() {
panChassis.setBorder(BorderFactory.createTitledBorder("Chassis"));
panMovement.setBorder(BorderFactory.createTitledBorder("Movement"));
panArmor.setBorder(BorderFactory.createTitledBorder("Armor"));
panSummary.setBorder(BorderFactory.createTitledBorder("Summary"));
panArmorAllocation.setBorder(BorderFactory.createTitledBorder("Armor Allocation"));
panPatchwork.setBorder(BorderFactory.createTitledBorder("Patchwork Armor"));
panTransport.setBorder(BorderFactory.createTitledBorder("Transport"));
Expand Down
Loading
Loading