Chat wheel counts right Shift, durability line is translated

This commit is contained in:
Kacpherek
2026-10-27 06:30:46 +01:00
parent d74d39cb05
commit 2c0d3c1a86
2 changed files with 13 additions and 8 deletions
+2 -1
View File
@@ -661,7 +661,8 @@ impl Game<'_> {
{
return;
}
let shift = self.keys.contains(&KeyCode::ShiftLeft);
// ChatScreen.mouseScrolled: `hasShiftDown`, either Shift key.
let shift = self.has_shift_down();
let amount = amount.clamp(-1.0, 1.0) * if shift { 1.0 } else { 7.0 };
self.ui.chat.scroll_by(amount as i32, true);
}
+11 -7
View File
@@ -2023,15 +2023,19 @@ impl Game<'_> {
&& stack.damage > 0
&& advanced
{
push(
&mut lines,
format!(
"Durability: {} / {}",
info.max_damage - stack.damage,
info.max_damage
// `item.durability`, in the selected language.
lines.push((
horizon_client::text::Text::translate(
"item.durability",
&[
horizon_client::text::Text::literal(
(info.max_damage - stack.damage).to_string(),
),
horizon_client::text::Text::literal(info.max_damage.to_string()),
],
),
u32::MAX,
);
));
}
// ItemStack.addDetailsToTooltipTail: with advanced tooltips the item id
// and how many components the stack has.