-
Notifications
You must be signed in to change notification settings - Fork 135
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
Summary view #1357
Conversation
} else if (entity instanceof Tank) { | ||
critLabel.setText(formatCrits(getTankArmorCrits(entity))); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Armor can also take up space on conventional and aerospace fighters. TestAero.AeroArmor gives the slot costs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, fighter armor slots are now shown. Also had to change a "new Aero()" to "new AeroSpaceFighter()"
Adds availability info in the summary view on the main tab.
Again, these are a lot of code changes. The goal was to have the code not repeated for each unit type and so have the availability data present on all unit types that use the summary view (BA/CI don't). It is now organized such that each line in the summary is represented by its own object which implements SummaryItem and is responsible for updating the crits, weight and availability data. There is only one SummaryView class left that handles all unit types. For each unit type, the SummaryView is given whatever lines (=SummaryItems) that unit type uses during construction (see e.g. BMSTructureTab).
While the display as such works, there are numerous issues in the results that were present before and I did not correct; I probably added some as well. I think this is all outside this PR which is already big enough.