mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Addressed MR comments
This commit is contained in:
parent
24134af4a7
commit
0296bbe696
@ -15,6 +15,7 @@ use egui::{
|
||||
use egui_winit_platform::Platform;
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
use lazy_static::lazy_static;
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
use std::ffi::CStr;
|
||||
#[cfg(feature = "use-dyn-lib")]
|
||||
use std::sync::Arc;
|
||||
|
@ -19,6 +19,7 @@ use common::{
|
||||
clock::Clock,
|
||||
};
|
||||
use std::panic;
|
||||
#[cfg(feature = "hot-anim")] use std::sync::Arc;
|
||||
use tracing::{error, info, warn};
|
||||
use veloren_voxygen::ui::egui::EguiState;
|
||||
|
||||
|
@ -266,16 +266,10 @@ impl<'frame> Drawer<'frame> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn draw_egui(
|
||||
&mut self,
|
||||
platform: &mut Platform,
|
||||
scale_factor: f32,
|
||||
) {
|
||||
pub fn draw_egui(&mut self, platform: &mut Platform, scale_factor: f32) {
|
||||
let (_output, paint_commands) = platform.end_frame();
|
||||
|
||||
let paint_jobs = platform
|
||||
.context()
|
||||
.tessellate(paint_commands);
|
||||
let paint_jobs = platform.context().tessellate(paint_commands);
|
||||
|
||||
let screen_descriptor = ScreenDescriptor {
|
||||
physical_width: self.borrow.sc_desc.width,
|
||||
@ -300,7 +294,9 @@ impl<'frame> Drawer<'frame> {
|
||||
|
||||
self.borrow.egui_render_pass.execute(
|
||||
&mut self.encoder.as_mut().unwrap(),
|
||||
&self.swap_tex.view,
|
||||
self.taking_screenshot
|
||||
.as_ref()
|
||||
.map_or(&self.swap_tex.view, |s| s.texture_view()),
|
||||
&paint_jobs,
|
||||
&screen_descriptor,
|
||||
None,
|
||||
|
@ -14,6 +14,7 @@ use serde::{Deserialize, Serialize};
|
||||
use tracing::{error, warn};
|
||||
use vek::*;
|
||||
use winit::monitor::VideoMode;
|
||||
|
||||
/// Represents a key that the game recognises after input mapping.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Deserialize, Serialize)]
|
||||
pub enum GameInput {
|
||||
|
Loading…
Reference in New Issue
Block a user