diff --git a/assets/voxygen/element/icons/fire_bolt_1.png b/assets/voxygen/element/icons/fire_bolt_1.png new file mode 100644 index 0000000000..7839441a2a --- /dev/null +++ b/assets/voxygen/element/icons/fire_bolt_1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0de03fc395a2136232308a43c9426e871f1855fd7040f107c0d21c544bc9791 +size 777 diff --git a/assets/voxygen/element/icons/fire_spell_0.png b/assets/voxygen/element/icons/fire_spell_0.png new file mode 100644 index 0000000000..dab7f87c07 --- /dev/null +++ b/assets/voxygen/element/icons/fire_spell_0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcd5b65b0295b8467b90712d8a7d4ccab5bef8de8e1a24234f9628459ba8c746 +size 695 diff --git a/assets/voxygen/element/icons/heal_0.png b/assets/voxygen/element/icons/heal_0.png new file mode 100644 index 0000000000..bac626be04 --- /dev/null +++ b/assets/voxygen/element/icons/heal_0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e68b8d6a36b444e17797015e439ed711b865f53a1992762139db2228ca25b686 +size 730 diff --git a/assets/voxygen/element/misc_bg/map_bg.png b/assets/voxygen/element/misc_bg/map_bg.png new file mode 100644 index 0000000000..f39100060f --- /dev/null +++ b/assets/voxygen/element/misc_bg/map_bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19aa98947164b02fc3613cb875e50e02da97f084450881da7644d05e03987b9c +size 22768 diff --git a/assets/voxygen/element/misc_bg/map_frame.png b/assets/voxygen/element/misc_bg/map_frame.png new file mode 100644 index 0000000000..2992f2e7bb --- /dev/null +++ b/assets/voxygen/element/misc_bg/map_frame.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9dfc85c0c89230e6df821acafd6abb9968c2c1dca200709d1723f1a38e6f3d88 +size 11275 diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 32d025b463..9a1ffd7d18 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -117,7 +117,6 @@ image_ids! { flyingrod_m2: "voxygen.element.icons.debug_wand_m2", charge: "voxygen.element.icons.skill_charge_3", - // Icons flower: "voxygen.element.icons.item_flower", grass: "voxygen.element.icons.item_grass", @@ -203,6 +202,10 @@ image_ids! { ////////////////////////////////////////////////////////////////////////////////////////////////////// + // Map + map_bg: "voxygen.element.misc_bg.map_bg", + map_frame: "voxygen.element.misc_bg.map_frame", + // MiniMap mmap_frame: "voxygen.element.frames.mmap", mmap_frame_2: "voxygen.element.frames.mmap_frame", @@ -271,7 +274,9 @@ image_ids! { banner_top: "voxygen.element.frames.banner_top", - + // Icons + fire_spell_1: "voxygen.element.icons.fire_spell_0", + heal_0: "voxygen.element.icons.heal_0", // Buttons button: "voxygen.element.buttons.button", diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 395fb87927..13e7ff3476 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -56,6 +56,7 @@ const TEXT_COLOR: Color = Color::Rgba(1.0, 1.0, 1.0, 1.0); const MENU_BG: Color = Color::Rgba(0.0, 0.0, 0.0, 0.4); //const TEXT_COLOR_2: Color = Color::Rgba(0.0, 0.0, 0.0, 1.0); const TEXT_COLOR_3: Color = Color::Rgba(1.0, 1.0, 1.0, 0.1); +const BLACK: Color = Color::Rgba(0.0, 0.0, 0.0, 0.98); //const BG_COLOR: Color = Color::Rgba(1.0, 1.0, 1.0, 0.8); const HP_COLOR: Color = Color::Rgba(0.33, 0.63, 0.0, 1.0); const LOW_HP_COLOR: Color = Color::Rgba(0.93, 0.59, 0.03, 1.0); diff --git a/voxygen/src/hud/skillbar.rs b/voxygen/src/hud/skillbar.rs index 943190c11d..c8fa8ea2f4 100644 --- a/voxygen/src/hud/skillbar.rs +++ b/voxygen/src/hud/skillbar.rs @@ -1,6 +1,6 @@ use super::{ - img_ids::Imgs, BarNumbers, ShortcutNumbers, XpBar, CRITICAL_HP_COLOR, HP_COLOR, LOW_HP_COLOR, - MANA_COLOR, TEXT_COLOR, XP_COLOR, + img_ids::Imgs, BarNumbers, ShortcutNumbers, XpBar, BLACK, CRITICAL_HP_COLOR, HP_COLOR, + LOW_HP_COLOR, MANA_COLOR, TEXT_COLOR, XP_COLOR, }; use crate::{ i18n::{i18n_asset_key, VoxygenLocalization}, @@ -10,7 +10,7 @@ use crate::{ use common::{ assets::load_expect, comp::{ - item::{DebugKind, ToolData, ToolKind}, + item::{DebugKind, StaffKind, ToolData, ToolKind}, CharacterState, ControllerInputs, Energy, ItemKind, Loadout, Stats, }, }; @@ -19,7 +19,11 @@ use conrod_core::{ widget::{self, Button, Image, Rectangle, Text}, widget_ids, Color, Colorable, Positionable, Sizeable, Widget, WidgetCommon, }; -use std::time::{Duration, Instant}; +//use const_tweaker::tweak; +use std::time::{Duration, Instant}; // <- REMOVE THIS BEFORE MERGE! + +/*#[tweak(min = 0.5, max = 1.0, step = 0.01)] +const ALPHA: f32 = 0.90;*/ widget_ids! { struct Ids { @@ -703,6 +707,7 @@ impl<'a> Widget for Skillbar<'a> { ToolKind::Hammer(_) => self.imgs.twohhammer_m2, ToolKind::Axe(_) => self.imgs.twohaxe_m2, ToolKind::Bow(_) => self.imgs.bow_m2, + ToolKind::Staff(StaffKind::Sceptre) => self.imgs.heal_0, ToolKind::Staff(_) => self.imgs.staff_m2, ToolKind::Debug(DebugKind::Boost) => self.imgs.flyingrod_m2, _ => self.imgs.twohaxe_m2, @@ -819,19 +824,35 @@ impl<'a> Widget for Skillbar<'a> { } Image::new(self.imgs.skillbar_slot_bg) .w_h(19.5 * scale, 19.5 * scale) - .color(Some(BG_COLOR)) + .color( + match self.loadout.active_item.as_ref().map(|i| &i.item.kind) { + Some(ItemKind::Tool(ToolData { kind, .. })) => match kind { + ToolKind::Staff(StaffKind::BasicStaff) => Some(BLACK), + _ => Some(BG_COLOR), + }, + _ => Some(BG_COLOR), + }, + ) .middle_of(state.ids.slot1) .set(state.ids.slot1_bg, ui); // TODO: Changeable slot image - /*Image::new(self.imgs.charge) - .w_h(18.0 * scale, 18.0 * scale) - .color(if self.energy.current() as f64 >= 200.0 { - Some(Color::Rgba(1.0, 1.0, 1.0, 1.0)) - } else { - Some(Color::Rgba(0.4, 0.4, 0.4, 1.0)) - }) - .middle_of(state.ids.slot1_bg) - .set(state.ids.slot1_icon, ui);*/ + match self.loadout.active_item.as_ref().map(|i| &i.item.kind) { + Some(ItemKind::Tool(ToolData { 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.4, 0.4, 0.4, 1.0)) + }) + .middle_of(state.ids.slot1_bg) + .set(state.ids.slot1_icon, ui); + }, + _ => {}, + }, + _ => {}, + } // Slot 6 Image::new(self.imgs.skillbar_slot) .w_h(20.0 * scale, 20.0 * scale)