mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
formtaed code with cargo fmt
This commit is contained in:
parent
e7f472059d
commit
0ca2e64772
@ -230,7 +230,8 @@ impl<'a> Widget for BuffsBar<'a> {
|
||||
let title = hud::get_buff_title(buff.kind, localized_strings);
|
||||
let desc_txt = hud::get_buff_desc(buff.kind, buff.data, localized_strings);
|
||||
let remaining_time = hud::get_buff_time(*buff);
|
||||
let click_to_remove = format!("<{}>", &localized_strings.get_msg("buff-remove"));
|
||||
let click_to_remove =
|
||||
format!("<{}>", &localized_strings.get_msg("buff-remove"));
|
||||
let desc = format!("{}\n\n{}\n\n{}", desc_txt, remaining_time, click_to_remove);
|
||||
// Timer overlay
|
||||
if Button::image(self.get_duration_image(duration_percentage))
|
||||
@ -388,7 +389,8 @@ impl<'a> Widget for BuffsBar<'a> {
|
||||
let title = hud::get_buff_title(buff.kind, localized_strings);
|
||||
let desc_txt = hud::get_buff_desc(buff.kind, buff.data, localized_strings);
|
||||
let remaining_time = hud::get_buff_time(*buff);
|
||||
let click_to_remove = format!("<{}>", &localized_strings.get_msg("buff-remove"));
|
||||
let click_to_remove =
|
||||
format!("<{}>", &localized_strings.get_msg("buff-remove"));
|
||||
let desc = if buff.is_buff {
|
||||
format!("{}\n\n{}", desc_txt, click_to_remove)
|
||||
} else {
|
||||
|
@ -1804,7 +1804,11 @@ impl<'a> Widget for Crafting<'a> {
|
||||
}
|
||||
} else if *sel_crafting_tab == CraftingTab::Dismantle {
|
||||
// Title
|
||||
Text::new(&self.localized_strings.get_msg("hud-crafting-dismantle_title"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-crafting-dismantle_title"),
|
||||
)
|
||||
.mid_top_with_margin_on(state.ids.align_ing, 0.0)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.font_size(self.fonts.cyri.scale(24))
|
||||
|
@ -4588,7 +4588,9 @@ pub fn get_buff_title(buff: BuffKind, localized_strings: &Localization) -> Cow<s
|
||||
BuffKind::Saturation { .. } => localized_strings.get_msg("buff-title-saturation"),
|
||||
BuffKind::Potion { .. } => localized_strings.get_msg("buff-title-potion"),
|
||||
BuffKind::CampfireHeal { .. } => localized_strings.get_msg("buff-title-campfire_heal"),
|
||||
BuffKind::IncreaseMaxHealth { .. } => localized_strings.get_msg("buff-title-IncreaseMaxHealth"),
|
||||
BuffKind::IncreaseMaxHealth { .. } => {
|
||||
localized_strings.get_msg("buff-title-IncreaseMaxHealth")
|
||||
},
|
||||
BuffKind::IncreaseMaxEnergy { .. } => localized_strings.get_msg("buff-title-energyup"),
|
||||
BuffKind::Invulnerability => localized_strings.get_msg("buff-title-invulnerability"),
|
||||
BuffKind::ProtectingWard => localized_strings.get_msg("buff-title-protectingward"),
|
||||
@ -4617,8 +4619,12 @@ pub fn get_buff_desc(buff: BuffKind, data: BuffData, localized_strings: &Localiz
|
||||
"rate" => data.strength * 100.0
|
||||
})
|
||||
},
|
||||
BuffKind::IncreaseMaxHealth { .. } => localized_strings.get_msg("buff-desc-IncreaseMaxHealth"),
|
||||
BuffKind::IncreaseMaxEnergy { .. } => localized_strings.get_msg("buff-desc-IncreaseMaxEnergy"),
|
||||
BuffKind::IncreaseMaxHealth { .. } => {
|
||||
localized_strings.get_msg("buff-desc-IncreaseMaxHealth")
|
||||
},
|
||||
BuffKind::IncreaseMaxEnergy { .. } => {
|
||||
localized_strings.get_msg("buff-desc-IncreaseMaxEnergy")
|
||||
},
|
||||
BuffKind::Invulnerability => localized_strings.get_msg("buff-desc-invulnerability"),
|
||||
BuffKind::ProtectingWard => localized_strings.get_msg("buff-desc-protectingward"),
|
||||
BuffKind::Frenzied => localized_strings.get_msg("buff-desc-frenzied"),
|
||||
|
@ -196,7 +196,11 @@ impl<'a> Widget for Controls<'a> {
|
||||
.hover_image(self.imgs.button_hover)
|
||||
.press_image(self.imgs.button_press)
|
||||
.down_from(prev_id, 20.0)
|
||||
.label(&self.localized_strings.get_msg("hud-settings-reset_keybinds"))
|
||||
.label(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-reset_keybinds"),
|
||||
)
|
||||
.label_font_size(self.fonts.cyri.scale(14))
|
||||
.label_color(TEXT_COLOR)
|
||||
.label_font_id(self.fonts.cyri.conrod_id)
|
||||
|
@ -122,7 +122,11 @@ impl<'a> Widget for Gameplay<'a> {
|
||||
let display_clamp = self.global_state.settings.gameplay.camera_clamp_angle;
|
||||
|
||||
// Mouse Pan Sensitivity
|
||||
Text::new(&self.localized_strings.get_msg("hud-setting-pan_sensitivity"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-setting-pan_sensitivity"),
|
||||
)
|
||||
.top_left_with_margins_on(state.ids.window, 10.0, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -154,7 +158,11 @@ impl<'a> Widget for Gameplay<'a> {
|
||||
.set(state.ids.mouse_pan_value, ui);
|
||||
|
||||
// Mouse Zoom Sensitivity
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-zoom_sensitivity"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-zoom_sensitivity"),
|
||||
)
|
||||
.down_from(state.ids.mouse_pan_slider, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -526,7 +534,11 @@ impl<'a> Widget for Gameplay<'a> {
|
||||
.hover_image(self.imgs.button_hover)
|
||||
.press_image(self.imgs.button_press)
|
||||
.down_from(state.ids.camera_clamp_behavior_list, 12.0)
|
||||
.label(&self.localized_strings.get_msg("hud-settings-reset_gameplay"))
|
||||
.label(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-reset_gameplay"),
|
||||
)
|
||||
.label_font_size(self.fonts.cyri.scale(14))
|
||||
.label_color(TEXT_COLOR)
|
||||
.label_font_id(self.fonts.cyri.conrod_id)
|
||||
|
@ -319,7 +319,11 @@ impl<'a> Widget for Interface<'a> {
|
||||
events.push(ToggleHotkeyHints(show_hotkey_hints));
|
||||
}
|
||||
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-show_hotkey_hints"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-show_hotkey_hints"),
|
||||
)
|
||||
.right_from(state.ids.hotkey_hints_button, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -362,7 +366,11 @@ impl<'a> Widget for Interface<'a> {
|
||||
events.push(UiScale(ScaleChange::ToRelative));
|
||||
}
|
||||
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-relative_scaling"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-relative_scaling"),
|
||||
)
|
||||
.right_from(state.ids.relative_to_win_button, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -397,7 +405,11 @@ impl<'a> Widget for Interface<'a> {
|
||||
events.push(UiScale(ScaleChange::ToAbsolute));
|
||||
}
|
||||
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-custom_scaling"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-custom_scaling"),
|
||||
)
|
||||
.right_from(state.ids.absolute_scale_button, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -648,7 +660,11 @@ impl<'a> Widget for Interface<'a> {
|
||||
ShortcutNumbers::Off => events.push(ToggleShortcutNumbers(ShortcutNumbers::On)),
|
||||
}
|
||||
}
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-toggle_shortcuts"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-toggle_shortcuts"),
|
||||
)
|
||||
.right_from(state.ids.show_shortcuts_button, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -676,7 +692,11 @@ impl<'a> Widget for Interface<'a> {
|
||||
{
|
||||
events.push(BuffPosition(BuffPosition::Bar))
|
||||
}
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-buffs_skillbar"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-buffs_skillbar"),
|
||||
)
|
||||
.right_from(state.ids.buff_pos_bar_button, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -823,7 +843,11 @@ impl<'a> Widget for Interface<'a> {
|
||||
!self.global_state.settings.interface.sct_inc_dmg,
|
||||
))
|
||||
}
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-incoming_damage"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-incoming_damage"),
|
||||
)
|
||||
.right_from(state.ids.sct_show_inc_dmg_radio, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -997,7 +1021,11 @@ impl<'a> Widget for Interface<'a> {
|
||||
|
||||
// Energybars Numbers
|
||||
// Hotbar text
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-energybar_numbers"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-energybar_numbers"),
|
||||
)
|
||||
.down_from(state.ids.speech_bubble_icon_button, 20.0)
|
||||
.font_size(self.fonts.cyri.scale(18))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -1113,7 +1141,11 @@ impl<'a> Widget for Interface<'a> {
|
||||
events.push(ToggleAlwaysShowBars(always_show_bars));
|
||||
}
|
||||
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-always_show_bars"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-always_show_bars"),
|
||||
)
|
||||
.right_from(state.ids.always_show_bars_button, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -1169,7 +1201,11 @@ impl<'a> Widget for Interface<'a> {
|
||||
.hover_image(self.imgs.button_hover)
|
||||
.press_image(self.imgs.button_press)
|
||||
.down_from(state.ids.buff_pos_map_button, 12.0)
|
||||
.label(&self.localized_strings.get_msg("hud-settings-reset_interface"))
|
||||
.label(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-reset_interface"),
|
||||
)
|
||||
.label_font_size(self.fonts.cyri.scale(14))
|
||||
.label_color(TEXT_COLOR)
|
||||
.label_font_id(self.fonts.cyri.conrod_id)
|
||||
|
@ -149,7 +149,11 @@ impl<'a> Widget for Language<'a> {
|
||||
events.push(ToggleEnglishFallback(show_english_fallback));
|
||||
}
|
||||
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-english_fallback"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-english_fallback"),
|
||||
)
|
||||
.right_from(state.ids.english_fallback_button, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
|
@ -255,7 +255,11 @@ impl<'a> Widget for Sound<'a> {
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sfx_volume_number, ui);
|
||||
// Ambience Volume
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-ambience_volume"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-ambience_volume"),
|
||||
)
|
||||
.down_from(state.ids.sfx_volume_slider, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
|
@ -382,7 +382,11 @@ impl<'a> Widget for Video<'a> {
|
||||
.set(state.ids.max_fps_value, ui);
|
||||
|
||||
// Max Background FPS
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-background_fps"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-background_fps"),
|
||||
)
|
||||
.down_from(state.ids.ld_slider, 10.0)
|
||||
.right_from(state.ids.max_fps_value, 30.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
@ -444,7 +448,9 @@ impl<'a> Widget for Video<'a> {
|
||||
PresentMode::Immediate,
|
||||
];
|
||||
let mode_label_list = [
|
||||
&self.localized_strings.get_msg("hud-settings-present_mode-fifo"),
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-present_mode-fifo"),
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-present_mode-mailbox"),
|
||||
@ -727,7 +733,11 @@ impl<'a> Widget for Video<'a> {
|
||||
.set(state.ids.figure_dist_value, ui);
|
||||
|
||||
// AaMode
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-antialiasing_mode"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-antialiasing_mode"),
|
||||
)
|
||||
.down_from(state.ids.gamma_slider, 8.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -866,7 +876,11 @@ impl<'a> Widget for Video<'a> {
|
||||
.set(state.ids.point_glow_value, ui);
|
||||
|
||||
// Upscaling factor
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-upscale_factor"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-upscale_factor"),
|
||||
)
|
||||
.down_from(state.ids.bloom_intensity_slider, 8.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -1243,7 +1257,11 @@ impl<'a> Widget for Video<'a> {
|
||||
}
|
||||
|
||||
// Disable flashing lights
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-flashing_lights"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-flashing_lights"),
|
||||
)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.down_from(state.ids.particles_label, 25.0)
|
||||
@ -1368,7 +1386,9 @@ impl<'a> Widget for Video<'a> {
|
||||
.set(state.ids.bit_depth_label, ui);
|
||||
|
||||
if let Some(clicked) = DropDownList::new(
|
||||
once(String::from(self.localized_strings.get_msg("common-automatic")))
|
||||
once(String::from(
|
||||
self.localized_strings.get_msg("common-automatic"),
|
||||
))
|
||||
.chain(bit_depths.iter().map(|depth| format!("{}", depth)))
|
||||
.collect::<Vec<String>>()
|
||||
.as_slice(),
|
||||
@ -1422,7 +1442,9 @@ impl<'a> Widget for Video<'a> {
|
||||
.set(state.ids.refresh_rate_label, ui);
|
||||
|
||||
if let Some(clicked) = DropDownList::new(
|
||||
once(String::from(self.localized_strings.get_msg("common-automatic")))
|
||||
once(String::from(
|
||||
self.localized_strings.get_msg("common-automatic"),
|
||||
))
|
||||
.chain(refresh_rates.iter().map(|rate| format!("{}", rate)))
|
||||
.collect::<Vec<String>>()
|
||||
.as_slice(),
|
||||
@ -1479,7 +1501,11 @@ impl<'a> Widget for Video<'a> {
|
||||
}
|
||||
|
||||
// Fullscreen Mode
|
||||
Text::new(&self.localized_strings.get_msg("hud-settings-fullscreen_mode"))
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-fullscreen_mode"),
|
||||
)
|
||||
.down_from(state.ids.fullscreen_label, 8.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
@ -1521,7 +1547,11 @@ impl<'a> Widget for Video<'a> {
|
||||
.hover_image(self.imgs.button_hover)
|
||||
.press_image(self.imgs.button_press)
|
||||
.down_from(state.ids.fullscreen_mode_list, 12.0)
|
||||
.label(&self.localized_strings.get_msg("hud-settings-save_window_size"))
|
||||
.label(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-save_window_size"),
|
||||
)
|
||||
.label_font_size(self.fonts.cyri.scale(14))
|
||||
.label_color(TEXT_COLOR)
|
||||
.label_font_id(self.fonts.cyri.conrod_id)
|
||||
@ -1545,7 +1575,11 @@ impl<'a> Widget for Video<'a> {
|
||||
.press_image(self.imgs.button_press)
|
||||
.down_from(state.ids.fullscreen_mode_list, 12.0)
|
||||
.right_from(state.ids.save_window_size_button, 12.0)
|
||||
.label(&self.localized_strings.get_msg("hud-settings-reset_graphics"))
|
||||
.label(
|
||||
&self
|
||||
.localized_strings
|
||||
.get_msg("hud-settings-reset_graphics"),
|
||||
)
|
||||
.label_font_size(self.fonts.cyri.scale(14))
|
||||
.label_color(TEXT_COLOR)
|
||||
.label_font_id(self.fonts.cyri.conrod_id)
|
||||
|
@ -455,8 +455,12 @@ impl<'a> Skillbar<'a> {
|
||||
// Bar Text
|
||||
let bar_text = if self.health.is_dead {
|
||||
Some((
|
||||
self.localized_strings.get_msg("hud-group-dead").into_owned(),
|
||||
self.localized_strings.get_msg("hud-group-dead").into_owned(),
|
||||
self.localized_strings
|
||||
.get_msg("hud-group-dead")
|
||||
.into_owned(),
|
||||
self.localized_strings
|
||||
.get_msg("hud-group-dead")
|
||||
.into_owned(),
|
||||
))
|
||||
} else if let BarNumbers::Values = bar_values {
|
||||
Some((
|
||||
|
@ -161,9 +161,15 @@ impl<'a> Trade<'a> {
|
||||
trade: &'a PendingTrade,
|
||||
) {
|
||||
let phase_text = match trade.phase() {
|
||||
TradePhase::Mutate => self.localized_strings.get_msg("hud-trade-phase1_description"),
|
||||
TradePhase::Review => self.localized_strings.get_msg("hud-trade-phase2_description"),
|
||||
TradePhase::Complete => self.localized_strings.get_msg("hud-trade-phase3_description"),
|
||||
TradePhase::Mutate => self
|
||||
.localized_strings
|
||||
.get_msg("hud-trade-phase1_description"),
|
||||
TradePhase::Review => self
|
||||
.localized_strings
|
||||
.get_msg("hud-trade-phase2_description"),
|
||||
TradePhase::Complete => self
|
||||
.localized_strings
|
||||
.get_msg("hud-trade-phase3_description"),
|
||||
};
|
||||
|
||||
Text::new(&phase_text)
|
||||
|
@ -240,8 +240,11 @@ impl PlayState for CharSelectionState {
|
||||
}
|
||||
},
|
||||
Err(err) => {
|
||||
global_state.info_message =
|
||||
Some(localized_strings.get_msg("common-connection_lost").into_owned());
|
||||
global_state.info_message = Some(
|
||||
localized_strings
|
||||
.get_msg("common-connection_lost")
|
||||
.into_owned(),
|
||||
);
|
||||
error!(?err, "[char_selection] Failed to tick the client");
|
||||
return PlayStateResult::Pop;
|
||||
},
|
||||
|
@ -250,8 +250,11 @@ impl PlayState for MainMenuState {
|
||||
}
|
||||
},
|
||||
Err(err) => {
|
||||
global_state.info_message =
|
||||
Some(localized_strings.get_msg("common-connection_lost").into_owned());
|
||||
global_state.info_message = Some(
|
||||
localized_strings
|
||||
.get_msg("common-connection_lost")
|
||||
.into_owned(),
|
||||
);
|
||||
error!(?err, "[main menu] Failed to tick the client");
|
||||
self.init = InitState::None;
|
||||
},
|
||||
@ -444,7 +447,11 @@ fn get_client_msg_error(
|
||||
mismatched_server_info,
|
||||
} => match error {
|
||||
Error::SpecsErr(e) => {
|
||||
format!("{}: {}", localization.get_msg("main-login-internal_error"), e)
|
||||
format!(
|
||||
"{}: {}",
|
||||
localization.get_msg("main-login-internal_error"),
|
||||
e
|
||||
)
|
||||
},
|
||||
Error::AuthErr(e) => format!(
|
||||
"{}: {}",
|
||||
@ -453,9 +460,9 @@ fn get_client_msg_error(
|
||||
),
|
||||
Error::Kicked(e) => e,
|
||||
Error::TooManyPlayers => localization.get_msg("main-login-server_full").into(),
|
||||
Error::AuthServerNotTrusted => {
|
||||
localization.get_msg("main-login-untrusted_auth_server").into()
|
||||
},
|
||||
Error::AuthServerNotTrusted => localization
|
||||
.get_msg("main-login-untrusted_auth_server")
|
||||
.into(),
|
||||
Error::ServerTimeout => localization.get_msg("main-login-timeout").into(),
|
||||
Error::ServerShutdown => localization.get_msg("main-login-server_shut_down").into(),
|
||||
Error::NotOnWhitelist => localization.get_msg("main-login-not_on_whitelist").into(),
|
||||
@ -475,7 +482,11 @@ fn get_client_msg_error(
|
||||
Error::ParticipantErr(e) => net_error(e.to_string(), mismatched_server_info),
|
||||
Error::StreamErr(e) => net_error(e.to_string(), mismatched_server_info),
|
||||
Error::HostnameLookupFailed(e) => {
|
||||
format!("{}: {}", localization.get_msg("main-login-server_not_found"), e)
|
||||
format!(
|
||||
"{}: {}",
|
||||
localization.get_msg("main-login-server_not_found"),
|
||||
e
|
||||
)
|
||||
},
|
||||
Error::Other(e) => {
|
||||
format!("{}: {}", localization.get_msg("common-error"), e)
|
||||
@ -492,9 +503,9 @@ fn get_client_msg_error(
|
||||
localization.get_msg("main-login-failed_sending_request"),
|
||||
e
|
||||
),
|
||||
client::AuthClientError::InsecureSchema => {
|
||||
localization.get_msg("main-login-insecure_auth_scheme").into()
|
||||
},
|
||||
client::AuthClientError::InsecureSchema => localization
|
||||
.get_msg("main-login-insecure_auth_scheme")
|
||||
.into(),
|
||||
client::AuthClientError::ServerError(_, e) => String::from_utf8_lossy(&e).into(),
|
||||
},
|
||||
Error::AuthServerUrlInvalid(e) => {
|
||||
|
@ -868,7 +868,11 @@ impl<'a> Widget for ItemTooltip<'a> {
|
||||
// Slots
|
||||
if item.num_slots() > 0 {
|
||||
stat_text(
|
||||
format!("{} : {}", i18n.get_msg("common-stats-slots"), item.num_slots()),
|
||||
format!(
|
||||
"{} : {}",
|
||||
i18n.get_msg("common-stats-slots"),
|
||||
item.num_slots()
|
||||
),
|
||||
index,
|
||||
);
|
||||
}
|
||||
@ -1006,7 +1010,11 @@ impl<'a> Widget for ItemTooltip<'a> {
|
||||
stats.power * 10.0
|
||||
)
|
||||
} else {
|
||||
format!("{} : x{:.2}", i18n.get_msg("common-stats-power"), stats.power)
|
||||
format!(
|
||||
"{} : x{:.2}",
|
||||
i18n.get_msg("common-stats-power"),
|
||||
stats.power
|
||||
)
|
||||
};
|
||||
widget::Text::new(&power_text)
|
||||
.x_align_to(state.ids.item_frame, conrod_core::position::Align::Start)
|
||||
@ -1025,7 +1033,11 @@ impl<'a> Widget for ItemTooltip<'a> {
|
||||
(stats.speed - 1.0) * 100.0
|
||||
)
|
||||
} else {
|
||||
format!("{} : x{:.2}", i18n.get_msg("common-stats-speed"), stats.speed)
|
||||
format!(
|
||||
"{} : x{:.2}",
|
||||
i18n.get_msg("common-stats-speed"),
|
||||
stats.speed
|
||||
)
|
||||
};
|
||||
widget::Text::new(&speed_text)
|
||||
.graphics_for(id)
|
||||
@ -1089,7 +1101,11 @@ impl<'a> Widget for ItemTooltip<'a> {
|
||||
(stats.range - 1.0) * 100.0
|
||||
)
|
||||
} else {
|
||||
format!("{} : x{:.2}", i18n.get_msg("common-stats-range"), stats.range)
|
||||
format!(
|
||||
"{} : x{:.2}",
|
||||
i18n.get_msg("common-stats-range"),
|
||||
stats.range
|
||||
)
|
||||
};
|
||||
widget::Text::new(&range_text)
|
||||
.graphics_for(id)
|
||||
|
Loading…
Reference in New Issue
Block a user