Skip to content

Tooltips R' Us#2099

Closed
JuiceyBeans wants to merge 17 commits into
GregTechCEu:1.20.1from
JuiceyBeans:beans/tooltip-deez-nuts
Closed

Tooltips R' Us#2099
JuiceyBeans wants to merge 17 commits into
GregTechCEu:1.20.1from
JuiceyBeans:beans/tooltip-deez-nuts

Conversation

@JuiceyBeans
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
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 bundled for a 0.X.0 Update label Oct 13, 2024
@JuiceyBeans
Copy link
Copy Markdown
Contributor Author

Superseded by #3246, closing

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 bundled for a 0.X.0 Update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistant Tooltipping

3 participants