mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
asset cleanup, map visuals
This commit is contained in:
parent
362771be4b
commit
50b7206577
BIN
assets/voxygen/element/buttons/character.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/character.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/character_hover.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/character_hover.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/character_press.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/character_press.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/indicator_mmap.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/indicator_mmap.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/indicator_mmap_small.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/indicator_mmap_small.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/qlog.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/qlog.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/qlog_hover.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/qlog_hover.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/qlog_press.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/qlog_press.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/map_bl.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/map_bl.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/map_br.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/map_br.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/map_l.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/map_l.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/map_r.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/map_r.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/mmap.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/mmap.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/mmap_closed.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/mmap_closed.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/charwindow.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/charwindow.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/map.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/map.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/questlog.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/questlog.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/settings.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/settings.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/skill_charge_3.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/skill_charge_3.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/social.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/social.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/spellbook.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/spellbook.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_bg.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/crosshair_bg.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_bg.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/crosshair_bg.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_bg_hover.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/crosshair_bg_hover.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_bg_hover.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/crosshair_bg_hover.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_bg_press.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/crosshair_bg_press.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_bg_press.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/crosshair_bg_press.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_bg_pressed.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/crosshair_bg_pressed.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_bg_pressed.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/crosshair_bg_pressed.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_inner.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/crosshair_inner.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_inner.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/crosshair_inner.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_outer_1.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/crosshair_outer_1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_outer_1.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/crosshair_outer_1.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_outer_2.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/crosshair_outer_2.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_outer_2.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/crosshair_outer_2.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_outer_3.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/crosshair_outer_3.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/crosshair_outer_3.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/crosshair_outer_3.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/fireplace.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/fireplace.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/map_bg.png
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/map_bg.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/map_frame.png
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/map_frame.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/map_frame_art.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/map_frame_art.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/mmap_bg.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/mmap_bg.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/textbox.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/textbox.vox
(Stored with Git LFS)
Binary file not shown.
@ -193,8 +193,15 @@ Enjoy your stay in the World of Veloren."#,
|
|||||||
|
|
||||||
// Inventory
|
// Inventory
|
||||||
"hud.bag.inventory": "'s Inventory",
|
"hud.bag.inventory": "'s Inventory",
|
||||||
"hud.bag.stats": "'s Stats",
|
"hud.bag.stats_title": "'s Stats",
|
||||||
"hud.bag.exp": "Exp",
|
"hud.bag.exp": "Exp",
|
||||||
|
"hud.bag.armor": "Armor",
|
||||||
|
"hud.bag.stats": "Stats",
|
||||||
|
|
||||||
|
// Map and Questlog
|
||||||
|
"hud.map.map_title": "Map",
|
||||||
|
"hud.map.qlog_title": "Quests",
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
"hud.settings.general": "General",
|
"hud.settings.general": "General",
|
||||||
"hud.settings.none": "None",
|
"hud.settings.none": "None",
|
||||||
|
@ -15,7 +15,7 @@ use conrod_core::{
|
|||||||
widget::{self, Button, Image, Rectangle, Text},
|
widget::{self, Button, Image, Rectangle, Text},
|
||||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||||
};
|
};
|
||||||
//use const_tweaker::tweak;
|
//
|
||||||
|
|
||||||
widget_ids! {
|
widget_ids! {
|
||||||
pub struct Ids {
|
pub struct Ids {
|
||||||
@ -150,8 +150,7 @@ pub enum Event {
|
|||||||
Close,
|
Close,
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
#[tweak(min = -100.0, max = 20.0, step = 1.0)]
|
|
||||||
const END_X: f64 = 10.0;
|
|
||||||
*/
|
*/
|
||||||
impl<'a> Widget for Bag<'a> {
|
impl<'a> Widget for Bag<'a> {
|
||||||
type Event = Option<Event>;
|
type Event = Option<Event>;
|
||||||
@ -498,7 +497,7 @@ impl<'a> Widget for Bag<'a> {
|
|||||||
Text::new(&format!(
|
Text::new(&format!(
|
||||||
"{}{}",
|
"{}{}",
|
||||||
&self.stats.name,
|
&self.stats.name,
|
||||||
&self.localized_strings.get("hud.bag.stats")
|
&self.localized_strings.get("hud.bag.stats_title")
|
||||||
))
|
))
|
||||||
.mid_top_with_margin_on(state.ids.bg_frame, 9.0)
|
.mid_top_with_margin_on(state.ids.bg_frame, 9.0)
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
@ -508,7 +507,7 @@ impl<'a> Widget for Bag<'a> {
|
|||||||
Text::new(&format!(
|
Text::new(&format!(
|
||||||
"{}{}",
|
"{}{}",
|
||||||
&self.stats.name,
|
&self.stats.name,
|
||||||
&self.localized_strings.get("hud.bag.stats")
|
&self.localized_strings.get("hud.bag.stats_title")
|
||||||
))
|
))
|
||||||
.top_left_with_margins_on(state.ids.inventory_title_bg, 2.0, 2.0)
|
.top_left_with_margins_on(state.ids.inventory_title_bg, 2.0, 2.0)
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
@ -749,7 +748,11 @@ impl<'a> Widget for Bag<'a> {
|
|||||||
.mid_top_with_margin_on(state.ids.bg, 435.0)
|
.mid_top_with_margin_on(state.ids.bg, 435.0)
|
||||||
.hover_image(self.imgs.button_hover)
|
.hover_image(self.imgs.button_hover)
|
||||||
.press_image(self.imgs.button_press)
|
.press_image(self.imgs.button_press)
|
||||||
.label(if self.show.stats { "Armor" } else { "Stats" })
|
.label(if self.show.stats {
|
||||||
|
&self.localized_strings.get("hud.bag.armor")
|
||||||
|
} else {
|
||||||
|
&self.localized_strings.get("hud.bag.stats")
|
||||||
|
})
|
||||||
.label_y(conrod_core::position::Relative::Scalar(1.0))
|
.label_y(conrod_core::position::Relative::Scalar(1.0))
|
||||||
.label_color(TEXT_COLOR)
|
.label_color(TEXT_COLOR)
|
||||||
.label_font_size(self.fonts.cyri.scale(12))
|
.label_font_size(self.fonts.cyri.scale(12))
|
||||||
|
@ -83,12 +83,6 @@ impl<'a> Widget for EscMenu<'a> {
|
|||||||
.mid_top_with_margin_on(state.ids.esc_bg, -34.0)
|
.mid_top_with_margin_on(state.ids.esc_bg, -34.0)
|
||||||
.set(state.ids.banner_top, ui);
|
.set(state.ids.banner_top, ui);
|
||||||
|
|
||||||
/*Image::new(self.imgs.fireplace)
|
|
||||||
.w_h(210.0, 60.0)
|
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, 0.8)))
|
|
||||||
.mid_top_with_margin_on(state.ids.esc_bg, 5.0)
|
|
||||||
.set(state.ids.fireplace, ui);*/
|
|
||||||
|
|
||||||
// Resume
|
// Resume
|
||||||
if Button::image(self.imgs.button)
|
if Button::image(self.imgs.button)
|
||||||
.mid_bottom_with_margin_on(state.ids.banner_top, -60.0)
|
.mid_bottom_with_margin_on(state.ids.banner_top, -60.0)
|
||||||
|
@ -9,12 +9,11 @@ rotation_image_ids! {
|
|||||||
tt_side: "voxygen/element/frames/tt_test_edge",
|
tt_side: "voxygen/element/frames/tt_test_edge",
|
||||||
tt_corner: "voxygen/element/frames/tt_test_corner_tr",
|
tt_corner: "voxygen/element/frames/tt_test_corner_tr",
|
||||||
|
|
||||||
|
<ImageGraphic>
|
||||||
|
indicator_mmap_small: "voxygen.element.buttons.indicator_mmap_small",
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
<VoxelPixArtGraphic>
|
<VoxelPixArtGraphic>
|
||||||
|
|
||||||
// Minimap
|
|
||||||
indicator_mmap_small: "voxygen.element.buttons.indicator_mmap_small",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,29 +78,16 @@ image_ids! {
|
|||||||
slider_indicator: "voxygen.element.slider.indicator",
|
slider_indicator: "voxygen.element.slider.indicator",
|
||||||
esc_frame: "voxygen.element.frames.esc_menu",
|
esc_frame: "voxygen.element.frames.esc_menu",
|
||||||
|
|
||||||
// Map Window
|
|
||||||
map_frame_l: "voxygen.element.frames.map_l",
|
|
||||||
map_frame_r: "voxygen.element.frames.map_r",
|
|
||||||
map_frame_bl: "voxygen.element.frames.map_bl",
|
|
||||||
map_frame_br: "voxygen.element.frames.map_br",
|
|
||||||
pos_indicator: "voxygen.element.buttons.qlog",
|
|
||||||
|
|
||||||
// Chat-Arrows
|
// Chat-Arrows
|
||||||
chat_arrow: "voxygen.element.buttons.arrow_down",
|
chat_arrow: "voxygen.element.buttons.arrow_down",
|
||||||
chat_arrow_mo: "voxygen.element.buttons.arrow_down_hover",
|
chat_arrow_mo: "voxygen.element.buttons.arrow_down_hover",
|
||||||
chat_arrow_press: "voxygen.element.buttons.arrow_down_press",
|
chat_arrow_press: "voxygen.element.buttons.arrow_down_press",
|
||||||
|
|
||||||
// Crosshair
|
|
||||||
crosshair_inner: "voxygen.element.misc_bg.crosshair_inner",
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
<VoxelPixArtGraphic>
|
<VoxelPixArtGraphic>
|
||||||
|
|
||||||
// Esc-Menu
|
|
||||||
fireplace: "voxygen.element.misc_bg.fireplace",
|
|
||||||
|
|
||||||
// Skill Icons
|
// Skill Icons
|
||||||
bow_m2: "voxygen.element.icons.bow_m2",
|
bow_m2: "voxygen.element.icons.bow_m2",
|
||||||
|
|
||||||
@ -109,21 +95,12 @@ image_ids! {
|
|||||||
flower: "voxygen.element.icons.item_flower",
|
flower: "voxygen.element.icons.item_flower",
|
||||||
grass: "voxygen.element.icons.item_grass",
|
grass: "voxygen.element.icons.item_grass",
|
||||||
|
|
||||||
|
// Minimap
|
||||||
|
|
||||||
// Map
|
// Map
|
||||||
indicator_mmap: "voxygen.element.buttons.indicator_mmap",
|
|
||||||
indicator_mmap_2: "voxygen.element.buttons.indicator_mmap_2",
|
indicator_mmap_2: "voxygen.element.buttons.indicator_mmap_2",
|
||||||
indicator_mmap_3: "voxygen.element.buttons.indicator_mmap_3",
|
indicator_mmap_3: "voxygen.element.buttons.indicator_mmap_3",
|
||||||
|
|
||||||
// Crosshair
|
|
||||||
crosshair_outer_round: "voxygen.element.misc_bg.crosshair_outer_1",
|
|
||||||
crosshair_outer_round_edges: "voxygen.element.misc_bg.crosshair_outer_2",
|
|
||||||
crosshair_outer_edges: "voxygen.element.misc_bg.crosshair_outer_3",
|
|
||||||
|
|
||||||
crosshair_bg: "voxygen.element.misc_bg.crosshair_bg",
|
|
||||||
crosshair_bg_hover: "voxygen.element.misc_bg.crosshair_bg_hover",
|
|
||||||
crosshair_bg_press: "voxygen.element.misc_bg.crosshair_bg_press",
|
|
||||||
crosshair_bg_pressed: "voxygen.element.misc_bg.crosshair_bg_pressed",
|
|
||||||
|
|
||||||
// Checkboxes and Radio buttons
|
// Checkboxes and Radio buttons
|
||||||
check: "voxygen.element.buttons.radio.inactive",
|
check: "voxygen.element.buttons.radio.inactive",
|
||||||
check_mo: "voxygen.element.buttons.radio.inactive_hover",
|
check_mo: "voxygen.element.buttons.radio.inactive_hover",
|
||||||
@ -157,20 +134,10 @@ image_ids! {
|
|||||||
spellbook_hover: "voxygen.element.buttons.spellbook_hover",
|
spellbook_hover: "voxygen.element.buttons.spellbook_hover",
|
||||||
spellbook_press: "voxygen.element.buttons.spellbook_press",
|
spellbook_press: "voxygen.element.buttons.spellbook_press",
|
||||||
|
|
||||||
character_button: "voxygen.element.buttons.character",
|
|
||||||
character_hover: "voxygen.element.buttons.character_hover",
|
|
||||||
character_press: "voxygen.element.buttons.character_press",
|
|
||||||
|
|
||||||
qlog_button: "voxygen.element.buttons.qlog",
|
|
||||||
qlog_hover: "voxygen.element.buttons.qlog_hover",
|
|
||||||
qlog_press: "voxygen.element.buttons.qlog_press",
|
|
||||||
|
|
||||||
// Charwindow
|
// Charwindow
|
||||||
xp_charwindow: "voxygen.element.frames.xp_charwindow",
|
xp_charwindow: "voxygen.element.frames.xp_charwindow",
|
||||||
divider: "voxygen.element.frames.divider_charwindow",
|
divider: "voxygen.element.frames.divider_charwindow",
|
||||||
|
|
||||||
// Close button
|
|
||||||
|
|
||||||
|
|
||||||
// Items
|
// Items
|
||||||
potion_red: "voxygen.voxel.object.potion_red",
|
potion_red: "voxygen.voxel.object.potion_red",
|
||||||
@ -180,12 +147,10 @@ image_ids! {
|
|||||||
key_gold: "voxygen.voxel.object.key_gold",
|
key_gold: "voxygen.voxel.object.key_gold",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
<ImageGraphic>
|
<ImageGraphic>
|
||||||
|
|
||||||
// Skill Icons
|
// Skill Icons
|
||||||
twohsword_m1: "voxygen.element.icons.2hsword_m1",
|
twohsword_m1: "voxygen.element.icons.2hsword_m1",
|
||||||
twohsword_m2: "voxygen.element.icons.2hsword_m2",
|
twohsword_m2: "voxygen.element.icons.2hsword_m2",
|
||||||
@ -201,13 +166,28 @@ image_ids! {
|
|||||||
flyingrod_m2: "voxygen.element.icons.debug_wand_m2",
|
flyingrod_m2: "voxygen.element.icons.debug_wand_m2",
|
||||||
charge: "voxygen.element.icons.skill_charge_3",
|
charge: "voxygen.element.icons.skill_charge_3",
|
||||||
|
|
||||||
// Other Icons
|
// Other Icons/Art
|
||||||
skull: "voxygen.element.icons.skull",
|
skull: "voxygen.element.icons.skull",
|
||||||
skull_2: "voxygen.element.icons.skull_2",
|
skull_2: "voxygen.element.icons.skull_2",
|
||||||
|
fireplace: "voxygen.element.misc_bg.fireplace",
|
||||||
|
|
||||||
|
// Crosshair
|
||||||
|
crosshair_inner: "voxygen.element.misc_bg.crosshair_inner",
|
||||||
|
|
||||||
|
crosshair_outer_round: "voxygen.element.misc_bg.crosshair_outer_1",
|
||||||
|
crosshair_outer_round_edges: "voxygen.element.misc_bg.crosshair_outer_2",
|
||||||
|
crosshair_outer_edges: "voxygen.element.misc_bg.crosshair_outer_3",
|
||||||
|
|
||||||
|
crosshair_bg: "voxygen.element.misc_bg.crosshair_bg",
|
||||||
|
crosshair_bg_hover: "voxygen.element.misc_bg.crosshair_bg_hover",
|
||||||
|
crosshair_bg_press: "voxygen.element.misc_bg.crosshair_bg_press",
|
||||||
|
crosshair_bg_pressed: "voxygen.element.misc_bg.crosshair_bg_pressed",
|
||||||
|
|
||||||
// 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",
|
||||||
|
map_frame_art: "voxygen.element.misc_bg.map_frame_art",
|
||||||
|
indicator_mmap: "voxygen.element.buttons.indicator_mmap",
|
||||||
|
|
||||||
// MiniMap
|
// MiniMap
|
||||||
mmap_frame: "voxygen.element.frames.mmap",
|
mmap_frame: "voxygen.element.frames.mmap",
|
||||||
@ -291,8 +271,6 @@ image_ids! {
|
|||||||
enemy_health_bg: "voxygen.element.frames.enemybar_bg",
|
enemy_health_bg: "voxygen.element.frames.enemybar_bg",
|
||||||
// Enemy Bar Content:
|
// Enemy Bar Content:
|
||||||
enemy_bar: "voxygen.element.skillbar.enemy_bar_content",
|
enemy_bar: "voxygen.element.skillbar.enemy_bar_content",
|
||||||
// Spell Book Window
|
|
||||||
spellbook_icon: "voxygen.element.icons.spellbook",
|
|
||||||
// Bag
|
// Bag
|
||||||
bag: "voxygen.element.buttons.bag.closed",
|
bag: "voxygen.element.buttons.bag.closed",
|
||||||
bag_hover: "voxygen.element.buttons.bag.closed_hover",
|
bag_hover: "voxygen.element.buttons.bag.closed_hover",
|
||||||
@ -312,13 +290,6 @@ image_ids! {
|
|||||||
progress_frame: "voxygen.element.frames.progress_bar",
|
progress_frame: "voxygen.element.frames.progress_bar",
|
||||||
progress: "voxygen.element.misc_bg.progress",
|
progress: "voxygen.element.misc_bg.progress",
|
||||||
|
|
||||||
// Quest-Log Window
|
|
||||||
questlog_icon: "voxygen.element.icons.questlog",
|
|
||||||
|
|
||||||
|
|
||||||
// Social Window
|
|
||||||
social_icon: "voxygen.element.icons.social",
|
|
||||||
|
|
||||||
<BlankGraphic>
|
<BlankGraphic>
|
||||||
nothing: (),
|
nothing: (),
|
||||||
}
|
}
|
||||||
|
@ -1,32 +1,40 @@
|
|||||||
use super::{
|
use super::{
|
||||||
img_ids::{Imgs, ImgsRot},
|
img_ids::{Imgs, ImgsRot},
|
||||||
Show, TEXT_COLOR,
|
Show, TEXT_COLOR, UI_HIGHLIGHT_0, UI_MAIN,
|
||||||
|
};
|
||||||
|
use crate::{
|
||||||
|
i18n::VoxygenLocalization,
|
||||||
|
ui::{fonts::ConrodVoxygenFonts, img_ids},
|
||||||
};
|
};
|
||||||
use crate::ui::{fonts::ConrodVoxygenFonts, img_ids};
|
|
||||||
use client::{self, Client};
|
use client::{self, Client};
|
||||||
use common::{comp, terrain::TerrainChunkSize, vol::RectVolSize};
|
use common::{comp, terrain::TerrainChunkSize, vol::RectVolSize};
|
||||||
use conrod_core::{
|
use conrod_core::{
|
||||||
color,
|
color,
|
||||||
widget::{self, Button, Image, Rectangle, Text},
|
widget::{self, Button, Image, Rectangle, Text},
|
||||||
widget_ids, Color, Colorable, Positionable, Sizeable, Widget, WidgetCommon,
|
widget_ids, Colorable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||||
};
|
};
|
||||||
|
//use const_tweaker::tweak;
|
||||||
use specs::WorldExt;
|
use specs::WorldExt;
|
||||||
use vek::*;
|
use vek::*;
|
||||||
|
/*#[tweak(min = 0.0, max = 40.0, step = 1.0)]
|
||||||
|
const X: f64 = 10.0;
|
||||||
|
#[tweak(min = 0.0, max = 40.0, step = 1.0)]
|
||||||
|
const Y: f64 = 10.0;*/
|
||||||
|
|
||||||
widget_ids! {
|
widget_ids! {
|
||||||
struct Ids {
|
struct Ids {
|
||||||
map_frame,
|
frame,
|
||||||
map_bg,
|
bg,
|
||||||
map_icon,
|
icon,
|
||||||
map_close,
|
close,
|
||||||
map_title,
|
title,
|
||||||
map_frame_l,
|
map_align,
|
||||||
map_frame_r,
|
qlog_align,
|
||||||
map_frame_bl,
|
|
||||||
map_frame_br,
|
|
||||||
location_name,
|
location_name,
|
||||||
indicator,
|
indicator,
|
||||||
grid,
|
grid,
|
||||||
|
map_title,
|
||||||
|
qlog_title,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +49,7 @@ pub struct Map<'a> {
|
|||||||
#[conrod(common_builder)]
|
#[conrod(common_builder)]
|
||||||
common: widget::CommonBuilder,
|
common: widget::CommonBuilder,
|
||||||
_pulse: f32,
|
_pulse: f32,
|
||||||
velocity: f32,
|
localized_strings: &'a std::sync::Arc<VoxygenLocalization>,
|
||||||
}
|
}
|
||||||
impl<'a> Map<'a> {
|
impl<'a> Map<'a> {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
@ -52,7 +60,7 @@ impl<'a> Map<'a> {
|
|||||||
world_map: &'a (img_ids::Rotations, Vec2<u32>),
|
world_map: &'a (img_ids::Rotations, Vec2<u32>),
|
||||||
fonts: &'a ConrodVoxygenFonts,
|
fonts: &'a ConrodVoxygenFonts,
|
||||||
pulse: f32,
|
pulse: f32,
|
||||||
velocity: f32,
|
localized_strings: &'a std::sync::Arc<VoxygenLocalization>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
_show: show,
|
_show: show,
|
||||||
@ -63,7 +71,7 @@ impl<'a> Map<'a> {
|
|||||||
fonts,
|
fonts,
|
||||||
common: widget::CommonBuilder::default(),
|
common: widget::CommonBuilder::default(),
|
||||||
_pulse: pulse,
|
_pulse: pulse,
|
||||||
velocity,
|
localized_strings,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,87 +99,96 @@ impl<'a> Widget for Map<'a> {
|
|||||||
|
|
||||||
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {
|
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {
|
||||||
let widget::UpdateArgs { state, ui, .. } = args;
|
let widget::UpdateArgs { state, ui, .. } = args;
|
||||||
// Set map transparency to 0.5 when player is moving
|
|
||||||
let mut fade = 1.0;
|
|
||||||
if self.velocity > 2.5 {
|
|
||||||
fade = 0.7
|
|
||||||
};
|
|
||||||
|
|
||||||
// BG
|
|
||||||
Rectangle::fill_with([824.0, 976.0], color::TRANSPARENT)
|
|
||||||
.mid_top_with_margin_on(ui.window, 15.0)
|
|
||||||
.scroll_kids()
|
|
||||||
.scroll_kids_vertically()
|
|
||||||
.set(state.ids.map_bg, ui);
|
|
||||||
|
|
||||||
// Frame
|
// Frame
|
||||||
Image::new(self.imgs.map_frame_l)
|
Image::new(self.imgs.map_bg)
|
||||||
.top_left_with_margins_on(state.ids.map_bg, 0.0, 0.0)
|
.w_h(1052.0, 886.0)
|
||||||
.w_h(412.0, 488.0)
|
.mid_top_with_margin_on(ui.window, 5.0)
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, fade)))
|
.color(Some(UI_MAIN))
|
||||||
.set(state.ids.map_frame_l, ui);
|
.set(state.ids.bg, ui);
|
||||||
Image::new(self.imgs.map_frame_r)
|
|
||||||
.right_from(state.ids.map_frame_l, 0.0)
|
Image::new(self.imgs.map_frame)
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, fade)))
|
.w_h(1052.0, 886.0)
|
||||||
.w_h(412.0, 488.0)
|
.middle_of(state.ids.bg)
|
||||||
.set(state.ids.map_frame_r, ui);
|
.color(Some(UI_HIGHLIGHT_0))
|
||||||
Image::new(self.imgs.map_frame_br)
|
.set(state.ids.frame, ui);
|
||||||
.down_from(state.ids.map_frame_r, 0.0)
|
|
||||||
.w_h(412.0, 488.0)
|
// Map Content Alignment
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, fade)))
|
Rectangle::fill_with([814.0, 834.0], color::TRANSPARENT)
|
||||||
.set(state.ids.map_frame_br, ui);
|
.top_right_with_margins_on(state.ids.frame, 46.0, 2.0)
|
||||||
Image::new(self.imgs.map_frame_bl)
|
.set(state.ids.map_align, ui);
|
||||||
.down_from(state.ids.map_frame_l, 0.0)
|
|
||||||
.w_h(412.0, 488.0)
|
// Questlog Content Alignment
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, fade)))
|
Rectangle::fill_with([232.0, 814.0], color::TRANSPARENT)
|
||||||
.set(state.ids.map_frame_bl, ui);
|
.top_left_with_margins_on(state.ids.frame, 44.0, 2.0)
|
||||||
|
.set(state.ids.qlog_align, ui);
|
||||||
|
|
||||||
// Icon
|
// Icon
|
||||||
Image::new(self.imgs.map_icon)
|
Image::new(self.imgs.map_icon)
|
||||||
.w_h(224.0 / 3.0, 224.0 / 3.0)
|
.w_h(30.0, 30.0)
|
||||||
.top_left_with_margins_on(state.ids.map_frame, -10.0, -10.0)
|
.top_left_with_margins_on(state.ids.frame, 6.0, 8.0)
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, fade)))
|
.set(state.ids.icon, ui);
|
||||||
.set(state.ids.map_icon, ui);
|
|
||||||
|
// Map Title
|
||||||
|
Text::new(&self.localized_strings.get("hud.map.map_title"))
|
||||||
|
.mid_top_with_margin_on(state.ids.frame, 3.0)
|
||||||
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
|
.font_size(self.fonts.cyri.scale(29))
|
||||||
|
.color(TEXT_COLOR)
|
||||||
|
.set(state.ids.map_title, ui);
|
||||||
|
|
||||||
|
// Questlog Title
|
||||||
|
Text::new(&format!(
|
||||||
|
"{}",
|
||||||
|
&self.localized_strings.get("hud.map.qlog_title")
|
||||||
|
))
|
||||||
|
.mid_top_with_margin_on(state.ids.qlog_align, 6.0)
|
||||||
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
|
.font_size(self.fonts.cyri.scale(21))
|
||||||
|
.color(TEXT_COLOR)
|
||||||
|
.set(state.ids.qlog_title, ui);
|
||||||
|
|
||||||
// X-Button
|
// X-Button
|
||||||
if Button::image(self.imgs.close_button)
|
if Button::image(self.imgs.close_button)
|
||||||
.w_h(28.0, 28.0)
|
.w_h(24.0, 25.0)
|
||||||
.hover_image(self.imgs.close_button_hover)
|
.hover_image(self.imgs.close_btn_hover)
|
||||||
.press_image(self.imgs.close_button_press)
|
.press_image(self.imgs.close_btn_press)
|
||||||
.color(Color::Rgba(1.0, 1.0, 1.0, fade - 0.5))
|
.top_right_with_margins_on(state.ids.frame, 0.0, 0.0)
|
||||||
.top_right_with_margins_on(state.ids.map_frame_r, 0.0, 0.0)
|
.set(state.ids.close, ui)
|
||||||
.set(state.ids.map_close, ui)
|
|
||||||
.was_clicked()
|
.was_clicked()
|
||||||
{
|
{
|
||||||
return Some(Event::Close);
|
return Some(Event::Close);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Location Name
|
// Location Name
|
||||||
match self.client.current_chunk() {
|
/*match self.client.current_chunk() {
|
||||||
Some(chunk) => Text::new(chunk.meta().name())
|
Some(chunk) => Text::new(chunk.meta().name())
|
||||||
.mid_top_with_margin_on(state.ids.map_bg, 55.0)
|
.mid_top_with_margin_on(state.ids.bg, 55.0)
|
||||||
.font_size(self.fonts.alkhemi.scale(60))
|
.font_size(self.fonts.alkhemi.scale(60))
|
||||||
.color(TEXT_COLOR)
|
.color(TEXT_COLOR)
|
||||||
.font_id(self.fonts.alkhemi.conrod_id)
|
.font_id(self.fonts.alkhemi.conrod_id)
|
||||||
.parent(state.ids.map_frame_r)
|
.parent(state.ids.frame)
|
||||||
.set(state.ids.location_name, ui),
|
.set(state.ids.location_name, ui),
|
||||||
None => Text::new(" ")
|
None => Text::new(" ")
|
||||||
.mid_top_with_margin_on(state.ids.map_bg, 3.0)
|
.mid_top_with_margin_on(state.ids.bg, 3.0)
|
||||||
.font_size(self.fonts.alkhemi.scale(40))
|
.font_size(self.fonts.alkhemi.scale(40))
|
||||||
.font_id(self.fonts.alkhemi.conrod_id)
|
.font_id(self.fonts.alkhemi.conrod_id)
|
||||||
.color(TEXT_COLOR)
|
.color(TEXT_COLOR)
|
||||||
.set(state.ids.location_name, ui),
|
.set(state.ids.location_name, ui),
|
||||||
}
|
}*/
|
||||||
|
Image::new(self.imgs.map_frame_art)
|
||||||
|
.mid_top_with_margin_on(state.ids.map_align, 5.0)
|
||||||
|
.w_h(765.0, 765.0)
|
||||||
|
.parent(state.ids.bg)
|
||||||
|
.set(state.ids.grid, ui);
|
||||||
// Map Image
|
// Map Image
|
||||||
let (world_map, worldsize) = self.world_map;
|
let (world_map, worldsize) = self.world_map;
|
||||||
let worldsize = worldsize.map2(TerrainChunkSize::RECT_SIZE, |e, f| e as f64 * f as f64);
|
let worldsize = worldsize.map2(TerrainChunkSize::RECT_SIZE, |e, f| e as f64 * f as f64);
|
||||||
|
|
||||||
Image::new(world_map.none)
|
Image::new(world_map.none)
|
||||||
.middle_of(state.ids.map_bg)
|
.mid_top_with_margin_on(state.ids.map_align, 10.0)
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, fade + 0.5)))
|
.w_h(760.0, 760.0)
|
||||||
.w_h(700.0, 700.0)
|
.parent(state.ids.bg)
|
||||||
.parent(state.ids.map_bg)
|
|
||||||
.set(state.ids.grid, ui);
|
.set(state.ids.grid, ui);
|
||||||
// Coordinates
|
// Coordinates
|
||||||
let player_pos = self
|
let player_pos = self
|
||||||
@ -182,8 +199,8 @@ impl<'a> Widget for Map<'a> {
|
|||||||
.get(self.client.entity())
|
.get(self.client.entity())
|
||||||
.map_or(Vec3::zero(), |pos| pos.0);
|
.map_or(Vec3::zero(), |pos| pos.0);
|
||||||
|
|
||||||
let x = player_pos.x as f64 / worldsize.x * 700.0;
|
let x = player_pos.x as f64 / worldsize.x * 760.0;
|
||||||
let y = player_pos.y as f64 / worldsize.y * 700.0;
|
let y = player_pos.y as f64 / worldsize.y * 760.0;
|
||||||
let indic_scale = 0.6;
|
let indic_scale = 0.6;
|
||||||
Image::new(self.rot_imgs.indicator_mmap_small.target_north)
|
Image::new(self.rot_imgs.indicator_mmap_small.target_north)
|
||||||
.bottom_left_with_margins_on(
|
.bottom_left_with_margins_on(
|
||||||
@ -192,7 +209,7 @@ impl<'a> Widget for Map<'a> {
|
|||||||
x - 32.0 * indic_scale / 2.0,
|
x - 32.0 * indic_scale / 2.0,
|
||||||
)
|
)
|
||||||
.w_h(32.0 * indic_scale, 37.0 * indic_scale)
|
.w_h(32.0 * indic_scale, 37.0 * indic_scale)
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, 1.0)))
|
.color(Some(UI_HIGHLIGHT_0))
|
||||||
.floating(true)
|
.floating(true)
|
||||||
.parent(ui.window)
|
.parent(ui.window)
|
||||||
.set(state.ids.indicator, ui);
|
.set(state.ids.indicator, ui);
|
||||||
|
@ -214,7 +214,7 @@ impl<'a> Widget for MiniMap<'a> {
|
|||||||
Image::new(self.rot_imgs.indicator_mmap_small.none)
|
Image::new(self.rot_imgs.indicator_mmap_small.none)
|
||||||
.middle_of(state.ids.grid)
|
.middle_of(state.ids.grid)
|
||||||
.w_h(32.0 * ind_scale, 37.0 * ind_scale)
|
.w_h(32.0 * ind_scale, 37.0 * ind_scale)
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, 1.0)))
|
.color(Some(UI_HIGHLIGHT_0))
|
||||||
.floating(true)
|
.floating(true)
|
||||||
.parent(ui.window)
|
.parent(ui.window)
|
||||||
.set(state.ids.indicator, ui);
|
.set(state.ids.indicator, ui);
|
||||||
|
@ -847,7 +847,7 @@ impl Hud {
|
|||||||
.color(if floater.hp_change < 0 {
|
.color(if floater.hp_change < 0 {
|
||||||
Color::Rgba(0.0, 0.0, 0.0, fade)
|
Color::Rgba(0.0, 0.0, 0.0, fade)
|
||||||
} else {
|
} else {
|
||||||
Color::Rgba(0.1, 1.0, 0.1, 0.0)
|
Color::Rgba(0.0, 0.0, 0.0, 1.0)
|
||||||
})
|
})
|
||||||
.x_y(0.0, y - 3.0)
|
.x_y(0.0, y - 3.0)
|
||||||
.position_ingame(ingame_pos)
|
.position_ingame(ingame_pos)
|
||||||
@ -859,7 +859,7 @@ impl Hud {
|
|||||||
.color(if floater.hp_change < 0 {
|
.color(if floater.hp_change < 0 {
|
||||||
Color::Rgba(font_col.r, font_col.g, font_col.b, fade)
|
Color::Rgba(font_col.r, font_col.g, font_col.b, fade)
|
||||||
} else {
|
} else {
|
||||||
Color::Rgba(0.1, 1.0, 0.1, 0.0)
|
Color::Rgba(0.1, 1.0, 0.1, 1.0)
|
||||||
})
|
})
|
||||||
.position_ingame(ingame_pos)
|
.position_ingame(ingame_pos)
|
||||||
.set(sct_id, ui_widgets);
|
.set(sct_id, ui_widgets);
|
||||||
@ -1858,7 +1858,7 @@ impl Hud {
|
|||||||
&self.world_map,
|
&self.world_map,
|
||||||
&self.fonts,
|
&self.fonts,
|
||||||
self.pulse,
|
self.pulse,
|
||||||
self.velocity,
|
&self.voxygen_i18n,
|
||||||
)
|
)
|
||||||
.set(self.ids.map, ui_widgets)
|
.set(self.ids.map, ui_widgets)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user