From c5f82b241dc341d60efb52f0e68c2adad22f0c38 Mon Sep 17 00:00:00 2001 From: Avi Weinstock Date: Mon, 14 Jun 2021 13:39:50 -0400 Subject: [PATCH] Mitigate conrod widget id crash by disabling pickaxe icon in xp scroller. --- common/src/cmd.rs | 2 +- voxygen/src/hud/mod.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/src/cmd.rs b/common/src/cmd.rs index d8752cffd5..892da21885 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -127,7 +127,7 @@ lazy_static! { .iter() .map(|s| s.to_string()) .collect(); - static ref SKILL_TREES: Vec = vec!["general", "sword", "axe", "hammer", "bow", "staff", "sceptre", "pick"] + static ref SKILL_TREES: Vec = vec!["general", "sword", "axe", "hammer", "bow", "staff", "sceptre", "mining"] .iter() .map(|s| s.to_string()) .collect(); diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index a1501f6a2c..983277688d 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -1254,10 +1254,10 @@ impl Hud { &mut self.ids.player_scts, &mut ui_widgets.widget_id_generator(), ); - let player_sct_icon_id = player_sct_id_walker.next( + /*let player_sct_icon_id = player_sct_id_walker.next( &mut self.ids.player_scts, &mut ui_widgets.widget_id_generator(), - ); + );*/ // Increase font size based on fraction of maximum Experience // "flashes" by having a larger size in the first 100ms let font_size_xp = @@ -1299,13 +1299,13 @@ impl Hud { ui_widgets.win_h * (0.15 * floater.rand_offset.1 as f64) + y, ) .set(player_sct_id, ui_widgets); - // Exp Source Image - if xp_pool.contains(&SkillGroupKind::Weapon(ToolKind::Pick)) { + // Exp Source Image (TODO: fix widget id crash) + /*if xp_pool.contains(&SkillGroupKind::Weapon(ToolKind::Pick)) { Image::new(self.imgs.pickaxe_ico) .w_h(font_size_xp as f64, font_size_xp as f64) .left_from(player_sct_id, 5.0) .set(player_sct_icon_id, ui_widgets); - } + }*/ } } }