10000 Improvement: Added Faction Icons to Briefing Room by IllianiBird · Pull Request #6858 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improvement: Added Faction Icons to Briefing Room #6858

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

Merged
merged 5 commits into from
May 6, 2025

Conversation

IllianiBird
Copy link
Collaborator

Requires #6857

The briefing room was looking a bit empty with the challenge skulls removed, so I went ahead and added the employer and enemy faction to the display, instead.

This is a very small change, but one I think has a lot of impact and something I would really like in 50.06

image

< 8000 a class="author Link--primary text-bold" data-test-selector="pr-timeline-events-commit-actor-profile-link" data-hovercard-type="user" data-hovercard-url="/users/IllianiBird/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/IllianiBird">IllianiBird added 4 commits May 3, 2025 00:21
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds faction icons to the briefing room by displaying the employer and enemy faction logos.

  • Introduces a new UI component (a JPanel) for displaying faction icons in MissionViewPanel.
  • Adds a new method (getBelligerentsPanel) in AtBContract to generate a panel with scaled faction logos and a divider.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
MekHQ/src/mekhq/gui/view/MissionViewPanel.java Added a new JPanel field and updated methods to incorporate faction icons in the display.
MekHQ/src/mekhq/campaign/mission/AtBContract.java Implemented getBelligerentsPanel to build and return the faction icons panel.
Comments suppressed due to low confidence (1)

MekHQ/src/mekhq/gui/view/MissionViewPanel.java:71

  • [nitpick] The field name 'lblBelligerents' is misleading as it is a JPanel and not a JLabel. Consider renaming it to 'pnlBelligerents' for better clarity.
private JPanel lblBelligerents;

@@ -169,18 +170,18 @@ private void fillStats() {

private void fillStatsBasic() {
lblStatus = new JLabel();
lblBelligerents = new JPanel();
Copy link
Preview
Copilot AI May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The initialization of 'lblBelligerents' here is later overwritten in fillStatsAtBContract(); consider removing this redundant instantiation if it is not used elsewhere.

Suggested change
lblBelligerents = new JPanel();

Copilot uses AI. Check for mistakes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just how I set up CO IIC. At some point I'll got back and address this, but this PR is not the time.

@Scoppio Scoppio merged commit fcd2eb9 into MegaMek:master May 6, 2025
4 checks passed
Copy link
codecov bot commented May 6, 2025

Codecov Report

Attention: Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.

Project coverage is 11.56%. Comparing base (e0ee99c) to head (621fe04).
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/campaign/mission/AtBContract.java 0.00% 17 Missing ⚠️
MekHQ/src/mekhq/gui/view/MissionViewPanel.java 0.00% 13 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6858      +/-   ##
============================================
- Coverage     11.57%   11.56%   -0.01%     
+ Complexity     6609     6607       -2     
============================================
  Files          1100     1100              
  Lines        140971   140990      +19     
  Branches      21845    21839       -6     
============================================
- Hits          16311    16308       -3     
- Misses       122960   122985      +25     
+ Partials       1700     1697       -3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@IllianiBird IllianiBird deleted the briefingRoom branch June 7, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0