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

Allow opening unit and MUL files with MML by file association or drag-drop #1648

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

pavelbraginskiy
Copy link
Collaborator

@pavelbraginskiy pavelbraginskiy commented Oct 29, 2024

Allows you to drag unit files (MTF/BLK) or MUL files from your OS's file explorer onto MegaMekLab:

image

You can drag them onto the startup GUI or almost anywhere onto the unit editing GUI.

I've tested, and crit-slot drag-and-drop still works without issues, the only thing to note there is that you cannot drag files onto a unit's crit table, which I'm sure no one will mind.

You can also ask your operating system to open these files with MML if you tell it the path to MegaMekLab.exe (or equivalent executable for your system):
image

Unit files will be opened to edit, while MUL files will be opened to print.

A new setting is added to determine if dropped MUL files should be printed or exported to PDF:

image

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 2.16%. Comparing base (34486a0) to head (ac1c381).
Report is 10 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##             master   #1648      +/-   ##
===========================================
- Coverage      2.17%   2.16%   -0.01%     
  Complexity      209     209              
===========================================
  Files           266     268       +2     
  Lines         30801   30911     +110     
  Branches       5266    5286      +20     
===========================================
  Hits            669     669              
- Misses        29975   30085     +110     
  Partials        157     157              

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

@pavelbraginskiy pavelbraginskiy changed the title Allow drag-dropping unit and MUL files onto MML Allow opening unit and MUL files with MML by file association or drag-drop Oct 30, 2024
Copy link
Member

@HammerGS HammerGS left a comment

Choose a reason for hiding this comment

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

Tested and seems to work. Very cool addition.

@HammerGS HammerGS merged commit bc48194 into MegaMek:master Nov 4, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants