diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae20e10bd..da34b44b5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Animals are more effective in combat - Pathfinding is much smoother and pets are cleverer - Animals run/turn at different speeds +- Updated winit 0.19 -> 0.22 ### Removed diff --git a/Cargo.lock b/Cargo.lock index 173829e19c..90ae730d02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -581,7 +581,7 @@ dependencies = [ [[package]] name = "conrod_core" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git?branch=hide_text#92925b122dfed139169c7d7687b3ca15c0cb5a2e" +source = "git+https://gitlab.com/veloren/conrod.git#971c7154f268ec52544634b5fde7383073b0a3b4" dependencies = [ "conrod_derive", "copypasta", @@ -596,7 +596,7 @@ dependencies = [ [[package]] name = "conrod_derive" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git?branch=hide_text#92925b122dfed139169c7d7687b3ca15c0cb5a2e" +source = "git+https://gitlab.com/veloren/conrod.git#971c7154f268ec52544634b5fde7383073b0a3b4" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", @@ -606,7 +606,7 @@ dependencies = [ [[package]] name = "conrod_winit" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git?branch=hide_text#92925b122dfed139169c7d7687b3ca15c0cb5a2e" +source = "git+https://gitlab.com/veloren/conrod.git#971c7154f268ec52544634b5fde7383073b0a3b4" [[package]] name = "const-random" diff --git a/voxygen/Cargo.toml b/voxygen/Cargo.toml index 6f976137c6..7adb1ce97c 100644 --- a/voxygen/Cargo.toml +++ b/voxygen/Cargo.toml @@ -28,8 +28,8 @@ gfx_device_gl = { version = "0.16.2", optional = true } old_school_gfx_glutin_ext = { git = "https://github.com/Imberflur/old-school-gfx-glutin-ext.git" } glutin = "0.23.0" winit = { version = "0.21.0", features = ["serde"] } -conrod_core = { git = "https://gitlab.com/veloren/conrod.git", branch = "hide_text" } -conrod_winit = { git = "https://gitlab.com/veloren/conrod.git", branch = "hide_text" } +conrod_core = { git = "https://gitlab.com/veloren/conrod.git" } +conrod_winit = { git = "https://gitlab.com/veloren/conrod.git" } euc = { git = "https://github.com/zesterer/euc.git" } # ECS diff --git a/voxygen/src/lib.rs b/voxygen/src/lib.rs index c821a23ad5..ad05364972 100644 --- a/voxygen/src/lib.rs +++ b/voxygen/src/lib.rs @@ -49,7 +49,7 @@ pub struct GlobalState { #[cfg(feature = "singleplayer")] pub singleplayer: Option, // TODO: redo this so that the watcher doesn't have to exist for reloading to occur - localization_watcher: watch::ReloadIndicator, + pub localization_watcher: watch::ReloadIndicator, } impl GlobalState { diff --git a/voxygen/src/main.rs b/voxygen/src/main.rs index 4adf66812f..1820be77fd 100644 --- a/voxygen/src/main.rs +++ b/voxygen/src/main.rs @@ -7,19 +7,19 @@ use veloren_voxygen::{ audio::{self, AudioFrontend}, i18n::{self, i18n_asset_key, VoxygenLocalization}, logging, - menu::main::MainMenuState, profile::Profile, + run, settings::{AudioOutput, Settings}, window::Window, - Direction, GlobalState, PlayState, PlayStateResult, + GlobalState, }; use common::{ assets::{load_watched, watch}, clock::Clock, }; -use std::{mem, panic}; -use tracing::{debug, error, warn}; +use std::panic; +use tracing::{error, warn}; fn main() { #[cfg(feature = "tweak")] @@ -140,10 +140,10 @@ fn main() { &mut localization_watcher, ) .unwrap_or_else(|error| { - let preferred_language = &global_state.settings.language.selected_language; + let selected_language = &settings.language.selected_language; warn!( - ?e, - ?preferred_language, + ?error, + ?selected_language, "Impossible to load language: change to the default language (English) instead.", ); settings.language.selected_language = i18n::REFERENCE_LANG.to_owned(); diff --git a/voxygen/src/menu/char_selection/mod.rs b/voxygen/src/menu/char_selection/mod.rs index 3ed4305be5..ece5cb3ea4 100644 --- a/voxygen/src/menu/char_selection/mod.rs +++ b/voxygen/src/menu/char_selection/mod.rs @@ -114,20 +114,6 @@ impl PlayState for CharSelectionState { } } - let humanoid_body = self - .char_selection_ui - .get_character_list() - .and_then(|data| { - if let Some(character) = data.get(self.char_selection_ui.selected_character) { - match character.body { - comp::Body::Humanoid(body) => Some(body), - _ => None, - } - } else { - None - } - }); - let humanoid_body = self.get_humanoid_body(); let loadout = self.char_selection_ui.get_loadout(); diff --git a/voxygen/src/menu/main/mod.rs b/voxygen/src/menu/main/mod.rs index 5ea3ded5ab..1e2cc6763a 100644 --- a/voxygen/src/menu/main/mod.rs +++ b/voxygen/src/menu/main/mod.rs @@ -15,7 +15,6 @@ use ui::{Event as MainMenuEvent, MainMenuUi}; pub struct MainMenuState { main_menu_ui: MainMenuUi, - title_music_channel: Option, // Used for client creation. client_init: Option, } @@ -25,7 +24,6 @@ impl MainMenuState { pub fn new(global_state: &mut GlobalState) -> Self { Self { main_menu_ui: MainMenuUi::new(global_state), - title_music_channel: None, client_init: None, } } @@ -209,6 +207,8 @@ impl PlayState for MainMenuState { MainMenuEvent::StartSingleplayer => { let (singleplayer, server_settings) = Singleplayer::new(None); // TODO: Make client and server use the same thread pool + global_state.singleplayer = Some(singleplayer); + attempt_login( global_state, "singleplayer".to_owned(),