Skip to content

ArmatureDebugAppState: minor fix and improvements #2531

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

Conversation

capdevon
Copy link
Contributor

@capdevon capdevon commented Jun 30, 2025

This PR introduces the following improvements to the ArmatureDebugAppState class:

  • Input Handling: Removes the right mouse button trigger from the joint picking input mapping, leaving only the left mouse button for selecting joints.
  • Action Listener: Adds an early return in the action listener if the app state is disabled, preventing unintended processing.
  • Logging Enhancement: Refactors joint info logging to use the logger at INFO level instead of printing to System.err, and formats the output as a single multi-line string for improved readability.

These changes improve usability, maintainability, and adhere to best practices for logging and input management.

@@ -121,7 +121,7 @@ protected void initialize(Application app) {
}

private void registerInput() {
inputManager.addMapping(PICK_JOINT, new MouseButtonTrigger(MouseInput.BUTTON_LEFT), new MouseButtonTrigger(MouseInput.BUTTON_RIGHT));
Copy link
Contributor

@codex128 codex128 Aug 7, 2025

Choose a reason for hiding this comment

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

Why was the right mouse button trigger removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Assigning the left and right mouse buttons to the same function is redundant and not very useful. This way, the right mouse button (RMB) can be assigned to another action without interfering with this debug class.

@yaRnMcDonuts yaRnMcDonuts added this to the v3.9.0 milestone Aug 17, 2025
@yaRnMcDonuts yaRnMcDonuts merged commit 4ad4736 into jMonkeyEngine:master Aug 17, 2025
16 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.

3 participants