Chat wheel counts right Shift, durability line is translated
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user