mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
changed debug wand visuals, added icons for 2h sword main and alt attack
This commit is contained in:
parent
6e1c78e5d5
commit
50c4764588
BIN
assets/voxygen/element/icons/2hsword_m1.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/2hsword_m1.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/2hsword_m2.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/2hsword_m2.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/weapon/debug_wand.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/weapon/debug_wand.vox
(Stored with Git LFS)
Binary file not shown.
@ -3,7 +3,7 @@ use super::{
|
||||
/*FOCUS_COLOR, RAGE_COLOR,*/ HP_COLOR, LOW_HP_COLOR, MANA_COLOR, TEXT_COLOR, XP_COLOR,
|
||||
};
|
||||
use crate::GlobalState;
|
||||
use common::comp::Stats;
|
||||
use common::comp::{Stats,item::Tool};
|
||||
use conrod_core::{
|
||||
color,
|
||||
widget::{self, Button, Image, Rectangle, Text},
|
||||
@ -92,7 +92,8 @@ pub struct Skillbar<'a> {
|
||||
stats: &'a Stats,
|
||||
#[conrod(common_builder)]
|
||||
common: widget::CommonBuilder,
|
||||
current_resource: ResourceType,
|
||||
current_resource: ResourceType,
|
||||
pub character_tool: Option<Tool>,
|
||||
}
|
||||
|
||||
impl<'a> Skillbar<'a> {
|
||||
@ -102,13 +103,14 @@ impl<'a> Skillbar<'a> {
|
||||
fonts: &'a Fonts,
|
||||
stats: &'a Stats,
|
||||
) -> Self {
|
||||
Self {
|
||||
Self {
|
||||
imgs,
|
||||
_fonts: fonts,
|
||||
stats,
|
||||
global_state,
|
||||
current_resource: ResourceType::Mana,
|
||||
current_resource: ResourceType::Mana,
|
||||
common: widget::CommonBuilder::default(),
|
||||
character_tool: Some(Tool::Sword), // TODO: Pass the actual equipped weapon
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -155,7 +157,7 @@ impl<'a> Widget for Skillbar<'a> {
|
||||
let energy_percentage =
|
||||
self.stats.energy.current() as f64 / self.stats.energy.maximum() as f64 * 100.0;
|
||||
|
||||
let scale = 2.0;
|
||||
let scale = 2.0;
|
||||
|
||||
let bar_values = self.global_state.settings.gameplay.bar_numbers;
|
||||
let shortcuts = self.global_state.settings.gameplay.shortcut_numbers;
|
||||
@ -351,7 +353,17 @@ impl<'a> Widget for Skillbar<'a> {
|
||||
.color(Some(BG_COLOR))
|
||||
.middle_of(state.ids.m1_slot)
|
||||
.set(state.ids.m1_slot_bg, ui);
|
||||
Button::image(self.imgs.twohhammer_m1) // Insert Icon here
|
||||
Button::image(
|
||||
match self.character_tool {
|
||||
Some(Tool::Sword) => {self.imgs.twohsword_m1}
|
||||
Some(Tool::Axe) => {self.imgs.twohhammer_m1}
|
||||
Some(Tool::Hammer) => {self.imgs.twohhammer_m1}
|
||||
Some(Tool::Bow) => {self.imgs.twohhammer_m1}
|
||||
Some(Tool::Daggers) => {self.imgs.twohhammer_m1}
|
||||
Some(Tool::Staff) => {self.imgs.twohhammer_m1}
|
||||
_ => {self.imgs.twohhammer_m1}
|
||||
}
|
||||
) // Insert Icon here
|
||||
.w_h(38.0 * scale, 38.0 * scale)
|
||||
.middle_of(state.ids.m1_slot_bg)
|
||||
.set(state.ids.m1_content, ui);
|
||||
@ -365,7 +377,17 @@ impl<'a> Widget for Skillbar<'a> {
|
||||
.color(Some(BG_COLOR))
|
||||
.middle_of(state.ids.m2_slot)
|
||||
.set(state.ids.m2_slot_bg, ui);
|
||||
Button::image(self.imgs.twohhammer_m2) // Insert Icon here
|
||||
Button::image(
|
||||
match self.character_tool {
|
||||
Some(Tool::Sword) => {self.imgs.twohsword_m2}
|
||||
Some(Tool::Axe) => {self.imgs.twohhammer_m2}
|
||||
Some(Tool::Hammer) => {self.imgs.twohhammer_m2}
|
||||
Some(Tool::Bow) => {self.imgs.twohhammer_m2}
|
||||
Some(Tool::Daggers) => {self.imgs.twohhammer_m2}
|
||||
Some(Tool::Staff) => {self.imgs.twohhammer_m2}
|
||||
_ => {self.imgs.twohhammer_m2}
|
||||
}
|
||||
) // Insert Icon here
|
||||
.w_h(38.0 * scale, 38.0 * scale)
|
||||
.middle_of(state.ids.m2_slot_bg)
|
||||
.set(state.ids.m2_content, ui);
|
||||
|
@ -321,7 +321,7 @@ impl FigureModelCache {
|
||||
Tool::Bow => ("weapon.hammer.rusty_2h", Vec3::new(-2.5, -5.5, -4.0)),
|
||||
Tool::Staff => ("weapon.axe.rusty_2h", Vec3::new(-2.5, -6.5, -2.0)),
|
||||
},
|
||||
Item::Debug(_) => ("weapon.debug_wand", Vec3::new(-2.5, -6.5, -2.0)),
|
||||
Item::Debug(_) => ("weapon.debug_wand", Vec3::new(-1.5, -9.5, -4.0)),
|
||||
_ => ("figure.empty", Vec3::default()),
|
||||
};
|
||||
Self::load_mesh(name, offset)
|
||||
|
Loading…
Reference in New Issue
Block a user