mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
assset cleanup, transparency, new icons
This commit is contained in:
parent
964256541e
commit
8b05dda1d9
@ -1,6 +1,8 @@
|
|||||||
Item(
|
Item(
|
||||||
name: "Apple",
|
name: "Apple",
|
||||||
description: "Red and juicy.",
|
description: "Red and juicy.
|
||||||
|
|
||||||
|
Restores 20 Health.",
|
||||||
kind: Consumable(
|
kind: Consumable(
|
||||||
kind: Apple,
|
kind: Apple,
|
||||||
effect: Health((
|
effect: Health((
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
Item(
|
Item(
|
||||||
name: "Dwarven Cheese",
|
name: "Dwarven Cheese",
|
||||||
description: "Aromatic and nutritious.",
|
description: "Aromatic and nutritious.
|
||||||
|
|
||||||
|
Restores 40 Health.",
|
||||||
kind: Consumable(
|
kind: Consumable(
|
||||||
kind: Cheese,
|
kind: Cheese,
|
||||||
effect: Health((
|
effect: Health((
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
Item(
|
Item(
|
||||||
name: "Mushroom",
|
name: "Mushroom",
|
||||||
description: "Hopefully this one is not poisonous.",
|
description: "Hopefully this one is not poisonous.
|
||||||
|
|
||||||
|
Restores 10 Health.",
|
||||||
kind: Consumable(
|
kind: Consumable(
|
||||||
kind: Mushroom,
|
kind: Mushroom,
|
||||||
effect: Health((
|
effect: Health((
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
Item(
|
Item(
|
||||||
name: "Minor Potion",
|
name: "Minor Potion",
|
||||||
description: "Restores a small amount of Health.",
|
description: "Restores a small amount of Health.
|
||||||
|
|
||||||
|
Restores 50 Health.",
|
||||||
kind: Consumable(
|
kind: Consumable(
|
||||||
kind: PotionMinor,
|
kind: PotionMinor,
|
||||||
effect: Health((
|
effect: Health((
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
Item(
|
Item(
|
||||||
name: "Velorite",
|
name: "Velorite",
|
||||||
description: "Just a slight touch makes you feel the knowledge of ancient times.",
|
description: "Just a slight touch makes you feel the knowledge of ancient times.
|
||||||
|
|
||||||
|
Increases Exp by 20.",
|
||||||
kind: Consumable(
|
kind: Consumable(
|
||||||
kind: Velorite,
|
kind: Velorite,
|
||||||
effect: Xp(50),
|
effect: Xp(20),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
Item(
|
Item(
|
||||||
name: "Velorite Fragment",
|
name: "Velorite Fragment",
|
||||||
description: "Small runes sparkle on its surface.",
|
description: "Small runes sparkle on its surface.
|
||||||
|
|
||||||
|
Increases Exp by 10.",
|
||||||
kind: Consumable(
|
kind: Consumable(
|
||||||
kind: VeloriteFrag,
|
kind: VeloriteFrag,
|
||||||
effect: Xp(20),
|
effect: Xp(10),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
BIN
assets/voxygen/element/icons/2haxe_m1.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/2haxe_m1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/2haxe_m1.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/2haxe_m1.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/2haxe_m2.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/2haxe_m2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/2haxe_m2.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/2haxe_m2.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/2hhammer_m1.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/2hhammer_m1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/2hhammer_m1.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/2hhammer_m1.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/2hhammer_m2.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/2hhammer_m2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/2hhammer_m2.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/2hhammer_m2.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/2hsword_m1.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/2hsword_m1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
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.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/2hsword_m2.png
(Stored with Git LFS)
Normal file
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/element/icons/2hsword_slash.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/2hsword_slash.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/2hsword_slash.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/2hsword_slash.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/back.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/back.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/belt.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/belt.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/bow_m1.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/bow_m1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/bow_m1.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/bow_m1.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/chest.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/chest.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/collar.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/collar.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/collar.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/collar.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/debug_wand_m1.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/debug_wand_m1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/debug_wand_m1.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/debug_wand_m1.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/debug_wand_m2.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/debug_wand_m2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/debug_wand_m2.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/debug_wand_m2.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/feet.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/feet.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/gem.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/gem.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/hands.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/hands.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/head.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/head.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/item_flower.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/item_flower.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/item_mushroom.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/item_mushroom.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/legs.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/legs.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/mainhand.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/mainhand.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/necklace.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/necklace.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/offhand.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/offhand.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/ring.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/ring.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/shoulders.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/shoulders.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/skill_charge.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/skill_charge.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/skill_charge_2.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/skill_charge_2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/skill_charge_2.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/skill_charge_2.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/skill_charge_3.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/skill_charge_3.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/skill_charge_3.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/skill_charge_3.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/skill_slice_2.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/skill_slice_2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/skill_slice_2.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/skill_slice_2.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/skull.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/skull.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/skull.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/skull.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/skull_2.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/skull_2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/skull_2.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/skull_2.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/staff_m1.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/staff_m1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/staff_m1.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/staff_m1.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/staff_m2.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/icons/staff_m2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/icons/staff_m2.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/staff_m2.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/tabard.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/tabard.vox
(Stored with Git LFS)
Binary file not shown.
@ -55,10 +55,10 @@
|
|||||||
(0.0, 0.0, 0.0), (-90.0, 90.0, 0.0), 2.4,
|
(0.0, 0.0, 0.0), (-90.0, 90.0, 0.0), 2.4,
|
||||||
),
|
),
|
||||||
// Other
|
// Other
|
||||||
Utility(Collar): VoxTrans(
|
Utility(Collar): Png(
|
||||||
"element.icons.collar",
|
"element.icons.collar",
|
||||||
(0.0, 0.0, 0.0), (-90.0, 180.0, 10.0), 1.3,
|
|
||||||
),
|
),
|
||||||
|
|
||||||
// Armor
|
// Armor
|
||||||
// Assassin Set
|
// Assassin Set
|
||||||
Armor(Chest(Assassin)): VoxTrans(
|
Armor(Chest(Assassin)): VoxTrans(
|
||||||
|
@ -375,6 +375,7 @@ impl Item {
|
|||||||
"common.items.collar",
|
"common.items.collar",
|
||||||
"common.items.weapons.starter_sword",
|
"common.items.weapons.starter_sword",
|
||||||
"common.items.weapons.starter_axe",
|
"common.items.weapons.starter_axe",
|
||||||
|
"common.items.weapons.staff_nature",
|
||||||
"common.items.weapons.starter_hammer",
|
"common.items.weapons.starter_hammer",
|
||||||
"common.items.weapons.starter_bow",
|
"common.items.weapons.starter_bow",
|
||||||
"common.items.weapons.starter_staff",
|
"common.items.weapons.starter_staff",
|
||||||
|
@ -103,27 +103,11 @@ image_ids! {
|
|||||||
fireplace: "voxygen.element.misc_bg.fireplace",
|
fireplace: "voxygen.element.misc_bg.fireplace",
|
||||||
|
|
||||||
// Skill Icons
|
// Skill Icons
|
||||||
twohsword_m1: "voxygen.element.icons.2hsword_m1",
|
|
||||||
twohsword_m2: "voxygen.element.icons.2hsword_m2",
|
|
||||||
twohhammer_m1: "voxygen.element.icons.2hhammer_m1",
|
|
||||||
twohhammer_m2: "voxygen.element.icons.2hhammer_m2",
|
|
||||||
twohaxe_m1: "voxygen.element.icons.2haxe_m1",
|
|
||||||
twohaxe_m2: "voxygen.element.icons.2haxe_m2",
|
|
||||||
bow_m1: "voxygen.element.icons.bow_m1",
|
|
||||||
bow_m2: "voxygen.element.icons.bow_m2",
|
bow_m2: "voxygen.element.icons.bow_m2",
|
||||||
staff_m1: "voxygen.element.icons.staff_m1",
|
|
||||||
staff_m2: "voxygen.element.icons.staff_m2",
|
|
||||||
flyingrod_m1: "voxygen.element.icons.debug_wand_m1",
|
|
||||||
flyingrod_m2: "voxygen.element.icons.debug_wand_m2",
|
|
||||||
charge: "voxygen.element.icons.skill_charge_3",
|
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
flower: "voxygen.element.icons.item_flower",
|
flower: "voxygen.element.icons.item_flower",
|
||||||
grass: "voxygen.element.icons.item_grass",
|
grass: "voxygen.element.icons.item_grass",
|
||||||
apple: "voxygen.element.icons.item_apple",
|
|
||||||
mushroom: "voxygen.element.icons.item_mushroom",
|
|
||||||
skull: "voxygen.element.icons.skull",
|
|
||||||
skull_2: "voxygen.element.icons.skull_2",
|
|
||||||
|
|
||||||
// Map
|
// Map
|
||||||
indicator_mmap: "voxygen.element.buttons.indicator_mmap",
|
indicator_mmap: "voxygen.element.buttons.indicator_mmap",
|
||||||
@ -202,6 +186,25 @@ image_ids! {
|
|||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
<ImageGraphic>
|
<ImageGraphic>
|
||||||
|
// Skill Icons
|
||||||
|
twohsword_m1: "voxygen.element.icons.2hsword_m1",
|
||||||
|
twohsword_m2: "voxygen.element.icons.2hsword_m2",
|
||||||
|
twohhammer_m1: "voxygen.element.icons.2hhammer_m1",
|
||||||
|
twohhammer_m2: "voxygen.element.icons.2hhammer_m2",
|
||||||
|
twohaxe_m1: "voxygen.element.icons.2haxe_m1",
|
||||||
|
twohaxe_m2: "voxygen.element.icons.2haxe_m2",
|
||||||
|
bow_m1: "voxygen.element.icons.bow_m1",
|
||||||
|
//bow_m2: "voxygen.element.icons.bow_m2",
|
||||||
|
staff_m1: "voxygen.element.icons.staff_m1",
|
||||||
|
staff_m2: "voxygen.element.icons.staff_m2",
|
||||||
|
flyingrod_m1: "voxygen.element.icons.debug_wand_m1",
|
||||||
|
flyingrod_m2: "voxygen.element.icons.debug_wand_m2",
|
||||||
|
charge: "voxygen.element.icons.skill_charge_3",
|
||||||
|
|
||||||
|
// Other Icons
|
||||||
|
skull: "voxygen.element.icons.skull",
|
||||||
|
skull_2: "voxygen.element.icons.skull_2",
|
||||||
|
|
||||||
// Map
|
// Map
|
||||||
map_bg: "voxygen.element.misc_bg.map_bg",
|
map_bg: "voxygen.element.misc_bg.map_bg",
|
||||||
map_frame: "voxygen.element.misc_bg.map_frame",
|
map_frame: "voxygen.element.misc_bg.map_frame",
|
||||||
|
@ -19,11 +19,12 @@ 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 const_tweaker::tweak;
|
|
||||||
use std::time::{Duration, Instant}; // <- REMOVE THIS BEFORE MERGE!
|
|
||||||
|
|
||||||
/*#[tweak(min = 0.5, max = 1.0, step = 0.01)]
|
use std::time::{Duration, Instant};
|
||||||
const ALPHA: f32 = 0.90;*/
|
/*
|
||||||
|
use const_tweaker::tweak;
|
||||||
|
#[tweak(min = 0.0, max = 1.0, step = 0.01)]
|
||||||
|
const RGB: f32 = 0.1;*/
|
||||||
|
|
||||||
widget_ids! {
|
widget_ids! {
|
||||||
struct Ids {
|
struct Ids {
|
||||||
@ -608,9 +609,9 @@ impl<'a> Widget for Skillbar<'a> {
|
|||||||
ToolKind::Bow(_) => self.imgs.bow_m1,
|
ToolKind::Bow(_) => self.imgs.bow_m1,
|
||||||
ToolKind::Staff(_) => self.imgs.staff_m1,
|
ToolKind::Staff(_) => self.imgs.staff_m1,
|
||||||
ToolKind::Debug(DebugKind::Boost) => self.imgs.flyingrod_m1,
|
ToolKind::Debug(DebugKind::Boost) => self.imgs.flyingrod_m1,
|
||||||
_ => self.imgs.twohaxe_m1,
|
_ => self.imgs.nothing,
|
||||||
},
|
},
|
||||||
_ => self.imgs.twohaxe_m1,
|
_ => self.imgs.nothing,
|
||||||
},
|
},
|
||||||
) // Insert Icon here
|
) // Insert Icon here
|
||||||
.w(
|
.w(
|
||||||
@ -704,21 +705,20 @@ impl<'a> Widget for Skillbar<'a> {
|
|||||||
match self.loadout.active_item.as_ref().map(|i| &i.item.kind) {
|
match self.loadout.active_item.as_ref().map(|i| &i.item.kind) {
|
||||||
Some(ItemKind::Tool(ToolData { kind, .. })) => match kind {
|
Some(ItemKind::Tool(ToolData { kind, .. })) => match kind {
|
||||||
ToolKind::Sword(_) => self.imgs.charge,
|
ToolKind::Sword(_) => self.imgs.charge,
|
||||||
ToolKind::Hammer(_) => self.imgs.twohhammer_m2,
|
ToolKind::Hammer(_) => self.imgs.nothing,
|
||||||
ToolKind::Axe(_) => self.imgs.twohaxe_m2,
|
ToolKind::Axe(_) => self.imgs.nothing,
|
||||||
ToolKind::Bow(_) => self.imgs.bow_m2,
|
ToolKind::Bow(_) => self.imgs.nothing,
|
||||||
ToolKind::Staff(StaffKind::Sceptre) => self.imgs.heal_0,
|
ToolKind::Staff(StaffKind::Sceptre) => self.imgs.heal_0,
|
||||||
ToolKind::Staff(_) => self.imgs.staff_m2,
|
ToolKind::Staff(_) => self.imgs.staff_m2,
|
||||||
ToolKind::Debug(DebugKind::Boost) => self.imgs.flyingrod_m2,
|
ToolKind::Debug(DebugKind::Boost) => self.imgs.flyingrod_m2,
|
||||||
_ => self.imgs.twohaxe_m2,
|
_ => self.imgs.nothing,
|
||||||
},
|
},
|
||||||
_ => self.imgs.twohaxe_m2,
|
_ => self.imgs.nothing,
|
||||||
},
|
},
|
||||||
) // Insert Icon here
|
) // Insert Icon here
|
||||||
.w(
|
.w(
|
||||||
match self.loadout.active_item.as_ref().map(|i| &i.item.kind) {
|
match self.loadout.active_item.as_ref().map(|i| &i.item.kind) {
|
||||||
Some(ItemKind::Tool(ToolData { kind, .. })) => match kind {
|
Some(ItemKind::Tool(ToolData { kind, .. })) => match kind {
|
||||||
ToolKind::Bow(_) => 30.0 * scale,
|
|
||||||
ToolKind::Staff(_) => 30.0 * scale,
|
ToolKind::Staff(_) => 30.0 * scale,
|
||||||
_ => 38.0 * scale,
|
_ => 38.0 * scale,
|
||||||
},
|
},
|
||||||
@ -728,7 +728,6 @@ impl<'a> Widget for Skillbar<'a> {
|
|||||||
.h(
|
.h(
|
||||||
match self.loadout.active_item.as_ref().map(|i| &i.item.kind) {
|
match self.loadout.active_item.as_ref().map(|i| &i.item.kind) {
|
||||||
Some(ItemKind::Tool(ToolData { kind, .. })) => match kind {
|
Some(ItemKind::Tool(ToolData { kind, .. })) => match kind {
|
||||||
ToolKind::Bow(_) => 30.0 * scale,
|
|
||||||
ToolKind::Staff(_) => 30.0 * scale,
|
ToolKind::Staff(_) => 30.0 * scale,
|
||||||
_ => 38.0 * scale,
|
_ => 38.0 * scale,
|
||||||
},
|
},
|
||||||
@ -736,14 +735,21 @@ impl<'a> Widget for Skillbar<'a> {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.middle_of(state.ids.m2_slot_bg)
|
.middle_of(state.ids.m2_slot_bg)
|
||||||
.color(
|
.image_color(
|
||||||
match self.loadout.active_item.as_ref().map(|i| &i.item.kind) {
|
match self.loadout.active_item.as_ref().map(|i| &i.item.kind) {
|
||||||
Some(ItemKind::Tool(ToolData { kind, .. })) => match kind {
|
Some(ItemKind::Tool(ToolData { kind, .. })) => match kind {
|
||||||
ToolKind::Sword(_) => {
|
ToolKind::Sword(_) => {
|
||||||
if self.energy.current() as f64 >= 200.0 {
|
if self.energy.current() as f64 >= 200.0 {
|
||||||
Color::Rgba(1.0, 1.0, 1.0, 1.0)
|
Color::Rgba(1.0, 1.0, 1.0, 1.0)
|
||||||
} else {
|
} else {
|
||||||
Color::Rgba(0.4, 0.4, 0.4, 1.0)
|
Color::Rgba(0.3, 0.3, 0.3, 0.8)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ToolKind::Staff(StaffKind::Sceptre) => {
|
||||||
|
if self.energy.current() as f64 >= 400.0 {
|
||||||
|
Color::Rgba(1.0, 1.0, 1.0, 1.0)
|
||||||
|
} else {
|
||||||
|
Color::Rgba(0.3, 0.3, 0.3, 0.8)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ => Color::Rgba(1.0, 1.0, 1.0, 1.0),
|
_ => Color::Rgba(1.0, 1.0, 1.0, 1.0),
|
||||||
@ -844,7 +850,7 @@ impl<'a> Widget for Skillbar<'a> {
|
|||||||
.color(if self.energy.current() as f64 >= 500.0 {
|
.color(if self.energy.current() as f64 >= 500.0 {
|
||||||
Some(Color::Rgba(1.0, 1.0, 1.0, 1.0))
|
Some(Color::Rgba(1.0, 1.0, 1.0, 1.0))
|
||||||
} else {
|
} else {
|
||||||
Some(Color::Rgba(0.4, 0.4, 0.4, 1.0))
|
Some(Color::Rgba(0.3, 0.3, 0.3, 0.8))
|
||||||
})
|
})
|
||||||
.middle_of(state.ids.slot1_bg)
|
.middle_of(state.ids.slot1_bg)
|
||||||
.set(state.ids.slot1_icon, ui);
|
.set(state.ids.slot1_icon, ui);
|
||||||
|
Loading…
Reference in New Issue
Block a user