Add tooltips to the spellbook's tabs

This commit is contained in:
Sollace 2023-08-29 15:22:09 +01:00
parent 576e36df39
commit fcd6701961
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 20 additions and 4 deletions

View file

@ -36,6 +36,7 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.screen.slot.Slot;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import net.minecraft.util.Util;
import net.minecraft.util.math.ColorHelper;
public class SpellbookScreen extends HandledScreen<SpellbookScreenHandler> implements RecipeBookProvider {
@ -187,6 +188,10 @@ public class SpellbookScreen extends HandledScreen<SpellbookScreenHandler> imple
resolution, resolution,
resolution, resolution
);
if (bounds.contains(mouseX, mouseY)) {
setTooltip(Text.translatable(Util.createTranslationKey("chapter", tab.chapter().id())));
}
});
MatrixStack matrices = context.getMatrices();

View file

@ -306,10 +306,6 @@
"spell.unicopia.dispel_evil": "Dispel Evil",
"spell.unicopia.dispel_evil.lore": "Casts away any nearby unearthly forces",
"gui.unicopia.trait.label": "Element of %s",
"gui.unicopia.trait.group": "\n %s",
"gui.unicopia.trait.corruption": "\n %s corruption",
"trait.unicopia.strength.name": "Strength",
"trait.unicopia.strength.description": "Imparts physical strength or enhances endurance.\nSpells with more of the strength trait hit harder and last longer.",
"trait.unicopia.focus.name": "Focus",
@ -385,6 +381,10 @@
"ability.unicopia.disguise": "Change Form",
"ability.unicopia.rainboom": "Sonic Rainboom",
"gui.unicopia.trait.label": "Element of %s",
"gui.unicopia.trait.group": "\n %s",
"gui.unicopia.trait.corruption": "\n %s corruption",
"gui.unicopia.dispell_screen.cancel": "Press ESC to cancel",
"gui.unicopia.dispell_screen.spell_type": "Spell Type: %s",
"gui.unicopia.dispell_screen.affinity": "Affinity: %s",
@ -489,6 +489,17 @@
"gui.unicopia.action.spells_cleared": "Removed all spells",
"gui.unicopia.action.no_spells_cleared": "You have no active spells",
"chapter.unicopia.crafting": "Spell Crafting",
"chapter.unicopia.profile": "Profile",
"chapter.unicopia.traits": "Research",
"chapter.unicopia.introduction": "Introduction",
"chapter.unicopia.fire_magic": "Fire Magic",
"chapter.unicopia.ice_magic": "Ice Magic",
"chapter.unicopia.air_magic": "Air Magic",
"chapter.unicopia.dark_magic": "Dark Magic",
"chapter.unicopia.the_otherworldly": "Forbidden Magic",
"chapter.unicopia.crystal_heart": "Artifacts",
"experience.unicopia.pure.magical_kindergartner": "New Blood",
"experience.unicopia.impure.magical_kindergartner": "Impure",
"experience.unicopia.tainted.magical_kindergartner": "Misguided",