Skip to content

支持右键点击侧边栏弹出切换实例菜单#5269

Merged
Glavo merged 2 commits intoHMCL-dev:mainfrom
Glavo:game-popup
Jan 21, 2026
Merged

支持右键点击侧边栏弹出切换实例菜单#5269
Glavo merged 2 commits intoHMCL-dev:mainfrom
Glavo:game-popup

Conversation

@Glavo
Copy link
Copy Markdown
Member

@Glavo Glavo commented Jan 20, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for right-clicking sidebar items to show a popup menu for switching game instances. The implementation introduces a reusable utility method and refactors existing code to eliminate duplication.

Changes:

  • Added FXUtils.onSecondaryButtonClicked() utility method for handling right-click events
  • Extracted popup menu logic into GameListPopupMenu.show() static method
  • Applied right-click menu support to multiple sidebar items (account list, game list, version management)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
FXUtils.java Added new onSecondaryButtonClicked() utility method for handling secondary mouse button clicks
GameListPopupMenu.java Added static show() method to create and display game list popup menu
RootPage.java Refactored to use new utility method, added right-click support for game-related sidebar items, removed unused import
MainPage.java Refactored to use new static show() method, removed duplicate onMenu() method and unused import
TerracottaPage.java Added right-click support for instance switching in terracotta page

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Glavo Glavo merged commit 7ab22b0 into HMCL-dev:main Jan 21, 2026
8 checks passed
@Glavo Glavo deleted the game-popup branch January 21, 2026 14:05
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