diff --git a/assets/voxygen/element/misc_bg/level_down.png b/assets/voxygen/element/misc_bg/level_down.png new file mode 100644 index 0000000000..bd773e7862 --- /dev/null +++ b/assets/voxygen/element/misc_bg/level_down.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3faab75ba08e40084ca98966999883db632bf2e7ade80802ef5aadbf9c47d51d +size 256 diff --git a/assets/voxygen/element/misc_bg/level_down.vox b/assets/voxygen/element/misc_bg/level_down.vox deleted file mode 100644 index e04998a5e6..0000000000 --- a/assets/voxygen/element/misc_bg/level_down.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:073c4a5b0b5b507a07839da0f16f8988ca6dc1c46c78ee371291ee1bec012511 -size 2500 diff --git a/assets/voxygen/element/misc_bg/level_up.png b/assets/voxygen/element/misc_bg/level_up.png new file mode 100644 index 0000000000..90fe596915 --- /dev/null +++ b/assets/voxygen/element/misc_bg/level_up.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1939158216f4b31a6769615efdd958c6eb7f98c42678e2423cde8c160d349188 +size 235 diff --git a/assets/voxygen/element/misc_bg/level_up.vox b/assets/voxygen/element/misc_bg/level_up.vox deleted file mode 100644 index 437b88ada9..0000000000 --- a/assets/voxygen/element/misc_bg/level_up.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b6dce293f76c863983a545f4d4ecdfbc855aee7ca2e493212a4954d8be7a741 -size 2500 diff --git a/assets/voxygen/element/skillbar/bar_content.png b/assets/voxygen/element/skillbar/bar_content.png new file mode 100644 index 0000000000..740e497fd2 --- /dev/null +++ b/assets/voxygen/element/skillbar/bar_content.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:554ab7e7ab2b4711dde9d63f1b176a589e978036c96df44af8e34213ca308d3c +size 90 diff --git a/assets/voxygen/element/skillbar/bar_content.vox b/assets/voxygen/element/skillbar/bar_content.vox deleted file mode 100644 index 4ccf6ac7e4..0000000000 --- a/assets/voxygen/element/skillbar/bar_content.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc69560a401ac2b659c9d19b3942b61018edec034ea0e955d3d99afd02757adf -size 44228 diff --git a/assets/voxygen/element/skillbar/energybar_bg.png b/assets/voxygen/element/skillbar/energybar_bg.png new file mode 100644 index 0000000000..ce25e47252 --- /dev/null +++ b/assets/voxygen/element/skillbar/energybar_bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e74fb3a0d89ebd0e183881aa29e1315fe9aa0417099d5d0f24a3d7244ed82f66 +size 193 diff --git a/assets/voxygen/element/skillbar/energybar_bg.vox b/assets/voxygen/element/skillbar/energybar_bg.vox deleted file mode 100644 index d69b3c5f0e..0000000000 --- a/assets/voxygen/element/skillbar/energybar_bg.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c4490310e4be1b454e39619384dac40ef9c0abe3715e951deacd6f06955ddba0 -size 54020 diff --git a/assets/voxygen/element/skillbar/healthbar_bg.png b/assets/voxygen/element/skillbar/healthbar_bg.png new file mode 100644 index 0000000000..85e206287c --- /dev/null +++ b/assets/voxygen/element/skillbar/healthbar_bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99db830a62bcc2a77867df849e5c5eb3689514782ec95b1b0f62c0b096d21bcd +size 190 diff --git a/assets/voxygen/element/skillbar/healthbar_bg.vox b/assets/voxygen/element/skillbar/healthbar_bg.vox deleted file mode 100644 index 985fe3ff05..0000000000 --- a/assets/voxygen/element/skillbar/healthbar_bg.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:550437f73578788b1520e66ad90e0f8459cd8e0f441fbebf183adfc9d10b0b23 -size 54004 diff --git a/assets/voxygen/element/skillbar/skillbar_slot.png b/assets/voxygen/element/skillbar/skillbar_slot.png index 811579b09d..b23b25967f 100644 --- a/assets/voxygen/element/skillbar/skillbar_slot.png +++ b/assets/voxygen/element/skillbar/skillbar_slot.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3804ce85831c53666987128f7589faa40b08cd37f01a8d112bd7e2eca07cd724 -size 2344 +oid sha256:e684e902c11fe48c4875997799834fa597cc14a7eab86cf48d63c56de1191f11 +size 610 diff --git a/assets/voxygen/element/skillbar/skillbar_slot_big.png b/assets/voxygen/element/skillbar/skillbar_slot_big.png new file mode 100644 index 0000000000..8638974e52 --- /dev/null +++ b/assets/voxygen/element/skillbar/skillbar_slot_big.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82aa46ad7cd827151206e79180200d40b72755b9ec3ba2016f081a9c38f3100c +size 243 diff --git a/assets/voxygen/element/skillbar/skillbar_slot_big.vox b/assets/voxygen/element/skillbar/skillbar_slot_big.vox deleted file mode 100644 index 02bdf095c0..0000000000 --- a/assets/voxygen/element/skillbar/skillbar_slot_big.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1fc7a52c394969779da4f2bb548bbfabd84b0e979ecaf94ebf239efe8d90f3fe -size 46732 diff --git a/assets/voxygen/element/skillbar/skillbar_slot_big_active.vox b/assets/voxygen/element/skillbar/skillbar_slot_big_active.vox deleted file mode 100644 index aa30d8875a..0000000000 --- a/assets/voxygen/element/skillbar/skillbar_slot_big_active.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad9d070daefe97358d640d23f92651353e8185300c995a6a196b253e200097b4 -size 58108 diff --git a/assets/voxygen/element/skillbar/skillbar_slot_big_bg.vox b/assets/voxygen/element/skillbar/skillbar_slot_big_bg.vox deleted file mode 100644 index a734a2a34c..0000000000 --- a/assets/voxygen/element/skillbar/skillbar_slot_big_bg.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2f338b9c04bfcca21e2eff745c2d4b7f209c1ade2797806a8b3faf02d8f6d95 -size 49340 diff --git a/assets/voxygen/element/skillbar/skillbar_slot_l.png b/assets/voxygen/element/skillbar/skillbar_slot_l.png index 69a87a9c96..615e91ffd2 100644 --- a/assets/voxygen/element/skillbar/skillbar_slot_l.png +++ b/assets/voxygen/element/skillbar/skillbar_slot_l.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05cafd02908849e40fe20fb1cc2877b54ebb5d198b73663fe0c61e22ea3d021c -size 2343 +oid sha256:0308eac5f6ca52d9e1425ae5c7f17c0451f628d2b8443d699eece95e3480adfd +size 607 diff --git a/assets/voxygen/element/skillbar/skillbar_slot_r.png b/assets/voxygen/element/skillbar/skillbar_slot_r.png index c9caaf553e..16591871c0 100644 --- a/assets/voxygen/element/skillbar/skillbar_slot_r.png +++ b/assets/voxygen/element/skillbar/skillbar_slot_r.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f58abab20455ea0b8c5b96ad96b8c39d1d0aaac996afc507074be45cbc928b73 -size 2344 +oid sha256:56dbe92fe64b64b59b554ada0d1eb0dbb537593e3a1d87dfccd721c6519e521d +size 608 diff --git a/assets/voxygen/element/skillbar/stamina_wheel-0.vox b/assets/voxygen/element/skillbar/stamina_wheel-0.vox deleted file mode 100644 index 3a88fc752a..0000000000 --- a/assets/voxygen/element/skillbar/stamina_wheel-0.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:428131eff788ab1ad5400e0d82a6d3306671a9f6eed9ac43452e46f967614e4e -size 4236 diff --git a/assets/voxygen/element/skillbar/stamina_wheel-1.vox b/assets/voxygen/element/skillbar/stamina_wheel-1.vox deleted file mode 100644 index 0867fb8665..0000000000 --- a/assets/voxygen/element/skillbar/stamina_wheel-1.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1d4b7afaf0a325c357b2865bffd7abc13bbe3874e6fd940ce2aa4ef6ac93524 -size 4240 diff --git a/assets/voxygen/element/skillbar/stamina_wheel-2.vox b/assets/voxygen/element/skillbar/stamina_wheel-2.vox deleted file mode 100644 index af761fc249..0000000000 --- a/assets/voxygen/element/skillbar/stamina_wheel-2.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a2cb03507bef8d50ee03bceec8c38ade39ace39b926cf1cfe95c3996ca81ec93 -size 4236 diff --git a/assets/voxygen/element/skillbar/stamina_wheel-3.vox b/assets/voxygen/element/skillbar/stamina_wheel-3.vox deleted file mode 100644 index 908869b087..0000000000 --- a/assets/voxygen/element/skillbar/stamina_wheel-3.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7937cf8728cd5aa5c1026c70d2c920b8100a1fb241582c94b5f224a88a4b8c65 -size 4240 diff --git a/assets/voxygen/element/skillbar/stamina_wheel-4.vox b/assets/voxygen/element/skillbar/stamina_wheel-4.vox deleted file mode 100644 index 9190122bb5..0000000000 --- a/assets/voxygen/element/skillbar/stamina_wheel-4.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ca98b3e5880cc379176b1f6d1a8aafad3918cccabe374ce95c370b9abf19e995 -size 4236 diff --git a/assets/voxygen/element/skillbar/stamina_wheel-5.vox b/assets/voxygen/element/skillbar/stamina_wheel-5.vox deleted file mode 100644 index 58eba1edad..0000000000 --- a/assets/voxygen/element/skillbar/stamina_wheel-5.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2ff7ec15effe1d73cf6cf1cbde423192d5d2e80177ebea28ec373a3c9039a222 -size 4272 diff --git a/assets/voxygen/element/skillbar/stamina_wheel-6.vox b/assets/voxygen/element/skillbar/stamina_wheel-6.vox deleted file mode 100644 index 7ae3439101..0000000000 --- a/assets/voxygen/element/skillbar/stamina_wheel-6.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6166f65840900908a1817adf83a36f6f892e8a4462a60eb891c52ef6faacf103 -size 4288 diff --git a/assets/voxygen/element/skillbar/stamina_wheel-7.vox b/assets/voxygen/element/skillbar/stamina_wheel-7.vox deleted file mode 100644 index 7dad13a842..0000000000 --- a/assets/voxygen/element/skillbar/stamina_wheel-7.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6091d44c6e1ed205d1ecf15f84aec2df8793bb49e3a307a56f1320ec2798c2a3 -size 4200 diff --git a/assets/voxygen/element/skillbar/stamina_wheel-empty.vox b/assets/voxygen/element/skillbar/stamina_wheel-empty.vox deleted file mode 100644 index 0740042dd6..0000000000 --- a/assets/voxygen/element/skillbar/stamina_wheel-empty.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32ad9d58f8c34a3fdfdeedf18c0c6efc93b5baf7348fce320d462671bda550b4 -size 58684 diff --git a/assets/voxygen/element/skillbar/xp_bar_content.png b/assets/voxygen/element/skillbar/xp_bar_content.png new file mode 100644 index 0000000000..87d1f20c4c --- /dev/null +++ b/assets/voxygen/element/skillbar/xp_bar_content.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c547c12c27a835c845a1b6e20c6e66b632fcba64e2cfad5a0df635263191dbe +size 111 diff --git a/assets/voxygen/element/skillbar/xp_bar_content.vox b/assets/voxygen/element/skillbar/xp_bar_content.vox deleted file mode 100644 index b43e07f3d3..0000000000 --- a/assets/voxygen/element/skillbar/xp_bar_content.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6826c8887d99eec69c3858df354b86ccf183eba945ccfd56ff1d16b4dec3b35 -size 44228 diff --git a/assets/voxygen/element/skillbar/xp_bar_left.png b/assets/voxygen/element/skillbar/xp_bar_left.png new file mode 100644 index 0000000000..5f045d8ce8 --- /dev/null +++ b/assets/voxygen/element/skillbar/xp_bar_left.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bf8eaeecd8a80e343951be5d9e2ef215f897bc2b25bac1681d14203f29e6a41 +size 170 diff --git a/assets/voxygen/element/skillbar/xp_bar_left.vox b/assets/voxygen/element/skillbar/xp_bar_left.vox deleted file mode 100644 index 191de615c6..0000000000 --- a/assets/voxygen/element/skillbar/xp_bar_left.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:10ebad96b2076b0acb72e5894bb0993c9b73ca4613aeb1db4830a0db414b8891 -size 49011 diff --git a/assets/voxygen/element/skillbar/xp_bar_mid.png b/assets/voxygen/element/skillbar/xp_bar_mid.png new file mode 100644 index 0000000000..36e5211848 --- /dev/null +++ b/assets/voxygen/element/skillbar/xp_bar_mid.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:893cb632175e00fe32f83c1de7232cbfdad5a31cf251de5948895781ab870922 +size 133 diff --git a/assets/voxygen/element/skillbar/xp_bar_mid.vox b/assets/voxygen/element/skillbar/xp_bar_mid.vox deleted file mode 100644 index 6b2e358e56..0000000000 --- a/assets/voxygen/element/skillbar/xp_bar_mid.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:77ca8cecfd2f246f51fd86b583a8ac823b174045a218a46d040ee79ead5fe138 -size 48043 diff --git a/assets/voxygen/element/skillbar/xp_bar_right.png b/assets/voxygen/element/skillbar/xp_bar_right.png new file mode 100644 index 0000000000..6b9edbb223 --- /dev/null +++ b/assets/voxygen/element/skillbar/xp_bar_right.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2cb46b07a8f7fa0f6ecf029bda641abe17c107a3a0558013ac31d3fec3a93bf +size 159 diff --git a/assets/voxygen/element/skillbar/xp_bar_right.vox b/assets/voxygen/element/skillbar/xp_bar_right.vox deleted file mode 100644 index 4785c3fba3..0000000000 --- a/assets/voxygen/element/skillbar/xp_bar_right.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2b820db766297c456d7a9982a5908a4e6d92e1e79eff4438bf2f0149992c35b2 -size 49011 diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index 09f8209ee8..03a813b47a 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -216,11 +216,6 @@ impl<'a> Widget for Bag<'a> { .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.bg_frame, ui); // Title - /*Text::new(&format!( - "{}{}", - &self.stats.name, - &self.localized_strings.get("hud.bag.inventory") - ))*/ Text::new( &self .localized_strings @@ -329,7 +324,9 @@ impl<'a> Widget for Bag<'a> { background_color: Some(UI_HIGHLIGHT_0), content_size: ContentSize { width_height_ratio: 1.0, - max_fraction: 0.75, + max_fraction: 0.75, /* Changes the item image size by setting a maximum + * fraction + * of either the width or height */ }, selected_content_scale: 1.067, amount_font: self.fonts.cyri.conrod_id, diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 98c3e7986f..867202305e 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -20,29 +20,6 @@ rotation_image_ids! { image_ids! { pub struct Imgs { - - // Skillbar - xp_bar_mid: "voxygen.element.skillbar.xp_bar_mid", - xp_bar_left: "voxygen.element.skillbar.xp_bar_left", - xp_bar_right: "voxygen.element.skillbar.xp_bar_right", - skillbar_slot_big: "voxygen.element.skillbar.skillbar_slot_big", - skillbar_slot_big_act: "voxygen.element.skillbar.skillbar_slot_big_active", - skillbar_slot_big_bg: "voxygen.element.skillbar.skillbar_slot_big_bg", - healthbar_bg: "voxygen.element.skillbar.healthbar_bg", - energybar_bg: "voxygen.element.skillbar.energybar_bg", - bar_content: "voxygen.element.skillbar.bar_content", - level_up: "voxygen.element.misc_bg.level_up", - level_down:"voxygen.element.misc_bg.level_down", - stamina_0:"voxygen.element.skillbar.stamina_wheel-empty", - stamina_1:"voxygen.element.skillbar.stamina_wheel-0", - stamina_2:"voxygen.element.skillbar.stamina_wheel-1", - stamina_3:"voxygen.element.skillbar.stamina_wheel-2", - stamina_4:"voxygen.element.skillbar.stamina_wheel-3", - stamina_5:"voxygen.element.skillbar.stamina_wheel-4", - stamina_6:"voxygen.element.skillbar.stamina_wheel-5", - stamina_7:"voxygen.element.skillbar.stamina_wheel-6", - stamina_8:"voxygen.element.skillbar.stamina_wheel-7", - // Window Parts window_3: "voxygen.element.frames.window_3", tab_bg: "voxygen.element.frames.tab_bg", @@ -145,6 +122,17 @@ image_ids! { // Skillbar + level_up: "voxygen.element.misc_bg.level_up", + level_down:"voxygen.element.misc_bg.level_down", + xp_bar_mid: "voxygen.element.skillbar.xp_bar_mid", + xp_bar_left: "voxygen.element.skillbar.xp_bar_left", + xp_bar_right: "voxygen.element.skillbar.xp_bar_right", + healthbar_bg: "voxygen.element.skillbar.healthbar_bg", + energybar_bg: "voxygen.element.skillbar.energybar_bg", + bar_content: "voxygen.element.skillbar.bar_content", + skillbar_slot_big: "voxygen.element.skillbar.skillbar_slot_big", + skillbar_slot_big_bg: "voxygen.element.skillbar.skillbar_slot_big", + skillbar_slot_big_act: "voxygen.element.skillbar.skillbar_slot_big", skillbar_slot: "voxygen.element.skillbar.skillbar_slot", skillbar_slot_act: "voxygen.element.skillbar.skillbar_slot_active", skillbar_slot_l: "voxygen.element.skillbar.skillbar_slot_l", diff --git a/voxygen/src/hud/skillbar.rs b/voxygen/src/hud/skillbar.rs index 784ec156ab..c3a9ee7386 100644 --- a/voxygen/src/hud/skillbar.rs +++ b/voxygen/src/hud/skillbar.rs @@ -29,10 +29,6 @@ use conrod_core::{ }; use std::time::{Duration, Instant}; use vek::*; -/* -use const_tweaker::tweak; -#[tweak(min = 0.0, max = 1.0, step = 0.01)] -const RGB: f32 = 0.1;*/ widget_ids! { struct Ids { @@ -108,7 +104,6 @@ widget_ids! { level_align, level_message, level_message_bg, - stamina_wheel, death_bg, hurt_bg, } @@ -234,36 +229,6 @@ impl<'a> Widget for Skillbar<'a> { let localized_strings = self.localized_strings; - // Stamina Wheel - /* - let stamina_percentage = - self.stats.health.current() as f64 / self.stats.health.maximum() as f64 * 100.0; - if stamina_percentage < 100.0 { - Image::new(if stamina_percentage <= 0.1 { - self.imgs.stamina_0 - } else if stamina_percentage < 12.5 { - self.imgs.stamina_1 - } else if stamina_percentage < 25.0 { - self.imgs.stamina_2 - } else if stamina_percentage < 37.5 { - self.imgs.stamina_3 - } else if stamina_percentage < 50.0 { - self.imgs.stamina_4 - } else if stamina_percentage < 62.5 { - self.imgs.stamina_5 - } else if stamina_percentage < 75.0 { - self.imgs.stamina_6 - } else if stamina_percentage < 87.5 { - self.imgs.stamina_7 - } else { - self.imgs.stamina_8 - }) - .w_h(37.0 * 3.0, 37.0 * 3.0) - .mid_bottom_with_margin_on(ui.window, 150.0) - .set(state.ids.stamina_wheel, ui); - } - */ - // Level Up Message let current_level = self.stats.level.level(); @@ -674,27 +639,6 @@ impl<'a> Widget for Skillbar<'a> { .set(state.ids.m1_content, ui); // M2 Slot match self.character_state { - /* - CharacterState::BasicBlock { .. } => { - let fade_pulse = (self.pulse * 4.0/* speed factor */).cos() * 0.5 + 0.6; //Animation timer; - if self.controller.secondary.is_pressed() { - Image::new(self.imgs.skillbar_slot_big) - .w_h(40.0 * scale, 40.0 * scale) - .right_from(state.ids.m1_slot, 0.0) - .set(state.ids.m2_slot, ui); - Image::new(self.imgs.skillbar_slot_big_act) - .w_h(40.0 * scale, 40.0 * scale) - .middle_of(state.ids.m2_slot) - .color(Some(Color::Rgba(1.0, 1.0, 1.0, fade_pulse))) - .floating(true) - .set(state.ids.m2_slot_act, ui); - } else { - Image::new(self.imgs.skillbar_slot_big) - .w_h(40.0 * scale, 40.0 * scale) - .right_from(state.ids.m1_slot, 0.0) - .set(state.ids.m2_slot, ui); - } - },*/ CharacterState::BasicMelee { .. } => { let fade_pulse = (self.pulse * 4.0/* speed factor */).cos() * 0.5 + 0.6; //Animation timer; if self.controller.secondary.is_pressed() { @@ -806,11 +750,12 @@ impl<'a> Widget for Skillbar<'a> { background_color: None, content_size: ContentSize { width_height_ratio: 1.0, - max_fraction: 0.9, + max_fraction: 0.8, /* Changes the item image size by setting a maximum fraction + * of either the width or height */ }, - selected_content_scale: 1.067, + selected_content_scale: 1.0, amount_font: self.fonts.cyri.conrod_id, - amount_margins: Vec2::new(3.0, 2.0), + amount_margins: Vec2::new(1.0, 1.0), amount_font_size: self.fonts.cyri.scale(12), amount_text_color: TEXT_COLOR, content_source: &content_source, @@ -894,28 +839,6 @@ impl<'a> Widget for Skillbar<'a> { slot.set(state.ids.slot2, ui); } // Slot 1 - // TODO: Don't hardcode this to one Skill... - // Frame flashes whenever the active skill inside this slot is activated - /*match self.character_state { - CharacterState::Charge { time_left } => { - let fade = time_left.as_secs_f32() * 10.0; - Image::new(self.imgs.skillbar_slot_l) - .w_h(20.0 * scale, 20.0 * scale) - .left_from(state.ids.slot2, 0.0) - .set(state.ids.slot1, ui); - Image::new(self.imgs.skillbar_slot_l_act) - .w_h(20.0 * scale, 20.0 * scale) - .middle_of(state.ids.slot1) - .color(Some(Color::Rgba( - 1.0, - 1.0, - 1.0, - if fade > 0.6 { 0.6 } else { fade }, - ))) - .floating(true) - .set(state.ids.slot1_act, ui); - }, - }*/ slot_maker.empty_slot = self.imgs.skillbar_slot_l; slot_maker.filled_slot = self.imgs.skillbar_slot_l; slot_maker.selected_slot = self.imgs.skillbar_slot_l_act; @@ -929,24 +852,6 @@ impl<'a> Widget for Skillbar<'a> { } else { slot.set(state.ids.slot1, ui); } - // TODO: Changeable slot image - /*match self.loadout.active_item.as_ref().map(|i| &i.item.kind) { - Some(ItemKind::Tool(Tool { kind, .. })) => match kind { - ToolKind::Staff(StaffKind::BasicStaff) => { - Image::new(self.imgs.fire_spell_1) - .w_h(18.0 * scale, 18.0 * scale) - .color(if self.energy.current() as f64 >= 500.0 { - Some(Color::Rgba(1.0, 1.0, 1.0, 1.0)) - } else { - Some(Color::Rgba(0.3, 0.3, 0.3, 0.8)) - }) - .middle_of(state.ids.slot1_bg) - .set(state.ids.slot1_icon, ui); - }, - _ => {}, - }, - _ => {}, - }*/ // Slot 6 slot_maker.empty_slot = self.imgs.skillbar_slot; slot_maker.filled_slot = self.imgs.skillbar_slot; @@ -1018,7 +923,7 @@ impl<'a> Widget for Skillbar<'a> { .get_binding(GameInput::Slot1) { Text::new(slot1.to_string().as_str()) - .top_right_with_margins_on(state.ids.slot1, 2.0, 2.0) + .top_right_with_margins_on(state.ids.slot1, 3.0, 5.0) .font_size(self.fonts.cyri.scale(8)) .font_id(self.fonts.cyri.conrod_id) .color(BLACK) @@ -1037,7 +942,7 @@ impl<'a> Widget for Skillbar<'a> { .get_binding(GameInput::Slot2) { Text::new(slot2.to_string().as_str()) - .top_right_with_margins_on(state.ids.slot2, 2.0, 2.0) + .top_right_with_margins_on(state.ids.slot2, 3.0, 5.0) .font_size(self.fonts.cyri.scale(8)) .font_id(self.fonts.cyri.conrod_id) .color(BLACK) @@ -1056,7 +961,7 @@ impl<'a> Widget for Skillbar<'a> { .get_binding(GameInput::Slot3) { Text::new(slot3.to_string().as_str()) - .top_right_with_margins_on(state.ids.slot3, 2.0, 2.0) + .top_right_with_margins_on(state.ids.slot3, 3.0, 5.0) .font_size(self.fonts.cyri.scale(8)) .font_id(self.fonts.cyri.conrod_id) .color(BLACK) @@ -1075,7 +980,7 @@ impl<'a> Widget for Skillbar<'a> { .get_binding(GameInput::Slot4) { Text::new(slot4.to_string().as_str()) - .top_right_with_margins_on(state.ids.slot4, 2.0, 2.0) + .top_right_with_margins_on(state.ids.slot4, 3.0, 5.0) .font_size(self.fonts.cyri.scale(8)) .font_id(self.fonts.cyri.conrod_id) .color(BLACK) @@ -1094,7 +999,7 @@ impl<'a> Widget for Skillbar<'a> { .get_binding(GameInput::Slot5) { Text::new(slot5.to_string().as_str()) - .top_right_with_margins_on(state.ids.slot5, 2.0, 2.0) + .top_right_with_margins_on(state.ids.slot5, 3.0, 5.0) .font_size(self.fonts.cyri.scale(8)) .font_id(self.fonts.cyri.conrod_id) .color(BLACK) @@ -1151,7 +1056,7 @@ impl<'a> Widget for Skillbar<'a> { .get_binding(GameInput::Slot6) { Text::new(slot6.to_string().as_str()) - .top_right_with_margins_on(state.ids.slot6, 2.0, 2.0) + .top_right_with_margins_on(state.ids.slot6, 3.0, 5.0) .font_size(self.fonts.cyri.scale(8)) .font_id(self.fonts.cyri.conrod_id) .color(BLACK) @@ -1170,7 +1075,7 @@ impl<'a> Widget for Skillbar<'a> { .get_binding(GameInput::Slot7) { Text::new(slot7.to_string().as_str()) - .top_right_with_margins_on(state.ids.slot7, 2.0, 2.0) + .top_right_with_margins_on(state.ids.slot7, 3.0, 5.0) .font_size(self.fonts.cyri.scale(8)) .font_id(self.fonts.cyri.conrod_id) .color(BLACK) @@ -1189,7 +1094,7 @@ impl<'a> Widget for Skillbar<'a> { .get_binding(GameInput::Slot8) { Text::new(slot8.to_string().as_str()) - .top_right_with_margins_on(state.ids.slot8, 2.0, 2.0) + .top_right_with_margins_on(state.ids.slot8, 3.0, 5.0) .font_size(self.fonts.cyri.scale(8)) .font_id(self.fonts.cyri.conrod_id) .color(BLACK) @@ -1208,7 +1113,7 @@ impl<'a> Widget for Skillbar<'a> { .get_binding(GameInput::Slot9) { Text::new(slot9.to_string().as_str()) - .top_right_with_margins_on(state.ids.slot9, 2.0, 2.0) + .top_right_with_margins_on(state.ids.slot9, 3.0, 5.0) .font_size(self.fonts.cyri.scale(8)) .font_id(self.fonts.cyri.conrod_id) .color(BLACK) @@ -1227,7 +1132,7 @@ impl<'a> Widget for Skillbar<'a> { .get_binding(GameInput::Slot10) { Text::new(slot10.to_string().as_str()) - .top_right_with_margins_on(state.ids.slot10, 2.0, 2.0) + .top_right_with_margins_on(state.ids.slot10, 3.0, 5.0) .font_size(self.fonts.cyri.scale(8)) .font_id(self.fonts.cyri.conrod_id) .color(BLACK)