Skip to content
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

Tooltips R' Us #2099

Draft
wants to merge 12 commits into
base: 1.20.1
Choose a base branch
from

Conversation

JuiceyBeans
Copy link
Contributor

@JuiceyBeans JuiceyBeans commented Oct 6, 2024

What

Bunch of changes to tooltips for 1.12 parity, fixes, and consistency

Implementation Details

Will close #2431

Proposed format for tooltip formatting

  • Unformatted text must be in light gray - §7
  • Items must be in gold - §6
  • Fluids must be in blue - §9
  • Directions must be in yellow - §e
  • Disabled/Inactive must be in red - §c
  • Enabled/Active must be in green - §a
  • Potion effects must be in yellow - §e
  • Time must be in red - §c
  • Percentages must be in green - §a
  • Keys must be in all caps
  • Key combos must follow the format KEY1 + KEY2 (for example, SHIFT + R-CLICK)

Comment on lines +50 to +55
if (this instanceof OpticalPipeBlockItem) {
if (GTUtil.isShiftDown()) {
tooltip.add(Component.translatable("gtceu.tool_action.wire_cutter.connect"));
} else {
tooltip.add(Component.translatable("gtceu.tool_action.show_tooltips"));
}
Copy link
Member

Choose a reason for hiding this comment

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

just override it in OpticalPipeBlockItem?

Copy link
Contributor

Choose a reason for hiding this comment

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

If you override it, then you have to call super().
But if you call super() it'll add the wrench tooltip.
But if you don't call super then you don't get the block tooltip unless you manually call this.getBlock().appendHoverText() in the override for this tooltip.
image
It's a mess overall D:

@screret screret added the type: feature New feature or request label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistant Tooltipping
3 participants