-
Notifications
You must be signed in to change notification settings - Fork 175
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
(Not for merge) Campaign options iic GBC and sizing #5050
base: master
Are you sure you want to change the base?
(Not for merge) Campaign options iic GBC and sizing #5050
Conversation
Introduced a new dialog for selecting campaign presets within the campaign options. Updated `CampaignPreset` to include a `getTitle()` method and added resource strings for dialog configuration.
Eliminated the unused logger variable in SelectPresetDialog.java to reduce clutter. Additionally, formatted comments in CampaignPreset.java to improve readability and follow documentation standards.
Moved CampaignOptions and related classes to a new package structure under mekhq.campaign.campaignOptions. This improves code organization and clarity. Updated all references to reflect the new package structure.
Created 20 new empty classes under the campaignOptions and campaignOptions.panes packages. These classes will serve as placeholders for future implementation of various campaign option functionalities.
Renamed `campaignOptionsDialogController.java` to `CampaignOptionsDialogController.java` and implemented `CampaignOptionsDialogController` with added functionalities. Included new `GeneralTab` class for campaign's general settings and updated resources for localization.
Changed the package name of all campaign option classes from 'panes' to 'tabs' for consistency. Removed the empty `RepairAndMaintenance` class. Updated the `CampaignOptionsDialogController` to reflect these changes.
Enhanced campaign options dialog by adding a Repair and Maintenance tab. Implemented detailed options for repair and maintenance settings, including various checkboxes and spinners.
Replaced CampaignOptionsPane with CampaignOptionsDialogController to streamline campaign options management. Commented out methods related to the old pane's options handling to avoid conflicts. Added Javadoc comments to GeneralTab to improve code documentation.
Removed CampaignOptionsDialogController and replaced its functionality with CampaignOptionsPane and CampaignOptionsUtilities. This change aimed at modularizing the code, improving maintainability and readability. Updated relevant imports and class usages accordingly.
Removed the inheritance from AbstractMHQTabbedPane in RepairAndMaintenanceTab and GeneralTab. Adjusted constructors and methods to accommodate this change and updated utility imports to reflect the new package structure.
Moved CampaignOptionsPane to the "tabs" subpackage for better organization. Updated the import statements in relevant classes to reflect the new package path.
Reorganized properties and labels in various tabs. Introduced a new Supplies and Acquisition tab with Acquisition, Delivery, and Planetary Acquisition sub-tabs while maintaining existing functionality for Repair and Maintenance.
Replaced the createLabeledSpinner method with distinct createSpinner and createLabel methods to simplify spinner creation. This change reduced redundancy by removing the need for label creation in spinner methods and updated relevant sections across multiple files. Additionally, the getDimensionWidthForComboBox and getDimensionWidthForButton helper methods were removed to streamline the codebase.
Removed explicit maximum width parameters in the createParentPanel method. Adjusted width handling to dynamically ensure a minimum width of 500 for the parent panels. Simplified the import statements by consolidating them. Deleted an unused utility method related to panel size calculation.
Added new tabs for Combat Readiness, Human Resources, Unit Development, Logistics and Maintenance, and Strategic Operations to the Campaign Options Pane. Updated the resource file with corresponding titles for the new tabs. These changes enhance the structure and organization of the campaign options interface.
The TODO comments for creating various parent tabs in different sections were removed. This cleanup helps to reduce clutter and improves the readability of the code. It also indicates that the initial implementation for these tabs is complete.
Refactored the creation of campaign option tabs to use wrapper panels for better alignment and added decorative borders with contextual quotes. Also, centralized tab creation into a utility method for improved readability and maintainability of the code.
Updated Javadoc comments in CampaignOptionsPane.java to remove unnecessary link annotations and improve readability.
Moved header creation to a separate method for better readability and reusability. Updated text field dimensions to be dynamically set based on preferred height. Enhanced scroll speeds for better user experience and added quotes to tabs for improved UI aesthetics.
Replaced the empty TechLimits class with a fully implemented TechLimitsTab to manage technical limit settings within the campaign options. Updated the properties for the new tab and made minor adjustments to CampaignOptionsUtilities and CampaignOptionsPane for integration.
Included 'allowISPurchasesBox' and 'allowCanonOnlyBox' components in the TechLimitsTab for enhanced configuration of tech limit options. Also organized comments in CampaignOptionsPane for better readability.
# Conflicts: # MekHQ/resources/mekhq/resources/NEWCampaignOptionsDialog.properties # MekHQ/src/mekhq/campaign/campaignOptions/CampaignPreset.java # MekHQ/src/mekhq/gui/dialog/CampaignOptionsDialog.java # MekHQ/src/mekhq/gui/dialog/CampaignPresetSelectionDialog.java # MekHQ/src/mekhq/gui/panes/CampaignPresetPane.java # MekHQ/src/mekhq/gui/panes/campaignOptions/SelectPresetDialog.java
Moved CampaignPreset from campaignOptions to campaign package.
Commented out methods and imports related to campaign options handling via the CampaignOptionsPane. This change disables the updating, validation, and application of campaign options while keeping the overall structure intact.
… PersonnelTab Deleted the unused RandomAssignmentTables class. Renamed Personnel to PersonnelTab and expanded its contents with multiple new tabs for different settings. Modified comments and reorganized imports in RepairAndMaintenanceTab and GeneralTab. Updated properties file with new labels and placeholders.
Implemented new tabs within PersonnelTab for administrators and awards. Added respective UI elements and layout configurations to support negotiation, scrounge, and award options.
Implemented new UI components and functionality for personnel cleanup and prisoner/dependent management in the campaign options dialog. This includes new panels and options for enabling/disabling personnel removal, managing prisoner statuses, and handling dependents.
Added multiple sub-tabs within the Personnel Tab to streamline various functionalities including general information, logs, awards, medical, prisoners, dependents, and salaries. Updated tooltips and configured new UI elements with appropriate settings for improved user experience. This structure enhances the management and display of essential personnel data.
Renamed several parent and content tabs to align with new naming conventions for better clarity and maintainability. Adjusted class names and method calls accordingly, ensuring application consistency and code readability.
Consolidated the functionality of EquipmentTab into EquipmentAndSuppliesTab and removed the obsolete EquipmentTab class. This simplifies the structure and reduces redundancy by having all related settings under a single tab.
Changed the title of the 'logisticsAndMaintenanceParentTab' to 'Logistics' in the campaign options dialog. Also, standardized comment formatting in CampaignOptionsPane.java for better readability.
Removed redundant classes in the campaignOptions package to streamline the codebase. Also modified the accessibility of initialize methods from protected to private in various tabs for better encapsulation and maintenance.
Enhanced the FinancesTab with detailed financial settings including loan limits, percentage maintenance costs, taxation, and share system options. Created separate panels for payments, sales, taxes, and other systems, and updated resource properties to reflect these changes.
Introduced a new "Price Multipliers" tab within the finances options of the campaign settings. This tab includes configurable multipliers for various parts, units, and conditions, enhancing customization and economic control. Adjusted related methods and integrated new labels and properties accordingly.
Enhanced code documentation by adding comprehensive Javadoc comments to methods in the `FinancesTab.java` file. This includes detailed explanations for the `FinancesTab` class and its methods, improving code readability and maintainability by providing clear descriptions of their functionality and parameters.
Implemented a new MarketsTab in the CampaignOptionsPane, including a Personnel Market options panel with various configuration settings. Updated the relevant properties file to support the new tab and its features.
Updated the methods for creating checkboxes and spinners to remove redundant arguments. Refactored the relevant code in the GUI panels to use these streamlined methods for clarity and simplicity. This change improves code readability and maintainability.
Added detailed Javadoc comments to utility methods in CampaignOptionsUtilities.java for better code documentation. Implemented the Unit Market tab in MarketsTab.java, including new UI components and layout adjustments. Simplified label and text field creation in GeneralTab.java by removing redundant parameters.
This commit introduced a new Unit Market Tab in the Campaign Options screen. The new tab allows users to configure various settings related to unit markets, including special unit chances, rarity modifiers, and instant delivery options. Labels and tooltips for these new options were also added to the resource file.
also a few boards
…nOptionsIIC # Conflicts: # MekHQ/docs/history.txt
Integrated a new contract market tab into the campaign options pane. This included creating various input elements and labels for managing contract details and configurations.
Introduced a new checkbox `chkMercSizeLimited` to the MarketsTab. This checkbox allows users to set a limit on the size of mercenary units. Updated the layout and initialization code to include this new component.
Introduced a new `RulesetsTab` class to handle various campaign options in MekHQ. This tab includes universal options, legacy AtB options, and StratCon options for enhanced scenario and map generation configuration.
This change updated various UI components in different tabs to use the `UIUtil.scaleForGUI` method for setting their sizes. The adjustment ensures that the components scale appropriately, improving the application's compatibility with different display settings and resolutions.
Removed maximum size constraints to allow GUI components to scale more dynamically based on window size and user settings. This change ensures a more flexible and responsive user interface. Adjusted size comparison directly to enhance code readability and simplicity.
# Conflicts: # MekHQ/docs/history.txt
* @param width The width of the {@link JTextField}. | ||
* @return a map containing a {@link JLabel} key and a {@link JTextField} value. | ||
*/ | ||
static JTextField createTextField(String name, @Nullable Integer customWrapSize, int width) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
widthNew = UIUtil.scaleForGUI(750); | ||
} | ||
|
||
int height = parentPanel.getPreferredSize().height; |
Check notice
Code scanning / CodeQL
Unread local variable Note
return createParentPanel(panel, "maintenanceTab"); | ||
} | ||
|
||
private void recreateFinancesPanel(boolean isReversingQualityNames) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
return Math.round(intensity * 10.0) / 10.0; | ||
} | ||
|
||
private class AtBBattleIntensityChangeListener implements ChangeListener { |
Check notice
Code scanning / CodeQL
Unused classes and interfaces Note
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5050 +/- ##
============================================
- Coverage 10.43% 10.10% -0.34%
+ Complexity 6032 6029 -3
============================================
Files 952 964 +12
Lines 133878 138316 +4438
Branches 19436 19494 +58
============================================
- Hits 13976 13975 -1
- Misses 118560 123002 +4442
+ Partials 1342 1339 -3 ☔ View full report in Codecov by Sentry. |
Julie, am I righting in thinking this can be closed now? I've harvested everything I needed from it. Thanks again, this was incredibly helpful. |
No description provided.