From b5d529f82456be40630978a00c94f1813a7d6fd8 Mon Sep 17 00:00:00 2001 From: Pfauenauge90 <44173739+Pfauenauge90@users.noreply.github.com> Date: Sat, 22 Jun 2019 16:30:53 +0200 Subject: [PATCH] changes restore --- assets/voxygen/voxel/fixture/selection_bg.vox | 4 +-- assets/world/structures/human/mage_tower.vox | 3 ++ voxygen/src/hud/map.rs | 34 ++++++++++++++++--- voxygen/src/hud/minimap.rs | 2 +- voxygen/src/hud/mod.rs | 6 ++-- voxygen/src/menu/char_selection/scene.rs | 6 ++-- voxygen/src/menu/char_selection/ui.rs | 6 ++-- voxygen/src/menu/main/ui.rs | 25 ++++++++------ world/src/sim/location.rs | 14 ++++---- 9 files changed, 66 insertions(+), 34 deletions(-) create mode 100644 assets/world/structures/human/mage_tower.vox diff --git a/assets/voxygen/voxel/fixture/selection_bg.vox b/assets/voxygen/voxel/fixture/selection_bg.vox index 66dc4a639e..0c8ce0e625 100644 --- a/assets/voxygen/voxel/fixture/selection_bg.vox +++ b/assets/voxygen/voxel/fixture/selection_bg.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4d0c91d3e411f26f9fb0675ddbd00f02120d9396cc40c6f6e39cbf2be962d640 -size 594518 +oid sha256:8604501bac76da9bd609a2c1aa0ea8162c6c1b92884017451b8d781d92a4eff9 +size 594480 diff --git a/assets/world/structures/human/mage_tower.vox b/assets/world/structures/human/mage_tower.vox new file mode 100644 index 0000000000..7df09363c0 --- /dev/null +++ b/assets/world/structures/human/mage_tower.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6ed2f574af13b79f6cb6df5450068cc637372a24a739a892d55d4b1ff4f287b +size 125468 diff --git a/voxygen/src/hud/map.rs b/voxygen/src/hud/map.rs index a21a5f2b7f..f0c851c2e0 100644 --- a/voxygen/src/hud/map.rs +++ b/voxygen/src/hud/map.rs @@ -1,10 +1,13 @@ use conrod_core::{ color, - widget::{self, Button, Image, Rectangle}, - widget_ids, Positionable, Sizeable, Widget, WidgetCommon, + widget::{self, Button, Image, Rectangle, Text}, + widget_ids, Colorable, Positionable, Sizeable, Widget, WidgetCommon, }; -use super::{img_ids::Imgs, Fonts}; +use super::{img_ids::Imgs, Fonts, Show, TEXT_COLOR_2}; +use client::{self, Client}; + +use std::{cell::RefCell, rc::Rc}; widget_ids! { struct Ids { @@ -17,22 +20,28 @@ widget_ids! { map_frame_r, map_frame_bl, map_frame_br, + location_name, } } #[derive(WidgetCommon)] pub struct Map<'a> { + show: &'a Show, + + client: &'a Client, + imgs: &'a Imgs, fonts: &'a Fonts, #[conrod(common_builder)] common: widget::CommonBuilder, } - impl<'a> Map<'a> { - pub fn new(imgs: &'a Imgs, fonts: &'a Fonts) -> Self { + pub fn new(show: &'a Show, client: &'a Client, imgs: &'a Imgs, fonts: &'a Fonts) -> Self { Self { + show, imgs, + client, fonts, common: widget::CommonBuilder::default(), } @@ -108,6 +117,21 @@ impl<'a> Widget for Map<'a> { return Some(Event::Close); } + // Location Name + match self.client.current_chunk() { + Some(chunk) => Text::new(chunk.meta().name()) + .mid_top_with_margin_on(state.ids.map_bg, 40.0) + .font_size(40) + .color(TEXT_COLOR_2) + .parent(state.ids.map_frame_r) + .set(state.ids.location_name, ui), + None => Text::new(" ") + .mid_top_with_margin_on(state.ids.map_bg, 3.0) + .font_size(40) + .color(TEXT_COLOR_2) + .set(state.ids.location_name, ui), + } + None } } diff --git a/voxygen/src/hud/minimap.rs b/voxygen/src/hud/minimap.rs index b5af29d57e..f1a9755562 100644 --- a/voxygen/src/hud/minimap.rs +++ b/voxygen/src/hud/minimap.rs @@ -115,7 +115,7 @@ impl<'a> Widget for MiniMap<'a> { .font_size(14) .color(TEXT_COLOR) .set(state.ids.mmap_location, ui), - None => Text::new("Wait what") + None => Text::new(" ") .mid_top_with_margin_on(state.ids.mmap_frame, 3.0) .font_size(14) .color(TEXT_COLOR) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 0349c4bc6a..9e9e9c4d8b 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -43,6 +43,7 @@ use vek::*; const XP_COLOR: Color = Color::Rgba(0.59, 0.41, 0.67, 1.0); const TEXT_COLOR: Color = Color::Rgba(1.0, 1.0, 1.0, 1.0); +const TEXT_COLOR_2: Color = Color::Rgba(0.0, 0.0, 0.0, 1.0); const HP_COLOR: Color = Color::Rgba(0.33, 0.63, 0.0, 1.0); const MANA_COLOR: Color = Color::Rgba(0.42, 0.41, 0.66, 1.0); @@ -641,7 +642,9 @@ impl Hud { // Map if self.show.map { - match Map::new(&self.imgs, &self.fonts).set(self.ids.map, ui_widgets) { + match Map::new(&self.show, client, &self.imgs, &self.fonts) + .set(self.ids.map, ui_widgets) + { Some(map::Event::Close) => { self.show.map(false); self.force_ungrab = true; @@ -650,7 +653,6 @@ impl Hud { } } - // Esc-menu if self.show.esc_menu { match EscMenu::new(&self.imgs, &self.fonts).set(self.ids.esc_menu, ui_widgets) { Some(esc_menu::Event::OpenSettings(tab)) => { diff --git a/voxygen/src/menu/char_selection/scene.rs b/voxygen/src/menu/char_selection/scene.rs index b415cc5c9a..f18c191fc1 100644 --- a/voxygen/src/menu/char_selection/scene.rs +++ b/voxygen/src/menu/char_selection/scene.rs @@ -65,7 +65,7 @@ impl Scene { backdrop_model: renderer .create_model(&FigureModelCache::load_mesh( "fixture/selection_bg.vox", - Vec3::new(-55.0, -50.0, -1.0), + Vec3::new(-55.0, -49.5, -2.0), )) .unwrap(), backdrop_state: FigureState::new(renderer, FixtureSkeleton::new()), @@ -84,7 +84,7 @@ impl Scene { .set_orientation(Vec3::new(client.state().get_time() as f32 * 0.0, 0.0, 0.0)); let (view_mat, proj_mat, cam_pos) = self.camera.compute_dependents(client); - const CHAR_SELECT_TIME_OF_DAY: f32 = 50000.0; // 12*3600 seconds + const CHAR_SELECT_TIME_OF_DAY: f32 = 80000.0; // 12*3600 seconds if let Err(err) = renderer.update_consts( &mut self.globals, &[Globals::new( @@ -93,7 +93,7 @@ impl Scene { cam_pos, self.camera.get_focus_pos(), CHAR_SELECT_TIME_OF_DAY, - 500.0, + 55800.0, client.state().get_time(), renderer.get_resolution(), )], diff --git a/voxygen/src/menu/char_selection/ui.rs b/voxygen/src/menu/char_selection/ui.rs index 23a83f76a5..31ced8fcda 100644 --- a/voxygen/src/menu/char_selection/ui.rs +++ b/voxygen/src/menu/char_selection/ui.rs @@ -141,8 +141,7 @@ 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", @@ -170,8 +169,7 @@ image_ids! { 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", + accessories_window: "voxygen/element/frames/skin_eyes.png", slider_range: "voxygen/element/slider/track.png", slider_indicator: "voxygen/element/slider/indicator.png", window_frame_2: "voxygen/element/frames/window_2.png", diff --git a/voxygen/src/menu/main/ui.rs b/voxygen/src/menu/main/ui.rs index 380666ac99..99f8b6a7e5 100644 --- a/voxygen/src/menu/main/ui.rs +++ b/voxygen/src/menu/main/ui.rs @@ -70,7 +70,9 @@ image_ids! { bg: "voxygen/background/bg_main.png", error_frame: "voxygen/element/frames/window_2.png", + nothing: "voxygen/element/nothing.png", } + } font_ids! { @@ -137,6 +139,7 @@ impl MainMenuUi { let ref mut ui_widgets = self.ui.set_widgets(); let version = env!("CARGO_PKG_VERSION"); const TEXT_COLOR: Color = Color::Rgba(1.0, 1.0, 1.0, 1.0); + const TEXT_COLOR_2: Color = Color::Rgba(1.0, 1.0, 1.0, 0.2); // Background image, Veloren logo, Alpha-Version Label Image::new(self.imgs.bg) .middle_of(ui_widgets.window) @@ -302,8 +305,8 @@ impl MainMenuUi { } if self.show_servers { Image::new(self.imgs.error_frame) - .top_left_with_margins_on(ui_widgets.window, 3.0, 3.0) - .w_h(400.0, 400.0) + .mid_top_with_margin_on(self.ids.username_bg, -320.0) + .w_h(400.0, 300.0) .set(self.ids.servers_frame, ui_widgets); let net_settings = &global_state.settings.networking; @@ -320,7 +323,7 @@ impl MainMenuUi { while let Some(item) = items.next(ui_widgets) { let mut text = "".to_string(); if &net_settings.servers[item.i] == &self.server_address { - text.push_str("* ") + text.push_str("-> ") } else { text.push_str(" ") } @@ -328,11 +331,11 @@ impl MainMenuUi { if item .set( - Button::image(self.imgs.button) - .w_h(100.0, 53.0) - .mid_bottom_with_margin_on(self.ids.servers_frame, 5.0) - .hover_image(self.imgs.button_hover) - .press_image(self.imgs.button_press) + Button::image(self.imgs.nothing) + .w_h(100.0, 50.0) + .mid_top_with_margin_on(self.ids.servers_frame, 10.0) + //.hover_image(self.imgs.button_hover) + //.press_image(self.imgs.button_press) .label_y(Relative::Scalar(2.0)) .label(&text) .label_font_size(20) @@ -465,10 +468,10 @@ impl MainMenuUi { if Button::image(self.imgs.button) .w_h(190.0, 40.0) .up_from(self.ids.quit_button, 8.0) - .hover_image(self.imgs.button_hover) - .press_image(self.imgs.button_press) + //.hover_image(self.imgs.button_hover) + //.press_image(self.imgs.button_press) .label("Settings") - .label_color(TEXT_COLOR) + .label_color(TEXT_COLOR_2) .label_font_size(20) .label_y(Relative::Scalar(3.0)) .set(self.ids.settings_button, ui_widgets) diff --git a/world/src/sim/location.rs b/world/src/sim/location.rs index 4995cc0e58..49e01632e7 100644 --- a/world/src/sim/location.rs +++ b/world/src/sim/location.rs @@ -42,16 +42,18 @@ pub struct Kingdom { fn generate_name(rng: &mut R) -> String { let firstsyl = [ "Eri", "Val", "Gla", "Wilde", "Cold", "Deep", "Dura", "Ester", "Fay", "Dark", "West", - "East", "North", "South", "Ray", "Eri", "Dal", "Som", "Black", "Iron", "Grey", "Hel", - "Gal", "Mor", "Lo", "Nil", "Mana", "Gar", "Mountain", + "East", "North", "South", "Ray", "Eri", "Dal", "Som", "Sommer", "Black", "Iron", "Grey", + "Hel", "Gal", "Mor", "Lo", "Nil", "Bel", "Lor", "Gold", "Red", "Marble", "Mana", "Gar", + "Mountain", "Red", "Cheo", "Far", "High", ]; - let mid = ["ka", "se", "au", "da", "di", "u"]; + let mid = ["ka", "se", "au", "da", "di"]; let tails = [ - "mill", "ben", "sel", "dori", "theas", "dar", "bur", "to", "vis", "ten", "stone", "tiva", + /*"mill",*/ "ben", "sel", "dori", "theas", "dar", "bur", "to", "vis", "ten", "stone", "tiva", "id", "and", "or", "el", "ond", "ia", "eld", "ald", "aft", "ift", "ity", "well", "oll", - "ill", "all", "wyn", "light", "hill", "lin", "mont", "mor", "cliff", "rok", "den", "mi", + "ill", "all", "wyn", "light", " Hill", "lin", "mont", "mor", "cliff", "rok", "den", "mi", "rock", "glenn", "rovi", "lea", "gate", "view", "ley", "wood", "ovia", "cliff", "marsh", - "kor", "light", "ice", "river", "venn", "vale", + "kor", "ice", /*"river",*/ "acre", "venn", "crest", "field", "vale", "spring", " Vale", + "grasp", "fel", "fall", "grove", "wyn", "edge", ]; let mut name = String::new();