@@ -17,44 +17,42 @@ impl EditorWindow for RendererWindow {
17
17
let type_registry = world. resource :: < AppTypeRegistry > ( ) . clone ( ) ;
18
18
let type_registry = type_registry. read ( ) ;
19
19
20
- egui:: ScrollArea :: vertical ( )
21
- . auto_shrink ( [ false , false ] )
22
- . show ( ui, |ui| {
23
- let render_device = world. get_resource :: < RenderDevice > ( ) . unwrap ( ) ;
24
-
25
- let limits = render_device. limits ( ) ;
26
- let features = render_device. features ( ) ;
27
-
28
- ui. heading ( "Settings" ) ;
29
- egui:: Grid :: new ( "directional_light_shadow_map" ) . show ( ui, |ui| {
30
- let mut directional_light_shadow_map = world
31
- . get_resource_mut :: < DirectionalLightShadowMap > ( )
32
- . unwrap ( ) ;
33
- ui. label ( "Directional light shadow map size" ) ;
34
- let mut size = directional_light_shadow_map. size ;
35
-
36
- let mut context = Context :: default ( ) ;
37
- let mut env = InspectorUi :: new_no_short_circuit ( & type_registry, & mut context) ;
38
- if env. ui_for_reflect_with_options (
39
- & mut size,
40
- ui,
41
- egui:: Id :: NULL ,
42
- & NumberOptions :: at_least ( 1 ) . with_speed ( 4.0 ) ,
43
- ) {
44
- directional_light_shadow_map. size = size;
45
- }
46
- ui. end_row ( ) ;
47
- } ) ;
48
-
49
- ui. collapsing ( "Limits" , |ui| {
50
- ui. label ( RichText :: new ( format ! ( "{:#?}" , limits) ) . monospace ( ) ) ;
51
- } ) ;
52
- ui. collapsing ( "Features" , |ui| {
53
- let features = format ! ( "{:#?}" , features) ;
54
- for feature in features. split ( " | " ) {
55
- ui. label ( RichText :: new ( format ! ( "- {}" , feature) ) . monospace ( ) ) ;
56
- }
57
- } ) ;
20
+ egui:: ScrollArea :: vertical ( ) . show ( ui, |ui| {
21
+ let render_device = world. get_resource :: < RenderDevice > ( ) . unwrap ( ) ;
22
+
23
+ let limits = render_device. limits ( ) ;
24
+ let features = render_device. features ( ) ;
25
+
26
+ ui. heading ( "Settings" ) ;
27
+ egui:: Grid :: new ( "directional_light_shadow_map" ) . show ( ui, |ui| {
28
+ let mut directional_light_shadow_map = world
29
+ . get_resource_mut :: < DirectionalLightShadowMap > ( )
30
+ . unwrap ( ) ;
31
+ ui. label ( "Directional light shadow map size" ) ;
32
+ let mut size = directional_light_shadow_map. size ;
33
+
34
+ let mut context = Context :: default ( ) ;
35
+ let mut env = InspectorUi :: new_no_short_circuit ( & type_registry, & mut context) ;
36
+ if env. ui_for_reflect_with_options (
37
+ & mut size,
38
+ ui,
39
+ egui:: Id :: NULL ,
40
+ & NumberOptions :: at_least ( 1 ) . with_speed ( 4.0 ) ,
41
+ ) {
42
+ directional_light_shadow_map. size = size;
43
+ }
44
+ ui. end_row ( ) ;
58
45
} ) ;
46
+
47
+ ui. collapsing ( "Limits" , |ui| {
48
+ ui. label ( RichText :: new ( format ! ( "{:#?}" , limits) ) . monospace ( ) ) ;
49
+ } ) ;
50
+ ui. collapsing ( "Features" , |ui| {
51
+ let features = format ! ( "{:#?}" , features) ;
52
+ for feature in features. split ( " | " ) {
53
+ ui. label ( RichText :: new ( format ! ( "- {}" , feature) ) . monospace ( ) ) ;
54
+ }
55
+ } ) ;
56
+ } ) ;
59
57
}
60
58
}
0 commit comments