@@ -31,7 +31,7 @@ pub struct System {
3131 pub imgui : Context ,
3232 pub platform : WinitPlatform ,
3333 pub renderer : Renderer ,
34- pub font_size : f32 ,
34+ // pub font_size: f32,
3535 pub ( crate ) s_settings : Settings ,
3636}
3737
@@ -102,7 +102,7 @@ pub fn init(title: &str) -> System {
102102 imgui,
103103 platform,
104104 renderer,
105- font_size,
105+ // font_size,
106106 s_settings,
107107 }
108108}
@@ -174,16 +174,16 @@ impl System {
174174 target. clear_color ( 0.2 , 0.2 , 0.2 , 1.0 ) ;
175175 platform. prepare_render ( & ui, gl_window. window ( ) ) ;
176176
177- if g_debug_draw. borrow ( ) . m_show_ui
178- {
177+ if g_debug_draw. borrow ( ) . m_show_ui
178+ {
179179 s_test. borrow ( ) . get_base ( ) . borrow_mut ( ) . draw_title (
180180 & ui,
181181 & format ! (
182182 "{0} : {1}" ,
183183 g_test_entries[ s_settings. m_test_index as usize ] . category,
184184 g_test_entries[ s_settings. m_test_index as usize ] . name
185185 ) ,
186- ) ;
186+ ) ;
187187 }
188188
189189 s_test. borrow_mut ( ) . step (
@@ -245,7 +245,7 @@ impl System {
245245 device_id : _,
246246 is_synthetic : _,
247247 } => {
248- if input. state == ElementState :: Pressed
248+ if input. state == ElementState :: Pressed
249249 {
250250 match input. virtual_keycode {
251251 Some ( VirtualKeyCode :: Escape ) => {
@@ -329,8 +329,8 @@ impl System {
329329 Some ( VirtualKeyCode :: P ) => {
330330 s_settings. m_pause = !s_settings. m_pause ;
331331 } ,
332- Some ( VirtualKeyCode :: LBracket ) => {
333- // Switch to previous test
332+ Some ( VirtualKeyCode :: LBracket ) => {
333+ // Switch to previous test
334334 if s_settings. m_test_index ==0 {
335335 s_settings. m_test_index = g_test_entries. len ( ) -1 ;
336336 } else {
@@ -359,9 +359,9 @@ impl System {
359359 d. m_show_ui = !d. m_show_ui ;
360360 } ,
361361 _ => { } ,
362- }
363- }
364- s_test. borrow_mut ( ) . keyboard ( input) ;
362+ }
363+ }
364+ s_test. borrow_mut ( ) . keyboard ( input) ;
365365 }
366366 WindowEvent :: CloseRequested => * control_flow = ControlFlow :: Exit ,
367367 _ => ( ) ,
@@ -394,7 +394,7 @@ impl System {
394394 s_test : TestPtr < D , F > ,
395395 cursor_position : PhysicalPosition < f64 > ,
396396 g_camera : & mut Camera ,
397- button : & MouseButton ,
397+ button : & MouseButton ,
398398 action : & ElementState ,
399399 mods : & ModifiersState ,
400400 s_right_mouse_down : & mut bool ,
@@ -419,7 +419,7 @@ impl System {
419419 s_test. borrow_mut ( ) . mouse_down ( pw) ;
420420 }
421421 }
422-
422+
423423 if * action == ElementState :: Released
424424 {
425425 s_test. borrow_mut ( ) . mouse_up ( pw) ;
@@ -428,7 +428,7 @@ impl System {
428428 else if * button == MouseButton :: Right
429429 {
430430 if * action == ElementState :: Pressed
431- {
431+ {
432432 * s_click_point_ws = g_camera. convert_screen_to_world ( ps) ;
433433 * s_right_mouse_down = true ;
434434 }
@@ -440,7 +440,7 @@ impl System {
440440 }
441441 }
442442
443- fn mouse_motion_callback < ' a , D : UserDataType , F : Facade > ( s_test : TestPtr < D , F > ,
443+ fn mouse_motion_callback < ' a , D : UserDataType , F : Facade > ( s_test : TestPtr < D , F > ,
444444 g_camera : & mut Camera , position : & PhysicalPosition < f64 > ,
445445 s_right_mouse_down : & mut bool ,
446446 s_click_point_ws : & mut B2vec2 )
@@ -449,7 +449,7 @@ impl System {
449449
450450 let pw: B2vec2 = g_camera. convert_screen_to_world ( ps) ;
451451 s_test. borrow_mut ( ) . mouse_move ( pw) ;
452-
452+
453453 if * s_right_mouse_down
454454 {
455455 let diff: B2vec2 = pw - * s_click_point_ws;
@@ -501,7 +501,7 @@ impl System {
501501 ui. slider_config ( "Vel Iters" , 0 , 50 )
502502 . display_format ( "%d" )
503503 . build ( & mut s_settings. m_velocity_iterations ) ;
504-
504+
505505 ui. slider_config ( "Pos Iter" , 0 , 50 )
506506 . display_format ( "%d" )
507507 . build ( & mut s_settings. m_position_iterations ) ;
@@ -516,7 +516,7 @@ impl System {
516516 ui. checkbox ( "Warm Starting" , & mut s_settings. m_enable_warm_starting ) ;
517517 ui. checkbox ( "Time of Impact" , & mut s_settings. m_enable_continuous ) ;
518518 ui. checkbox ( "Sub-Stepping" , & mut s_settings. m_enable_sub_stepping ) ;
519-
519+
520520 ui. separator ( ) ;
521521
522522 ui. checkbox ( "Shapes" , & mut s_settings. m_draw_shapes ) ;
0 commit comments