Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Scoppio
Copy link
Collaborator

@Scoppio Scoppio commented Feb 23, 2025

What it does?

Implements the same algorithm to draw the text on the coordinates that is used by the "drawUnit" when it wants to draw things like the sensor ping.

It also fixes a bunch of bugs related to the minimap not responding anymore. I moved a few functions around and things started to work, I won't complain.

@Scoppio Scoppio self-assigned this Feb 23, 2025
@Scoppio Scoppio added the Bug Any kind of issue that cannot be fixed without code changes label Feb 23, 2025
Comment on lines +408 to +414
if (dialog.getMouseListeners().length == 0) {
dialog.addMouseListener(mouseListener);
dialog.addMouseMotionListener(mouseMotionListener);
dialog.addMouseWheelListener(mouseWheelListener);
dialog.addComponentListener(componentListener);
dialog.addComponentListener(componentListener);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

avoid initializing the same dialog twice.

@codecov
Copy link

codecov bot commented Feb 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.10%. Comparing base (379ef11) to head (2f04e0c).
Report is 29 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6598   +/-   ##
=========================================
  Coverage     29.10%   29.10%           
- Complexity    15279    15289   +10     
=========================================
  Files          2837     2837           
  Lines        279674   279701   +27     
  Branches      49268    49269    +1     
=========================================
+ Hits          81402    81417   +15     
- Misses       192815   192831   +16     
+ Partials       5457     5453    -4     

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

Copy link
Member

@psikomonkie psikomonkie left a comment

Choose a reason for hiding this comment

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

Nice!

g.setFont(font);
g.setColor(Color.white);
g.drawString(sHeight, baseX + 5, baseY + 5);
g.drawString(sHeight, baseX - fontWidth, baseY + fontHeight); // + (fontHeight / 2));
Copy link
Member

Choose a reason for hiding this comment

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

Commented out code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

what are you talking about? there is no comment.... (amended and force pushed, thanks)

@Scoppio Scoppio force-pushed the fix/minimap-level-numbers branch from 610b6b2 to 379ef11 Compare February 23, 2025 03:31
@HammerGS HammerGS merged commit 8958f96 into MegaMek:master Feb 24, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Any kind of issue that cannot be fixed without code changes

Projects

None yet

4 participants