Merge branch 'aweinstock/hotfix-pick-icon' into 'master'

Mitigate conrod widget id crash by disabling pickaxe icon in xp scroller.

See merge request veloren/veloren!2442
This commit is contained in:
Marcel 2021-06-14 18:02:56 +00:00
commit 109d87bf81
2 changed files with 6 additions and 6 deletions

View File

@ -127,7 +127,7 @@ lazy_static! {
.iter()
.map(|s| s.to_string())
.collect();
static ref SKILL_TREES: Vec<String> = vec!["general", "sword", "axe", "hammer", "bow", "staff", "sceptre", "pick"]
static ref SKILL_TREES: Vec<String> = vec!["general", "sword", "axe", "hammer", "bow", "staff", "sceptre", "mining"]
.iter()
.map(|s| s.to_string())
.collect();

View File

@ -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);
}
}*/
}
}
}