mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
cleanup, icons
This commit is contained in:
parent
cb1b26d717
commit
935aec743d
BIN
assets/voxygen/element/icons/de_buffs/buff_damage_reduce_0.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/de_buffs/buff_damage_reduce_0.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/lifesteal.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/lifesteal.png
(Stored with Git LFS)
Binary file not shown.
@ -542,6 +542,7 @@ image_ids! {
|
|||||||
buff_energyplus_0: "voxygen.element.icons.de_buffs.buff_energyplus_0",
|
buff_energyplus_0: "voxygen.element.icons.de_buffs.buff_energyplus_0",
|
||||||
buff_healthplus_0: "voxygen.element.icons.de_buffs.buff_healthplus_0",
|
buff_healthplus_0: "voxygen.element.icons.de_buffs.buff_healthplus_0",
|
||||||
buff_invincibility_0: "voxygen.element.icons.de_buffs.buff_invincibility_0",
|
buff_invincibility_0: "voxygen.element.icons.de_buffs.buff_invincibility_0",
|
||||||
|
buff_dmg_red_0: "voxygen.element.icons.de_buffs.buff_damage_reduce_0",
|
||||||
|
|
||||||
// Debuffs
|
// Debuffs
|
||||||
debuff_skull_0: "voxygen.element.icons.de_buffs.debuff_skull_0",
|
debuff_skull_0: "voxygen.element.icons.de_buffs.debuff_skull_0",
|
||||||
|
@ -3305,8 +3305,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id {
|
|||||||
BuffKind::IncreaseMaxEnergy { .. } => imgs.buff_energyplus_0,
|
BuffKind::IncreaseMaxEnergy { .. } => imgs.buff_energyplus_0,
|
||||||
BuffKind::IncreaseMaxHealth { .. } => imgs.buff_healthplus_0,
|
BuffKind::IncreaseMaxHealth { .. } => imgs.buff_healthplus_0,
|
||||||
BuffKind::Invulnerability => imgs.buff_invincibility_0,
|
BuffKind::Invulnerability => imgs.buff_invincibility_0,
|
||||||
// Do not merge until icon for this buff
|
BuffKind::ProtectingWard => imgs.buff_dmg_red_0,
|
||||||
BuffKind::ProtectingWard => imgs.buff_invincibility_0,
|
|
||||||
// Debuffs
|
// Debuffs
|
||||||
BuffKind::Bleeding { .. } => imgs.debuff_bleed_0,
|
BuffKind::Bleeding { .. } => imgs.debuff_bleed_0,
|
||||||
BuffKind::Cursed { .. } => imgs.debuff_skull_0,
|
BuffKind::Cursed { .. } => imgs.debuff_skull_0,
|
||||||
|
@ -30,7 +30,6 @@ use conrod_core::{
|
|||||||
widget::{self, Button, Image, Rectangle, Text},
|
widget::{self, Button, Image, Rectangle, Text},
|
||||||
widget_ids, Color, Colorable, Positionable, Sizeable, Widget, WidgetCommon,
|
widget_ids, Color, Colorable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||||
};
|
};
|
||||||
use inline_tweak::*;
|
|
||||||
use vek::*;
|
use vek::*;
|
||||||
|
|
||||||
widget_ids! {
|
widget_ids! {
|
||||||
@ -926,28 +925,24 @@ impl<'a> Widget for Skillbar<'a> {
|
|||||||
let combo_txt = format!("{} Combo", combo.combo);
|
let combo_txt = format!("{} Combo", combo.combo);
|
||||||
let combo_cnt = combo.combo as f32;
|
let combo_cnt = combo.combo as f32;
|
||||||
let time_since_last_update = comp::combo::COMBO_DECAY_START - combo.timer;
|
let time_since_last_update = comp::combo::COMBO_DECAY_START - combo.timer;
|
||||||
let alpha = (1.0 - time_since_last_update * tweak!(0.2)).min(1.0) as f32;
|
let alpha = (1.0 - time_since_last_update * 0.2).min(1.0) as f32;
|
||||||
let fnt_col = Color::Rgba(
|
let fnt_col = Color::Rgba(
|
||||||
// White -> Yellow -> Red text color gradient depending on count
|
// White -> Yellow -> Red text color gradient depending on count
|
||||||
(1.0 - combo_cnt / (combo_cnt + tweak!(20.0))).max(0.79),
|
(1.0 - combo_cnt / (combo_cnt + 20.0)).max(0.79),
|
||||||
(1.0 - combo_cnt / (combo_cnt + tweak!(80.0))).max(0.19),
|
(1.0 - combo_cnt / (combo_cnt + 80.0)).max(0.19),
|
||||||
(1.0 - combo_cnt / (combo_cnt + tweak!(5.0))).max(0.17),
|
(1.0 - combo_cnt / (combo_cnt + 5.0)).max(0.17),
|
||||||
alpha,
|
alpha,
|
||||||
);
|
);
|
||||||
|
|
||||||
let fnt_size = ((14.0 + combo.timer as f32 * tweak!(0.8)).min(tweak!(30.0))) as u32
|
let fnt_size = ((14.0 + combo.timer as f32 * 0.8).min(30.0)) as u32
|
||||||
+ if (time_since_last_update) < tweak!(0.1) {
|
+ if (time_since_last_update) < 0.1 { 2 } else { 0 }; // Increase size for higher counts, "flash" on update by increasing the font size by 2
|
||||||
tweak!(2)
|
|
||||||
} else {
|
|
||||||
0
|
|
||||||
}; // Increase size for higher counts, "flash" on update by increasing the font size by 2
|
|
||||||
Rectangle::fill_with([10.0, 10.0], color::TRANSPARENT)
|
Rectangle::fill_with([10.0, 10.0], color::TRANSPARENT)
|
||||||
.middle_of(ui.window)
|
.middle_of(ui.window)
|
||||||
.set(state.ids.combo_align, ui);
|
.set(state.ids.combo_align, ui);
|
||||||
Text::new(combo_txt.as_str())
|
Text::new(combo_txt.as_str())
|
||||||
.mid_bottom_with_margin_on(
|
.mid_bottom_with_margin_on(
|
||||||
state.ids.combo_align,
|
state.ids.combo_align,
|
||||||
tweak!(-350.0) + time_since_last_update * tweak!(-8.0),
|
-350.0 + time_since_last_update * -8.0,
|
||||||
)
|
)
|
||||||
.font_size(self.fonts.cyri.scale(fnt_size))
|
.font_size(self.fonts.cyri.scale(fnt_size))
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user