Clean comments, fix mistake, change dep source now that compatible version is available on crates.io

This commit is contained in:
Imbris 2020-02-26 01:06:37 -05:00
parent 5e8d74e00e
commit 7dfb24d4a5
6 changed files with 6 additions and 16 deletions

3
Cargo.lock generated
View File

@ -2779,7 +2779,8 @@ dependencies = [
[[package]]
name = "old_school_gfx_glutin_ext"
version = "0.23.0"
source = "git+https://github.com/Imberflur/old-school-gfx-glutin-ext.git#e128e187a81d1fa15409db38bc93e6677fc09288"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7cf32ddfed46b511150abb23d3193d38ec71ffafa561e6c2d82ad06eb51072e"
dependencies = [
"gfx_core",
"gfx_device_gl",

View File

@ -25,7 +25,7 @@ anim = { package = "veloren-voxygen-anim", path = "src/anim", default-features =
# Graphics
gfx = "0.18.2"
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" }
old_school_gfx_glutin_ext = "0.23"
glutin = "0.23.0"
winit = { version = "0.21.0", features = ["serde"] }
conrod_core = { git = "https://gitlab.com/veloren/conrod.git" }

View File

@ -63,6 +63,7 @@ impl GlobalState {
pub fn maintain(&mut self, dt: f32) { self.audio.maintain(dt); }
}
// TODO: appears to be currently unused by playstates
pub enum Direction {
Forwards,
Backwards,
@ -86,7 +87,6 @@ pub enum PlayStateResult {
/// A trait representing a playable game state. This may be a menu, a game
/// session, the title screen, etc.
pub trait PlayState {
/// Get a descriptive name for this state type.
/// Called when entering this play state from another
fn enter(&mut self, global_state: &mut GlobalState, direction: Direction);

View File

@ -15,7 +15,7 @@ use veloren_voxygen::{
};
use common::{
assets::{load_watched, watch},
assets::{load, load_expect, load_watched, watch},
clock::Clock,
};
use std::panic;

View File

@ -73,7 +73,7 @@ pub fn run(mut global_state: GlobalState, event_loop: EventLoop) {
global_state.on_play_state_changed();
});
states.last_mut().map(|new_state| {
new_state.enter(&mut global_state, Direction::Forwards);
new_state.enter(&mut global_state, Direction::Backwards);
});
},
PlayStateResult::Push(mut new_state) => {
@ -115,17 +115,7 @@ pub fn run(mut global_state: GlobalState, event_loop: EventLoop) {
.swap_buffers()
.expect("Failed to swap window buffers!");
}
//global_state.window.request_redraw();
},
/*winit::event::Event::WindowEvent {
event: WindowEvent::RedrawRequested,
..
} => {
// render here
}
..
*control_flow = ControlFlow::Exit;
}*/
winit::event::Event::WindowEvent { event, .. } => global_state
.window
.handle_window_event(event, &mut global_state.settings),

View File

@ -705,7 +705,6 @@ impl PlayState for SessionState {
},
);
// TODO: dont
// Look for changes in the localization files
if global_state.localization_watcher.reloaded() {
hud_events.push(HudEvent::ChangeLanguage(self.voxygen_i18n.metadata.clone()));