Skip to content

Add lore text wrapping in admin GUI panels (#73)#74

Merged
tastybento merged 1 commit intodevelopfrom
feature/lore-wrapping
Feb 23, 2026
Merged

Add lore text wrapping in admin GUI panels (#73)#74
tastybento merged 1 commit intodevelopfrom
feature/lore-wrapping

Conversation

@tastybento
Copy link
Member

Summary

Closes #73.

Adds word-wrapping for lore text in the admin GUI so long descriptions don't produce excessively wide item tooltips.

Changes

AbPanel — two new static utility methods:

  • wrapText(String text, int maxWidth) — word-wraps a single string into a List<String>, breaking on spaces at maxWidth characters
  • wrapLore(List<String> lore) — wraps every entry in a lore list at LORE_MAX_WIDTH (35 chars) and returns a flat list

Applied in:

  • AdminList: getAdminDescription() output is now wrapped before being added to the item lore
  • EditUpgradePanel: upgrade description is wrapped when displayed on the Written Book item
  • EditTierPanel: tier description is wrapped when displayed on the Written Book item

Test plan

  • mvn test passes (70 tests)
  • Enter a long description for an upgrade and verify the lore breaks at word boundaries in the GUI
  • Short descriptions (< 35 chars per line) are unaffected
  • Price/reward descriptions in the tier price/reward list panels are wrapped

🤖 Generated with Claude Code

AbPanel gains two static utilities:
- wrapText(String, int): word-wraps a string at the given column width
- wrapLore(List<String>): wraps every entry in a lore list at
  LORE_MAX_WIDTH (35 chars) and returns a flat list of lines

Applied in:
- AdminList: wraps getAdminDescription() output for price/reward items
- EditUpgradePanel: wraps the upgrade description lore
- EditTierPanel: wraps the tier description lore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tastybento tastybento merged commit 0931706 into develop Feb 23, 2026
1 check failed
@tastybento tastybento deleted the feature/lore-wrapping branch February 23, 2026 04:31
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.

Admin GUI: wrap lore text to avoid excessively wide tooltips

1 participant