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

Added 'No Eligible Personnel' Dialog to Turnover & Retention Checks #5068

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

IllianiCBT
Copy link
Collaborator

Currently, when users are prompted to make a turnover check the turnover table will only show characters with a TN greater than 2. This means that often the table will appear empty, creating confusion among users. This is especially true for early campaigns, when all personnel are benefiting from employment contract bonuses.

Now, if nobody is eligible for turnover, a dialog will replace the turnover table informing users of this. It is not possible to skip the turnover dialog entirely, as the prompt does not know that the table is empty when it is triggered.

The image shown in the dialog will change to match the campaign faction, where possible.

Closes #5059

image

Removed redundant visibility and location setting for RetirementDefectionDialog in multiple classes and set it to always be on top within the dialog initialization. This ensures the dialog appears correctly without requiring additional location settings.
Updated RetirementDefectionDialog to use UIUtil.scaleForGUI for setting dialog dimensions to ensure consistency with other UI components and improve scaling across different display settings. This change helps maintain a uniform look and feel in the application’s UI.
Implemented a check in RetirementDefectionDialog to display a notification when no personnel are eligible for retirement or defection. This includes a new dialog with a message and an OK button to acknowledge the notification.
Renamed the variable 'rdd' to 'dialog' for better readability and consistency across the BriefingTab and CampaignGUI classes. This change helps to maintain code clarity and aids in understanding the purpose of the variable more intuitively.
@IllianiCBT IllianiCBT added GUI UX User experience labels Oct 19, 2024
@IllianiCBT IllianiCBT self-assigned this Oct 19, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.42%. Comparing base (4a9cce8) to head (64862dd).
Report is 96 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5068      +/-   ##
============================================
- Coverage     10.43%   10.42%   -0.02%     
- Complexity     6032     6033       +1     
============================================
  Files           952      953       +1     
  Lines        133878   134123     +245     
  Branches      19436    19435       -1     
============================================
+ Hits          13976    13982       +6     
- Misses       118560   118792     +232     
- Partials       1342     1349       +7     

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

@WeaverThree
Copy link
Collaborator

Oh nice. The c-bill icon to make the dialog not too tiny is a nice touch :D

@HammerGS HammerGS merged commit a7e566c into MegaMek:master Oct 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI UX User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFE] Unit Turnover: Show a message when no rolls are needed
4 participants