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

Updated Sector Display & Expanded Scenario Information #5292

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

IllianiCBT
Copy link
Collaborator

This PR updates the StratCon sector display to display a list of sectors, rather than using a drop-down. This makes it easier for users to spot how many sectors they are assigned to, for any given contract.

I also went ahead and expanded the scenario information to include ally (including player) and hostile (including 3rd parties) BV. This should make it easier for users to determine what forces to assign to what scenario without needing to bounce between the AO and Briefing tabs quite as much.

Players currently on Integrated contracts, when updating, will notice a minor visual bug where things don't use the best alignment. It's very minor and doesn't break anything. This bug will not exist for campaigns that pick Integrated contracts after updating.

Replaced `JComboBox` with `JList` for track selection to improve usability and accommodate future enhancements. Updated layout and constraints to maintain alignment and visual consistency across components. Adjusted related methods to support the new list-based approach and ensured existing functionality is preserved.
Removed unnecessary logger instances and refactored method calls for clarity and performance improvement in StratconTab and StratconPanel. Simplified the code by using static imports for ForceAlignment constants, enhancing readability and maintainability. Additionally, updated the `buildSelectedHexInfo` method to include the `campaign` parameter for more accurate data handling.
@IllianiCBT IllianiCBT added GUI StratCon Bugs relating strictly to StratCon labels Dec 4, 2024
@IllianiCBT IllianiCBT self-assigned this Dec 4, 2024
@IllianiCBT
Copy link
Collaborator Author

Also, I hate GUI work.

.append("<br/>");
}

if (campaign != null) {
AtBDynamicScenario backingScenario = getBackingScenario();

Check notice

Code scanning / CodeQL

Possible confusion of local and field Note

Confusing name: method
getInfo
also refers to field
backingScenario
(without qualifying it with 'this').
@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.47%. Comparing base (d333f62) to head (514f419).
Report is 80 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5292      +/-   ##
============================================
- Coverage     10.47%   10.47%   -0.01%     
- Complexity     6049     6055       +6     
============================================
  Files           959      959              
  Lines        135202   135498     +296     
  Branches      19674    19739      +65     
============================================
+ Hits          14165    14189      +24     
- Misses       119686   119953     +267     
- Partials       1351     1356       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IllianiCBT IllianiCBT merged commit 3d3fc7c into MegaMek:master Dec 4, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI StratCon Bugs relating strictly to StratCon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants