File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ woff = "0.3.3"
2323[dependencies ]
2424anyhow = { version = " 1.0.81" , features = [" backtrace" ] }
2525image = " 0.25.1"
26- imgui-sys = { version = " 0.11 .0" , features = [" freetype" , " use-vcpkg" ] }
27- imgui = { version = " 0.11 .0" , features = [" freetype" ] }
28- hudhook = { git = " https://github.com/veeenu/hudhook.git " , rev = " e34f748fb03c07ccfdd63aa5094271772ca02fce " }
26+ imgui-sys = { version = " 0.12 .0" , features = [" freetype" , " use-vcpkg" ] }
27+ imgui = { version = " 0.12 .0" , features = [" freetype" ] }
28+ hudhook = " 0.7.0 "
2929serde_with = " 3.7.0"
3030serde_yaml = " 0.9.34"
3131serde = { version = " 1.0.197" , features = [" serde_derive" ] }
Original file line number Diff line number Diff line change 1- use std:: { path:: PathBuf , time :: Instant } ;
1+ use std:: path:: PathBuf ;
22
33use hudhook:: util;
44
@@ -9,7 +9,6 @@ pub struct RuntimeInfo {
99 viewport_effective_width : f32 ,
1010 viewport_effective_offset_y : f32 ,
1111 viewport_height : f32 ,
12- last_frame_start_time : Instant ,
1312 was_anything_active : bool ,
1413}
1514
@@ -60,7 +59,6 @@ impl RuntimeInfo {
6059 viewport_effective_width : 0. ,
6160 viewport_effective_offset_y : 0. ,
6261 viewport_height : 0. ,
63- last_frame_start_time : Instant :: now ( ) ,
6462 was_anything_active : false ,
6563 }
6664 }
@@ -74,10 +72,6 @@ impl RuntimeInfo {
7472 self . viewport_effective_offset_y =
7573 ( ( self . viewport_width ( ) - self . viewport_effective_width ( ) ) / 2. ) . floor ( ) ;
7674 }
77-
78- let now = Instant :: now ( ) ;
79- ctx. io_mut ( ) . delta_time = now. duration_since ( self . last_frame_start_time ) . as_secs_f32 ( ) ;
80- self . last_frame_start_time = now;
8175 }
8276
8377 pub fn render ( & mut self , ui : & imgui:: Ui ) {
You can’t perform that action at this time.
0 commit comments