🎨 Palette: [UX improvement] Add return button tooltips in AcShop and MedalCabinet#38
Conversation
Co-authored-by: acsoto <59144459+acsoto@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf0ca3d8cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (icon.getItemMeta().hasDisplayName() && | ||
| icon.getItemMeta().getDisplayName().endsWith("返回")) { | ||
| ((Player) event.getWhoClicked()).chat("/menu_shop"); |
There was a problem hiding this comment.
Match return button by exact label
Using endsWith("返回") to detect the back button means any clicked item whose display name ends with that suffix will execute /menu_shop and bypass the purchase path. In this GUI, display names are data-driven from shop items, so a legitimate item name that ends with 返回 is misclassified as navigation; this should be an exact normalized match (or a slot/material check) to avoid blocking purchases.
Useful? React with 👍 / 👎.
| if (clickedItem.hasItemMeta() && | ||
| clickedItem.getItemMeta().hasDisplayName() && | ||
| clickedItem.getItemMeta().getDisplayName().endsWith("返回")) { | ||
| ((Player) e.getWhoClicked()).chat("/menu"); |
There was a problem hiding this comment.
Detect medal back action without suffix matching
The back-button check now triggers on any display name that endsWith("返回"), so medals whose configured names end with that text are treated as “return” clicks and never reach setMainMedal. Because medal names come from data, this creates a real behavior regression for valid medal entries; use an exact back-button identity (or fixed slot/material) instead of suffix matching.
Useful? React with 👍 / 👎.
💡 What: Added the yellow color code (
\u00a7e) and a helpful lore description (\u00a77点击返回主菜单) to the generic "Return" button (GOLD_NUGGET) in bothAcShopandMedalCabinet. Also updated the corresponding click listeners in both modules to use.endsWith("返回")so that color codes and lore metadata don't interfere with their functionality.🎯 Why: The original "Return" button was an unstyled name that lacked contextual feedback. The new lore text explicitly informs the user that clicking the item will return them to the main menu, while the updated name styling creates visual consistency with the rest of the interface. Updating the underlying listener logic fixes a potential
ArrayIndexOutOfBoundsExceptionor silent failure when clicking the button.📸 Before/After: Visual changes apply to
MedalsGuiandShopGui.♿ Accessibility: The added lore provides clear feedback about what the button does, aiding users who might be confused by an unstyled return button.
PR created automatically by Jules for task 17341261530163962121 started by @acsoto