@@ -4,7 +4,7 @@ use rlbot_flat::flat::{
4
4
} ;
5
5
6
6
#[ rustfmt:: skip]
7
- mod colors {
7
+ pub mod colors {
8
8
use rlbot_flat:: flat:: Color ;
9
9
pub const TRANSPARENT : Color = Color { r : 0 , g : 0 , b : 0 , a : 0 } ;
10
10
pub const BLACK : Color = Color { r : 0 , g : 0 , b : 0 , a : 255 } ;
@@ -20,14 +20,14 @@ mod colors {
20
20
pub const PURPLE : Color = Color { r : 128 , g : 0 , b : 128 , a : 255 } ;
21
21
pub const TEAL : Color = Color { r : 0 , g : 128 , b : 128 , a : 255 } ;
22
22
}
23
- pub use colors:: * ;
24
23
25
24
/// The Renderer allows of easy construction of [RenderGroup]s for in-game debug rendering.
26
25
/// When done, call [build] and queue the resulting [RenderGroup] in the packet queue.
27
26
///
28
27
/// Example:
29
28
/// ```ignore
30
- /// use rlbot::render::{Renderer, RED, GREEN, BLUE};
29
+ /// use rlbot::render::{Renderer};
30
+ /// use rlbot::render::colors::{BLUE, GREEN, RED};
31
31
/// let mut draw = Renderer::new(0);
32
32
/// draw.line_3d(car.pos, car.pos + car.forward() * 120., RED);
33
33
/// draw.line_3d(car.pos, car.pos + car.rightward() * 120., GREEN);
@@ -100,7 +100,7 @@ impl Renderer {
100
100
/// Consider using [push] and `..default()` when using multiple default values.
101
101
pub fn string_2d (
102
102
& mut self ,
103
- text : impl Into < String > ,
103
+ text : String ,
104
104
x : f32 ,
105
105
y : f32 ,
106
106
scale : f32 ,
@@ -111,7 +111,7 @@ impl Renderer {
111
111
) {
112
112
self . group . render_messages . push (
113
113
String2D {
114
- text : text . into ( ) ,
114
+ text,
115
115
x,
116
116
y,
117
117
scale,
@@ -129,7 +129,7 @@ impl Renderer {
129
129
/// Consider using [push] and `..default()` when using multiple default values.
130
130
pub fn string_3d (
131
131
& mut self ,
132
- text : impl Into < String > ,
132
+ text : String ,
133
133
anchor : impl Into < RenderAnchor > ,
134
134
scale : f32 ,
135
135
foreground : Color ,
@@ -139,7 +139,7 @@ impl Renderer {
139
139
) {
140
140
self . group . render_messages . push (
141
141
String3D {
142
- text : text . into ( ) ,
142
+ text,
143
143
anchor : Box :: new ( anchor. into ( ) ) ,
144
144
scale,
145
145
foreground,
0 commit comments