diff --git a/assets/voxygen/element/frames/enemybar-0.vox b/assets/voxygen/element/frames/enemybar-0.vox deleted file mode 100644 index 86d8e7b3d9..0000000000 --- a/assets/voxygen/element/frames/enemybar-0.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6bb91912f72a88fb39e4a06dd6a847b0e4512a934ce193cb1325abb91549e455 -size 60720 diff --git a/assets/voxygen/element/frames/enemybar.png b/assets/voxygen/element/frames/enemybar.png index 82515fb6c0..61b5273433 100644 --- a/assets/voxygen/element/frames/enemybar.png +++ b/assets/voxygen/element/frames/enemybar.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bfa1034410f86cc56f8ca737054ff8a8bf71dd4d696fa3bd8195d866cb4405d3 -size 1607 +oid sha256:7c4bad1314144f662c8970136ee954e8a56849b65b39a26caa22148b00c44bfd +size 245 diff --git a/assets/voxygen/element/frames/enemybar_bg.png b/assets/voxygen/element/frames/enemybar_bg.png new file mode 100644 index 0000000000..18748b44f3 --- /dev/null +++ b/assets/voxygen/element/frames/enemybar_bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c1214e73e70dcff9b3623d776167b9aae1731cffae41d4dc57549e955372695 +size 178 diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 40720c90dc..084d3a54ae 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -265,6 +265,7 @@ image_ids! { // Enemy Healthbar enemy_health: "voxygen.element.frames.enemybar", + enemy_health_bg: "voxygen.element.frames.enemybar_bg", // Enemy Bar Content: enemy_bar: "voxygen.element.skillbar.enemy_bar_content", // Spell Book Window diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index d1dec24d09..c6908a992b 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -695,20 +695,19 @@ impl Hud { let ingame_pos = pos + Vec3::unit_z() * height_offset; // Background - Rectangle::fill_with( - [82.0 * BARSIZE + 1.0, 8.0], - Color::Rgba(0.1, 0.1, 0.1, 0.9), - ) - .x_y(0.0, MANA_BAR_Y + 7.0) //-25.0) - .position_ingame(ingame_pos) - .set(back_id, ui_widgets); + Image::new(self.imgs.enemy_health_bg) + .w_h(84.0 * BARSIZE, 10.0 * BARSIZE) + .x_y(0.0, MANA_BAR_Y + 6.5) //-25.5) + .color(Some(Color::Rgba(0.1, 0.1, 0.1, 0.8))) + .position_ingame(ingame_pos) + .set(back_id, ui_widgets); // % HP Filling Image::new(self.imgs.enemy_bar) - .w_h(72.9 * (hp_percentage / 100.0) * BARSIZE, 5.9 * BARSIZE) + .w_h(73.0 * (hp_percentage / 100.0) * BARSIZE, 6.0 * BARSIZE) .x_y( (4.5 + (hp_percentage / 100.0 * 36.45 - 36.45)) * BARSIZE, - MANA_BAR_Y + 9.0, + MANA_BAR_Y + 7.5, ) .color(Some(if hp_percentage <= 25.0 { crit_hp_color @@ -722,13 +721,13 @@ impl Hud { // % Mana Filling Rectangle::fill_with( [ - 73.0 * (energy.current() as f64 / energy.maximum() as f64) * BARSIZE, + 72.0 * (energy.current() as f64 / energy.maximum() as f64) * BARSIZE, MANA_BAR_HEIGHT, ], MANA_COLOR, ) .x_y( - ((4.5 + (energy_percentage / 100.0 * 36.5)) - 36.45) * BARSIZE, + ((3.5 + (energy_percentage / 100.0 * 36.5)) - 36.45) * BARSIZE, MANA_BAR_Y, //-32.0, ) .position_ingame(ingame_pos)