From 2309ce599cc086412cd6c4442db8dd5bfdedc0c3 Mon Sep 17 00:00:00 2001 From: timokoesters Date: Wed, 8 May 2019 22:25:15 +0200 Subject: [PATCH] Move font_ids! into mod.rs Former-commit-id: 602ea44814a25c068e5c022cedc780e3ddc020ae --- voxygen/src/hud/bag.rs | 2 +- voxygen/src/hud/buttons.rs | 2 +- voxygen/src/hud/character_window.rs | 2 +- voxygen/src/hud/chat.rs | 2 +- voxygen/src/hud/esc_menu.rs | 2 +- voxygen/src/hud/font_ids.rs | 6 ------ voxygen/src/hud/map.rs | 2 +- voxygen/src/hud/minimap.rs | 2 +- voxygen/src/hud/mod.rs | 9 +++++++-- voxygen/src/hud/settings_window.rs | 2 +- voxygen/src/hud/skillbar.rs | 2 +- voxygen/src/hud/small_window.rs | 2 +- voxygen/src/menu/char_selection/ui.rs | 2 +- voxygen/src/menu/main/ui.rs | 2 +- 14 files changed, 19 insertions(+), 20 deletions(-) delete mode 100644 voxygen/src/hud/font_ids.rs diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index 47002be63d..dcbebebf2d 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -1,4 +1,4 @@ -use super::{font_ids::Fonts, img_ids::Imgs}; +use super::{img_ids::Imgs, Fonts}; use conrod_core::{ color, widget::{self, Button, Image, Rectangle, Scrollbar}, diff --git a/voxygen/src/hud/buttons.rs b/voxygen/src/hud/buttons.rs index 1f0357f386..24d325472c 100644 --- a/voxygen/src/hud/buttons.rs +++ b/voxygen/src/hud/buttons.rs @@ -3,7 +3,7 @@ use conrod_core::{ widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon, }; -use super::{font_ids::Fonts, img_ids::Imgs, small_window::SmallWindowType, Windows, TEXT_COLOR}; +use super::{img_ids::Imgs, small_window::SmallWindowType, Fonts, Windows, TEXT_COLOR}; use crate::ui::ToggleButton; widget_ids! { diff --git a/voxygen/src/hud/character_window.rs b/voxygen/src/hud/character_window.rs index 4b969ae325..6ef209784d 100644 --- a/voxygen/src/hud/character_window.rs +++ b/voxygen/src/hud/character_window.rs @@ -1,4 +1,4 @@ -use super::{font_ids::Fonts, img_ids::Imgs, TEXT_COLOR, XP_COLOR}; +use super::{img_ids::Imgs, Fonts, TEXT_COLOR, XP_COLOR}; use conrod_core::{ color, widget::{self, Button, Image, Rectangle, Text}, diff --git a/voxygen/src/hud/chat.rs b/voxygen/src/hud/chat.rs index da66630814..ab43936a32 100644 --- a/voxygen/src/hud/chat.rs +++ b/voxygen/src/hud/chat.rs @@ -1,4 +1,4 @@ -use super::{font_ids::Fonts, img_ids::Imgs, TEXT_COLOR}; +use super::{img_ids::Imgs, Fonts, TEXT_COLOR}; use conrod_core::{ input::Key, position::Dimension, diff --git a/voxygen/src/hud/esc_menu.rs b/voxygen/src/hud/esc_menu.rs index 820df50cb6..3d880cd344 100644 --- a/voxygen/src/hud/esc_menu.rs +++ b/voxygen/src/hud/esc_menu.rs @@ -3,7 +3,7 @@ use conrod_core::{ widget_ids, Labelable, Positionable, Sizeable, Widget, WidgetCommon, }; -use super::{font_ids::Fonts, img_ids::Imgs, TEXT_COLOR}; +use super::{img_ids::Imgs, Fonts, TEXT_COLOR}; widget_ids! { struct Ids { diff --git a/voxygen/src/hud/font_ids.rs b/voxygen/src/hud/font_ids.rs deleted file mode 100644 index 8033800253..0000000000 --- a/voxygen/src/hud/font_ids.rs +++ /dev/null @@ -1,6 +0,0 @@ -font_ids! { - pub struct Fonts { - opensans: "/voxygen/font/OpenSans-Regular.ttf", - metamorph: "/voxygen/font/Metamorphous-Regular.ttf", - } -} diff --git a/voxygen/src/hud/map.rs b/voxygen/src/hud/map.rs index 81b5ec55a5..f6aeceaab0 100644 --- a/voxygen/src/hud/map.rs +++ b/voxygen/src/hud/map.rs @@ -4,7 +4,7 @@ use conrod_core::{ widget_ids, Positionable, Sizeable, Widget, WidgetCommon, }; -use super::{font_ids::Fonts, img_ids::Imgs}; +use super::{img_ids::Imgs, Fonts}; widget_ids! { struct Ids { diff --git a/voxygen/src/hud/minimap.rs b/voxygen/src/hud/minimap.rs index 34cc17bd55..56a7d3e213 100644 --- a/voxygen/src/hud/minimap.rs +++ b/voxygen/src/hud/minimap.rs @@ -4,7 +4,7 @@ use conrod_core::{ widget_ids, Colorable, Positionable, Sizeable, Widget, WidgetCommon, }; -use super::{font_ids::Fonts, img_ids::Imgs, Show, TEXT_COLOR}; +use super::{img_ids::Imgs, Fonts, Show, TEXT_COLOR}; widget_ids! { struct Ids { diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 8a89eb6c6f..8923fab1b2 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -3,7 +3,6 @@ mod buttons; mod character_window; mod chat; mod esc_menu; -mod font_ids; mod img_ids; mod map; mod minimap; @@ -16,7 +15,6 @@ use buttons::Buttons; use character_window::CharacterWindow; use chat::Chat; use esc_menu::EscMenu; -use font_ids::Fonts; use img_ids::Imgs; use map::Map; use minimap::MiniMap; @@ -83,6 +81,13 @@ widget_ids! { } } +font_ids! { + pub struct Fonts { + opensans: "/voxygen/font/OpenSans-Regular.ttf", + metamorph: "/voxygen/font/Metamorphous-Regular.ttf", + } +} + pub enum Event { SendMessage(String), Logout, diff --git a/voxygen/src/hud/settings_window.rs b/voxygen/src/hud/settings_window.rs index 1a57cce990..99fcf43d7c 100644 --- a/voxygen/src/hud/settings_window.rs +++ b/voxygen/src/hud/settings_window.rs @@ -1,4 +1,4 @@ -use super::{font_ids::Fonts, img_ids::Imgs, TEXT_COLOR}; +use super::{img_ids::Imgs, Fonts, TEXT_COLOR}; use crate::{hud::Show, ui::ToggleButton}; use conrod_core::{ color, diff --git a/voxygen/src/hud/skillbar.rs b/voxygen/src/hud/skillbar.rs index 916bbe003a..5fc20576d4 100644 --- a/voxygen/src/hud/skillbar.rs +++ b/voxygen/src/hud/skillbar.rs @@ -1,4 +1,4 @@ -use super::{font_ids::Fonts, img_ids::Imgs, HP_COLOR, MANA_COLOR, TEXT_COLOR, XP_COLOR}; +use super::{img_ids::Imgs, Fonts, HP_COLOR, MANA_COLOR, TEXT_COLOR, XP_COLOR}; use conrod_core::{ widget::{self, Image, Rectangle, Text}, widget_ids, Colorable, Positionable, Sizeable, Widget, WidgetCommon, diff --git a/voxygen/src/hud/small_window.rs b/voxygen/src/hud/small_window.rs index f19d75c65e..9dd308ace9 100644 --- a/voxygen/src/hud/small_window.rs +++ b/voxygen/src/hud/small_window.rs @@ -1,4 +1,4 @@ -use super::{font_ids::Fonts, img_ids::Imgs, Windows, TEXT_COLOR}; +use super::{img_ids::Imgs, Fonts, Windows, TEXT_COLOR}; use crate::hud::Show; use conrod_core::{ color, diff --git a/voxygen/src/menu/char_selection/ui.rs b/voxygen/src/menu/char_selection/ui.rs index ba37575692..70b61e2f0f 100644 --- a/voxygen/src/menu/char_selection/ui.rs +++ b/voxygen/src/menu/char_selection/ui.rs @@ -1,6 +1,6 @@ use crate::{ render::Renderer, - ui::{self, Graphic, ScaleMode, Ui,BlankGraphic, ImageGraphic, VoxelGraphic}, + ui::{self, BlankGraphic, Graphic, ImageGraphic, ScaleMode, Ui, VoxelGraphic}, window::Window, }; use common::{ diff --git a/voxygen/src/menu/main/ui.rs b/voxygen/src/menu/main/ui.rs index aee7b2b655..c8f4f078b2 100644 --- a/voxygen/src/menu/main/ui.rs +++ b/voxygen/src/menu/main/ui.rs @@ -1,6 +1,6 @@ use crate::{ render::Renderer, - ui::{self, Graphic, ScaleMode, Ui, BlankGraphic, ImageGraphic, VoxelGraphic}, + ui::{self, BlankGraphic, Graphic, ImageGraphic, ScaleMode, Ui, VoxelGraphic}, GlobalState, DEFAULT_PUBLIC_SERVER, }; use common::assets;