From 67bc34c8d0b661605aa204d88371adae9cc8948a Mon Sep 17 00:00:00 2001 From: Louis Pearson Date: Sat, 18 May 2019 11:23:56 -0600 Subject: [PATCH 1/2] Use PathBuf to load files Former-commit-id: b72084fab1b8faeabc47eee927654f963643bb78 --- common/src/assets/mod.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/common/src/assets/mod.rs b/common/src/assets/mod.rs index 84774db8d7..c1fd3e5c50 100644 --- a/common/src/assets/mod.rs +++ b/common/src/assets/mod.rs @@ -7,6 +7,7 @@ use std::{ fs::File, io::BufReader, io::Read, + path::PathBuf, sync::{Arc, RwLock}, }; @@ -92,8 +93,9 @@ impl Asset for DotVoxData { // TODO: System to load file from specifiers (e.g.: "core.ui.backgrounds.city"). fn try_open_with_path(name: &str) -> Option { debug!("Trying to access \"{}\"", name); - // TODO: Don't do this? - // If it's stupid but it works... + let abs_path = std::env::current_dir().expect("No current directory?"); + // TODO: don't do this? + // if it's stupid and it works.., [ "assets".to_string(), "../assets".to_string(), /* optimizations */ @@ -105,7 +107,12 @@ fn try_open_with_path(name: &str) -> Option { [env!("CARGO_MANIFEST_DIR"), "/../../../assets"].concat(), ] .into_iter() - .map(|bp| [bp, name].concat()) + .map(|bp| { + let mut p = abs_path.clone(); + p.push(bp); + p.push(name); + p + }) .find_map(|ref filename| File::open(filename).ok()) } From 0db9653b24a5b183fa0d939a4728f1e6b82a21f2 Mon Sep 17 00:00:00 2001 From: Louis Pearson Date: Sat, 18 May 2019 12:05:15 -0600 Subject: [PATCH 2/2] Change asset paths to be relative Former-commit-id: 6c5f18484fe1b7cbf417d45c38af5ffaa8d48ac6 --- voxygen/src/hud/img_ids.rs | 229 ++++++++++++------------- voxygen/src/hud/mod.rs | 4 +- voxygen/src/menu/char_selection/ui.rs | 116 ++++++------- voxygen/src/menu/main/ui.rs | 18 +- voxygen/src/scene/figure.rs | 2 +- voxygen/src/scene/figure/figure.rs | 2 +- voxygen/src/scene/figure/figurequad.rs | 2 +- 7 files changed, 186 insertions(+), 187 deletions(-) diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 4ccd1c8d12..e52d7096d3 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -5,176 +5,175 @@ image_ids! { // Bag - bag_contents: "/voxygen/element/frames/bag.vox", - inv_grid: "/voxygen/element/frames/inv_grid.vox", - inv_slot: "/voxygen/element/buttons/inv_slot.vox", + bag_contents: "voxygen/element/frames/bag.vox", + inv_grid: "voxygen/element/frames/inv_grid.vox", + inv_slot: "voxygen/element/buttons/inv_slot.vox", // Window Parts - window_3: "/voxygen/element/frames/window_3.vox", - tab_bg: "/voxygen/element/frames/tab_bg.vox", - tab_small_open: "/voxygen/element/frames/tab_small_open.vox", - tab_small_closed: "/voxygen/element/frames/tab_small_closed.vox", + window_3: "voxygen/element/frames/window_3.vox", + tab_bg: "voxygen/element/frames/tab_bg.vox", + tab_small_open: "voxygen/element/frames/tab_small_open.vox", + tab_small_closed: "voxygen/element/frames/tab_small_closed.vox", // MiniMap - mmap_frame: "/voxygen/element/frames/mmap.vox", - mmap_frame_closed: "/voxygen/element/frames/mmap_closed.vox", + mmap_frame: "voxygen/element/frames/mmap.vox", + mmap_frame_closed: "voxygen/element/frames/mmap_closed.vox", // Missing: Buff Frame Animation .gif ?! we could do animation in ui.maintain, or in shader? - window_frame: "/voxygen/element/frames/window2.vox", + window_frame: "voxygen/element/frames/window2.vox", // Settings Window - settings_frame_r: "/voxygen/element/frames/settings_r.vox", - settings_frame_l: "/voxygen/element/frames/settings_l.vox", - settings_button: "/voxygen/element/buttons/settings_button.vox", - settings_button_pressed: "/voxygen/element/buttons/settings_button_pressed.vox", - settings_button_hover: "/voxygen/element/buttons/settings_button_hover.vox", - settings_button_press: "/voxygen/element/buttons/settings_button_press.vox", - check: "/voxygen/element/buttons/check/no.vox", - check_mo: "/voxygen/element/buttons/check/no_mo.vox", - check_press: "/voxygen/element/buttons/check/press.vox", - check_checked: "/voxygen/element/buttons/check/yes.vox", - check_checked_mo: "/voxygen/element/buttons/check/yes_mo.vox", - slider: "/voxygen/element/slider/track.vox", - slider_indicator: "/voxygen/element/slider/indicator.vox", + settings_frame_r: "voxygen/element/frames/settings_r.vox", + settings_frame_l: "voxygen/element/frames/settings_l.vox", + settings_button: "voxygen/element/buttons/settings_button.vox", + settings_button_pressed: "voxygen/element/buttons/settings_button_pressed.vox", + settings_button_hover: "voxygen/element/buttons/settings_button_hover.vox", + settings_button_press: "voxygen/element/buttons/settings_button_press.vox", + check: "voxygen/element/buttons/check/no.vox", + check_mo: "voxygen/element/buttons/check/no_mo.vox", + check_press: "voxygen/element/buttons/check/press.vox", + check_checked: "voxygen/element/buttons/check/yes.vox", + check_checked_mo: "voxygen/element/buttons/check/yes_mo.vox", + slider: "voxygen/element/slider/track.vox", + slider_indicator: "voxygen/element/slider/indicator.vox", // Map Window - map_frame_l: "/voxygen/element/frames/map_l.vox", - map_frame_r: "/voxygen/element/frames/map_r.vox", - map_frame_bl: "/voxygen/element/frames/map_bl.vox", - map_frame_br: "/voxygen/element/frames/map_br.vox", + map_frame_l: "voxygen/element/frames/map_l.vox", + map_frame_r: "voxygen/element/frames/map_r.vox", + map_frame_bl: "voxygen/element/frames/map_bl.vox", + map_frame_br: "voxygen/element/frames/map_br.vox", // Chat-Arrows - chat_arrow: "/voxygen/element/buttons/arrow_down.vox", - chat_arrow_mo: "/voxygen/element/buttons/arrow_down_hover.vox", - chat_arrow_press: "/voxygen/element/buttons/arrow_down_press.vox", + chat_arrow: "voxygen/element/buttons/arrow_down.vox", + chat_arrow_mo: "voxygen/element/buttons/arrow_down_hover.vox", + chat_arrow_press: "voxygen/element/buttons/arrow_down_press.vox", // Crosshair - crosshair: "/voxygen/element/misc_bg/crosshair.vox", + crosshair: "voxygen/element/misc_bg/crosshair.vox", // Buttons - mmap_closed: "/voxygen/element/buttons/button_mmap_closed.vox", - mmap_closed_hover: "/voxygen/element/buttons/button_mmap_closed_hover.vox", - mmap_closed_press: "/voxygen/element/buttons/button_mmap_closed_press.vox", - mmap_open: "/voxygen/element/buttons/button_mmap_open.vox", - mmap_open_hover: "/voxygen/element/buttons/button_mmap_open_hover.vox", - mmap_open_press: "/voxygen/element/buttons/button_mmap_open_press.vox", + mmap_closed: "voxygen/element/buttons/button_mmap_closed.vox", + mmap_closed_hover: "voxygen/element/buttons/button_mmap_closed_hover.vox", + mmap_closed_press: "voxygen/element/buttons/button_mmap_closed_press.vox", + mmap_open: "voxygen/element/buttons/button_mmap_open.vox", + mmap_open_hover: "voxygen/element/buttons/button_mmap_open_hover.vox", + mmap_open_press: "voxygen/element/buttons/button_mmap_open_press.vox", // Grid - grid: "/voxygen/element/buttons/grid.vox", - grid_hover: "/voxygen/element/buttons/grid.vox", - grid_press: "/voxygen/element/buttons/grid.vox", + grid: "voxygen/element/buttons/grid.vox", + grid_hover: "voxygen/element/buttons/grid.vox", + grid_press: "voxygen/element/buttons/grid.vox", - settings: "/voxygen/element/buttons/settings.vox", - settings_hover: "/voxygen/element/buttons/settings_hover.vox", - settings_press: "/voxygen/element/buttons/settings_press.vox", + settings: "voxygen/element/buttons/settings.vox", + settings_hover: "voxygen/element/buttons/settings_hover.vox", + settings_press: "voxygen/element/buttons/settings_press.vox", - social_button: "/voxygen/element/buttons/social.vox", - social_hover: "/voxygen/element/buttons/social_hover.vox", - social_press: "/voxygen/element/buttons/social_press.vox", + social_button: "voxygen/element/buttons/social.vox", + social_hover: "voxygen/element/buttons/social_hover.vox", + social_press: "voxygen/element/buttons/social_press.vox", - map_button: "/voxygen/element/buttons/map.vox", - map_hover: "/voxygen/element/buttons/map_hover.vox", - map_press: "/voxygen/element/buttons/map_press.vox", + map_button: "voxygen/element/buttons/map.vox", + map_hover: "voxygen/element/buttons/map_hover.vox", + map_press: "voxygen/element/buttons/map_press.vox", - spellbook_button: "/voxygen/element/buttons/spellbook.vox", - spellbook_hover: "/voxygen/element/buttons/spellbook_hover.vox", - spellbook_press: "/voxygen/element/buttons/spellbook_press.vox", + spellbook_button: "voxygen/element/buttons/spellbook.vox", + spellbook_hover: "voxygen/element/buttons/spellbook_hover.vox", + spellbook_press: "voxygen/element/buttons/spellbook_press.vox", - character_button: "/voxygen/element/buttons/character.vox", - character_hover: "/voxygen/element/buttons/character_hover.vox", - character_press: "/voxygen/element/buttons/character_press.vox", + character_button: "voxygen/element/buttons/character.vox", + character_hover: "voxygen/element/buttons/character_hover.vox", + character_press: "voxygen/element/buttons/character_press.vox", - qlog_button: "/voxygen/element/buttons/qlog.vox", - qlog_hover: "/voxygen/element/buttons/qlog_hover.vox", - qlog_press: "/voxygen/element/buttons/qlog_press.vox", + qlog_button: "voxygen/element/buttons/qlog.vox", + qlog_hover: "voxygen/element/buttons/qlog_hover.vox", + qlog_press: "voxygen/element/buttons/qlog_press.vox", // Charwindow - xp_charwindow: "/voxygen/element/frames/xp_charwindow.vox", - divider: "/voxygen/element/frames/divider_charwindow.vox", - head_bg: "/voxygen/element/icons/head.vox", - shoulders_bg: "/voxygen/element/icons/shoulders.vox", - hands_bg: "/voxygen/element/icons/hands.vox", - belt_bg: "/voxygen/element/icons/belt.vox", - legs_bg: "/voxygen/element/icons/legs.vox", - feet_bg: "/voxygen/element/icons/feet.vox", - ring_r_bg: "/voxygen/element/icons/ring.vox", - ring_l_bg: "/voxygen/element/icons/ring.vox", - tabard_bg: "/voxygen/element/icons/tabard.vox", - chest_bg: "/voxygen/element/icons/chest.vox", - back_bg: "/voxygen/element/icons/back.vox", - gem_bg: "/voxygen/element/icons/gem.vox", - necklace_bg: "/voxygen/element/icons/necklace.vox", - mainhand_bg: "/voxygen/element/icons/mainhand.vox", - offhand_bg: "/voxygen/element/icons/offhand.vox", + xp_charwindow: "voxygen/element/frames/xp_charwindow.vox", + divider: "voxygen/element/frames/divider_charwindow.vox", + head_bg: "voxygen/element/icons/head.vox", + shoulders_bg: "voxygen/element/icons/shoulders.vox", + hands_bg: "voxygen/element/icons/hands.vox", + belt_bg: "voxygen/element/icons/belt.vox", + legs_bg: "voxygen/element/icons/legs.vox", + feet_bg: "voxygen/element/icons/feet.vox", + ring_r_bg: "voxygen/element/icons/ring.vox", + ring_l_bg: "voxygen/element/icons/ring.vox", + tabard_bg: "voxygen/element/icons/tabard.vox", + chest_bg: "voxygen/element/icons/chest.vox", + back_bg: "voxygen/element/icons/back.vox", + gem_bg: "voxygen/element/icons/gem.vox", + necklace_bg: "voxygen/element/icons/necklace.vox", + mainhand_bg: "voxygen/element/icons/mainhand.vox", + offhand_bg: "voxygen/element/icons/offhand.vox", // Close button - close_button: "/voxygen/element/buttons/x.vox", - close_button_hover: "/voxygen/element/buttons/x_hover.vox", - close_button_press: "/voxygen/element/buttons/x_press.vox", + close_button: "voxygen/element/buttons/x.vox", + close_button_hover: "voxygen/element/buttons/x_hover.vox", + close_button_press: "voxygen/element/buttons/x_press.vox", // Esc-Menu - fireplace: "/voxygen/element/misc_bg/fireplace.vox", - button: "/voxygen/element/buttons/button.vox", - button_hover: "/voxygen/element/buttons/button_hover.vox", - button_press: "/voxygen/element/buttons/button_press.vox", + fireplace: "voxygen/element/misc_bg/fireplace.vox", + button: "voxygen/element/buttons/button.vox", + button_hover: "voxygen/element/buttons/button_hover.vox", + button_press: "voxygen/element/buttons/button_press.vox", - charwindow_gradient:"/voxygen/element/misc_bg/charwindow.png", + charwindow_gradient:"voxygen/element/misc_bg/charwindow.png", // Spell Book Window - spellbook_icon: "/voxygen/element/icons/spellbook.png", + spellbook_icon: "voxygen/element/icons/spellbook.png", // Bag - bag: "/voxygen/element/buttons/bag/closed.png", - bag_hover: "/voxygen/element/buttons/bag/closed_hover.png", - bag_press: "/voxygen/element/buttons/bag/closed_press.png", - bag_open: "/voxygen/element/buttons/bag/open.png", - bag_open_hover: "/voxygen/element/buttons/bag/open_hover.png", - bag_open_press: "/voxygen/element/buttons/bag/open_press.png", + bag: "voxygen/element/buttons/bag/closed.png", + bag_hover: "voxygen/element/buttons/bag/closed_hover.png", + bag_press: "voxygen/element/buttons/bag/closed_press.png", + bag_open: "voxygen/element/buttons/bag/open.png", + bag_open_hover: "voxygen/element/buttons/bag/open_hover.png", + bag_open_press: "voxygen/element/buttons/bag/open_press.png", - map_icon: "/voxygen/element/icons/map.png", + map_icon: "voxygen/element/icons/map.png", - grid_button: "/voxygen/element/buttons/border.png", - grid_button_hover: "/voxygen/element/buttons/border_mo.png", - grid_button_press: "/voxygen/element/buttons/border_press.png", - grid_button_open: "/voxygen/element/buttons/border_pressed.png", + grid_button: "voxygen/element/buttons/border.png", + grid_button_hover: "voxygen/element/buttons/border_mo.png", + grid_button_press: "voxygen/element/buttons/border_press.png", + grid_button_open: "voxygen/element/buttons/border_pressed.png", // Skillbar Module - sb_grid: "/voxygen/element/skill_bar/sbar_grid.png", - sb_grid_bg: "/voxygen/element/skill_bar/sbar_grid_bg.png", - l_click: "/voxygen/element/skill_bar/l.png", - r_click: "/voxygen/element/skill_bar/r.png", - mana_bar: "/voxygen/element/skill_bar/mana_bar.png", - health_bar: "/voxygen/element/skill_bar/health_bar.png", - xp_bar: "/voxygen/element/skill_bar/xp_bar.png", + sb_grid: "voxygen/element/skill_bar/sbar_grid.png", + sb_grid_bg: "voxygen/element/skill_bar/sbar_grid_bg.png", + l_click: "voxygen/element/skill_bar/l.png", + r_click: "voxygen/element/skill_bar/r.png", + mana_bar: "voxygen/element/skill_bar/mana_bar.png", + health_bar: "voxygen/element/skill_bar/health_bar.png", + xp_bar: "voxygen/element/skill_bar/xp_bar.png", - esc_bg: "/voxygen/element/frames/menu.png", + esc_bg: "voxygen/element/frames/menu.png", - window_frame_2: "/voxygen/element/frames/window_2.png", + window_frame_2: "voxygen/element/frames/window_2.png", // Char Window - charwindow: "/voxygen/element/misc_bg/charwindow.png", - charwindow_icon: "/voxygen/element/icons/charwindow.png", - charwindow_tab_bg: "/voxygen/element/frames/tab.png", - charwindow_tab: "/voxygen/element/buttons/tab.png", - charwindow_expbar: "/voxygen/element/misc_bg/small_bg.png", - progress_frame: "/voxygen/element/frames/progress_bar.png", - progress: "/voxygen/element/misc_bg/progress.png", + charwindow: "voxygen/element/misc_bg/charwindow.png", + charwindow_icon: "voxygen/element/icons/charwindow.png", + charwindow_tab_bg: "voxygen/element/frames/tab.png", + charwindow_tab: "voxygen/element/buttons/tab.png", + charwindow_expbar: "voxygen/element/misc_bg/small_bg.png", + progress_frame: "voxygen/element/frames/progress_bar.png", + progress: "voxygen/element/misc_bg/progress.png", // Quest-Log Window - questlog_icon: "/voxygen/element/icons/questlog.png", + questlog_icon: "voxygen/element/icons/questlog.png", // Window BG - window_bg: "/voxygen/element/misc_bg/window_bg.png", + window_bg: "voxygen/element/misc_bg/window_bg.png", // Social Window - social_icon: "/voxygen/element/icons/social.png", - + social_icon: "voxygen/element/icons/social.png", blank: (), diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 25f9c65664..1f1b51d590 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -83,8 +83,8 @@ widget_ids! { font_ids! { pub struct Fonts { - opensans: "/voxygen/font/OpenSans-Regular.ttf", - metamorph: "/voxygen/font/Metamorphous-Regular.ttf", + opensans: "voxygen/font/OpenSans-Regular.ttf", + metamorph: "voxygen/font/Metamorphous-Regular.ttf", } } diff --git a/voxygen/src/menu/char_selection/ui.rs b/voxygen/src/menu/char_selection/ui.rs index 35422ce171..0dc08a092e 100644 --- a/voxygen/src/menu/char_selection/ui.rs +++ b/voxygen/src/menu/char_selection/ui.rs @@ -145,77 +145,77 @@ widget_ids! { image_ids! { struct Imgs { - v_logo: "/voxygen/element/v_logo.vox", - button: "/voxygen/element/buttons/button.vox", - button_hover: "/voxygen/element/buttons/button_hover.vox", - button_press: "/voxygen/element/buttons/button_press.vox", - button_red: "/voxygen/element/buttons/button_red.vox", - button_red_hover: "/voxygen/element/buttons/button_red_hover.vox", - button_red_press: "/voxygen/element/buttons/button_red_press.vox", - name_input: "/voxygen/element/misc_bg/textbox.vox", - charlist_frame: "/voxygen/element/frames/window_4.vox", - selection_frame: "/voxygen/element/frames/selection_frame.vox", - server_frame: "/voxygen/element/frames/server_frame.vox", - selection: "/voxygen/element/frames/selection.vox", + v_logo: "voxygen/element/v_logo.vox", + button: "voxygen/element/buttons/button.vox", + button_hover: "voxygen/element/buttons/button_hover.vox", + button_press: "voxygen/element/buttons/button_press.vox", + button_red: "voxygen/element/buttons/button_red.vox", + button_red_hover: "voxygen/element/buttons/button_red_hover.vox", + button_red_press: "voxygen/element/buttons/button_red_press.vox", + name_input: "voxygen/element/misc_bg/textbox.vox", + charlist_frame: "voxygen/element/frames/window_4.vox", + selection_frame: "voxygen/element/frames/selection_frame.vox", + server_frame: "voxygen/element/frames/server_frame.vox", + selection: "voxygen/element/frames/selection.vox", - arrow_left:"/voxygen/element/buttons/button_red_press.vox", - arrow_left_mo:"/voxygen/element/buttons/button_red_press.vox", - arrow_left_press:"/voxygen/element/buttons/button_red_press.vox", + arrow_left:"voxygen/element/buttons/button_red_press.vox", + arrow_left_mo:"voxygen/element/buttons/button_red_press.vox", + arrow_left_press:"voxygen/element/buttons/button_red_press.vox", - divider: "/voxygen/element/frames/divider.vox", + divider: "voxygen/element/frames/divider.vox", - frame_closed: "/voxygen/element/buttons/frame/closed.png", - frame_closed_mo: "/voxygen/element/buttons/frame/closed_mo.png", - frame_closed_press: "/voxygen/element/buttons/frame/closed_press.png", - frame_open: "/voxygen/element/buttons/frame/open.png", - frame_open_mo: "/voxygen/element/buttons/frame/open_mo.png", - frame_open_press: "/voxygen/element/buttons/frame/open_press.png", - skin_eyes_window: "/voxygen/element/frames/skin_eyes.png", - hair_window: "/voxygen/element/frames/skin_eyes.png", - accessories_window: "/voxygen/element/frames/skin_eyes.png", - color_picker_bg: "/voxygen/element/misc_bg/color_picker_blank.png", - slider_range: "/voxygen/element/slider/track.png", - slider_indicator: "/voxygen/element/slider/indicator.png", - window_frame_2: "/voxygen/element/frames/window_2.png", - + frame_closed: "voxygen/element/buttons/frame/closed.png", + frame_closed_mo: "voxygen/element/buttons/frame/closed_mo.png", + frame_closed_press: "voxygen/element/buttons/frame/closed_press.png", + frame_open: "voxygen/element/buttons/frame/open.png", + frame_open_mo: "voxygen/element/buttons/frame/open_mo.png", + frame_open_press: "voxygen/element/buttons/frame/open_press.png", + skin_eyes_window: "voxygen/element/frames/skin_eyes.png", + hair_window: "voxygen/element/frames/skin_eyes.png", + accessories_window: "voxygen/element/frames/skin_eyes.png", + color_picker_bg: "voxygen/element/misc_bg/color_picker_blank.png", + slider_range: "voxygen/element/slider/track.png", + slider_indicator: "voxygen/element/slider/indicator.png", + window_frame_2: "voxygen/element/frames/window_2.png", // Weapon Icons - daggers: "/voxygen/element/icons/daggers.png", - sword_shield: "/voxygen/element/icons/swordshield.png", - sword: "/voxygen/element/icons/sword.png", - axe: "/voxygen/element/icons/axe.png", - hammer: "/voxygen/element/icons/hammer.png", - bow: "/voxygen/element/icons/bow.png", - staff: "/voxygen/element/icons/staff.png", + daggers: "voxygen/element/icons/daggers.png", + sword_shield: "voxygen/element/icons/swordshield.png", + sword: "voxygen/element/icons/sword.png", + axe: "voxygen/element/icons/axe.png", + hammer: "voxygen/element/icons/hammer.png", + bow: "voxygen/element/icons/bow.png", + staff: "voxygen/element/icons/staff.png", + // Race Icons - male: "/voxygen/element/icons/male.png", - female: "/voxygen/element/icons/female.png", - human_m: "/voxygen/element/icons/human_m.png", - human_f: "/voxygen/element/icons/human_f.png", - orc_m: "/voxygen/element/icons/orc_m.png", - orc_f: "/voxygen/element/icons/orc_f.png", - dwarf_m: "/voxygen/element/icons/dwarf_m.png", - dwarf_f: "/voxygen/element/icons/dwarf_f.png", - undead_m: "/voxygen/element/icons/ud_m.png", - undead_f: "/voxygen/element/icons/ud_f.png", - elf_m: "/voxygen/element/icons/elf_m.png", - elf_f: "/voxygen/element/icons/elf_f.png", - danari_m: "/voxygen/element/icons/danari_m.png", - danari_f: "/voxygen/element/icons/danari_f.png", + male: "voxygen/element/icons/male.png", + female: "voxygen/element/icons/female.png", + human_m: "voxygen/element/icons/human_m.png", + human_f: "voxygen/element/icons/human_f.png", + orc_m: "voxygen/element/icons/orc_m.png", + orc_f: "voxygen/element/icons/orc_f.png", + dwarf_m: "voxygen/element/icons/dwarf_m.png", + dwarf_f: "voxygen/element/icons/dwarf_f.png", + undead_m: "voxygen/element/icons/ud_m.png", + undead_f: "voxygen/element/icons/ud_f.png", + elf_m: "voxygen/element/icons/elf_m.png", + elf_f: "voxygen/element/icons/elf_f.png", + danari_m: "voxygen/element/icons/danari_m.png", + danari_f: "voxygen/element/icons/danari_f.png", // Icon Borders - icon_border: "/voxygen/element/buttons/border.png", - icon_border_mo: "/voxygen/element/buttons/border_mo.png", - icon_border_press: "/voxygen/element/buttons/border_press.png", - icon_border_pressed: "/voxygen/element/buttons/border_pressed.png", - nothing: "/voxygen/element/nothing.png", + icon_border: "voxygen/element/buttons/border.png", + icon_border_mo: "voxygen/element/buttons/border_mo.png", + icon_border_press: "voxygen/element/buttons/border_press.png", + icon_border_pressed: "voxygen/element/buttons/border_pressed.png", + nothing: "voxygen/element/nothing.png", } } font_ids! { pub struct Fonts { - opensans: "/voxygen/font/OpenSans-Regular.ttf", - metamorph: "/voxygen/font/Metamorphous-Regular.ttf", + opensans: "voxygen/font/OpenSans-Regular.ttf", + metamorph: "voxygen/font/Metamorphous-Regular.ttf", } } diff --git a/voxygen/src/menu/main/ui.rs b/voxygen/src/menu/main/ui.rs index 76d9800b63..4163de786d 100644 --- a/voxygen/src/menu/main/ui.rs +++ b/voxygen/src/menu/main/ui.rs @@ -55,22 +55,22 @@ widget_ids! { image_ids! { struct Imgs { - v_logo: "/voxygen/element/v_logo.vox", - input_bg: "/voxygen/element/misc_bg/textbox.vox", - button: "/voxygen/element/buttons/button.vox", - button_hover: "/voxygen/element/buttons/button_hover.vox", - button_press: "/voxygen/element/buttons/button_press.vox", + v_logo: "voxygen/element/v_logo.vox", + input_bg: "voxygen/element/misc_bg/textbox.vox", + button: "voxygen/element/buttons/button.vox", + button_hover: "voxygen/element/buttons/button_hover.vox", + button_press: "voxygen/element/buttons/button_press.vox", - bg: "/voxygen/background/bg_main.png", - error_frame: "/voxygen/element/frames/window_2.png", + bg: "voxygen/background/bg_main.png", + error_frame: "voxygen/element/frames/window_2.png", } } font_ids! { pub struct Fonts { - opensans: "/voxygen/font/OpenSans-Regular.ttf", - metamorph: "/voxygen/font/Metamorphous-Regular.ttf", + opensans: "voxygen/font/OpenSans-Regular.ttf", + metamorph: "voxygen/font/Metamorphous-Regular.ttf", } } diff --git a/voxygen/src/scene/figure.rs b/voxygen/src/scene/figure.rs index 1eb8cd58fa..301f4d5a4c 100644 --- a/voxygen/src/scene/figure.rs +++ b/voxygen/src/scene/figure.rs @@ -124,7 +124,7 @@ impl FigureModelCache { // TODO: Don't make this public. pub fn load_mesh(filename: &str, position: Vec3) -> Mesh { - let full_path: String = ["/voxygen/voxel/", filename].concat(); + let full_path: String = ["voxygen/voxel/", filename].concat(); Segment::from(assets::load_expect::(full_path.as_str()).as_ref()) .generate_mesh(position) } diff --git a/voxygen/src/scene/figure/figure.rs b/voxygen/src/scene/figure/figure.rs index 34fd22c9ac..c045510664 100644 --- a/voxygen/src/scene/figure/figure.rs +++ b/voxygen/src/scene/figure/figure.rs @@ -100,7 +100,7 @@ impl FigureModelCache { // TODO: Don't make this public. pub fn load_mesh(filename: &str, position: Vec3) -> Mesh { - let full_path: String = ["/voxygen/voxel/", filename].concat(); + let full_path: String = ["voxygen/voxel/", filename].concat(); Segment::from(assets::load_expect::(full_path.as_str()).as_ref()) .generate_mesh(position) } diff --git a/voxygen/src/scene/figure/figurequad.rs b/voxygen/src/scene/figure/figurequad.rs index e6d5b92f31..6e04ed16b7 100644 --- a/voxygen/src/scene/figure/figurequad.rs +++ b/voxygen/src/scene/figure/figurequad.rs @@ -100,7 +100,7 @@ impl FigureModelCache { // TODO: Don't make this public. pub fn load_mesh(filename: &str, position: Vec3) -> Mesh { - let full_path: String = ["/voxygen/voxel/npc/", filename].concat(); + let full_path: String = ["voxygen/voxel/npc/", filename].concat();S Segment::from(assets::load_expect::(full_path.as_str()).as_ref()) .generate_mesh(position) }