14
14
//! [](https://mermaid.live/edit#pako:eNpVkMFuwjAMhl_FyolK8AI9TFqZNmkb0gTXXkxiiNUkRm7CNlHefWHdDvhk2f5-2__FWHFkWnMI8mk9aob3bZ-gxuNi7UVGgpNwyuB4zMr7kllSA6vVw_TMe0loLU_Q_c9aSWf6Al9CAAxHUc4-Nn-CNwqmTkpy5GCLyUms7Nzt5u4r6plH2KBaP8F68UKJFPOdcnNHvLEO8IH1ODvAjthRqKBZmkgakV197nIDepM9RepNW1OHOvSmT9c6hyXL7jtZ02YttDTl5OrCJ8ajYjTtAcNYq-Q4i25mt35Nu_4AUKJpKA)
15
15
16
16
use std:: fmt:: Debug ;
17
- use clipboard:: ClipboardProvider ;
18
- use clipboard:: ClipboardContext ;
17
+ use copypasta:: { ClipboardContext , ClipboardProvider } ;
19
18
20
19
use bevy:: {
21
- input :: keyboard :: KeyboardInput , prelude:: * , sprite:: { MaterialMesh2dBundle , Mesh2dHandle } , window:: PrimaryWindow
20
+ prelude:: * , sprite:: { MaterialMesh2dBundle , Mesh2dHandle } , window:: PrimaryWindow
22
21
} ;
23
22
use bevy_egui:: {
24
- egui:: { self , KeyboardShortcut } ,
23
+ egui:: { self } ,
25
24
EguiContexts , EguiPlugin ,
26
25
} ;
27
26
use bevy_pancam:: { PanCam , PanCamPlugin } ;
@@ -155,10 +154,11 @@ fn keyboard_input_system(input: Res<ButtonInput<KeyCode>>, mut point_data: ResMu
155
154
}
156
155
157
156
if ctrl && input. just_pressed ( KeyCode :: KeyV ) {
158
- let mut ctx: ClipboardContext = ClipboardProvider :: new ( ) . unwrap ( ) ;
157
+ let mut ctx = ClipboardContext :: new ( ) . unwrap ( ) ;
159
158
match ctx. get_contents ( ) {
160
159
Ok ( contents) => {
161
- point_data. 1 = contents;
160
+ point_data. 1 += "\n " ;
161
+ point_data. 1 += & contents;
162
162
}
163
163
Err ( e) => eprintln ! ( "{:?}" , e)
164
164
}
@@ -169,14 +169,13 @@ fn graphics_drawing(
169
169
mut commands : Commands ,
170
170
mut meshes : ResMut < Assets < Mesh > > ,
171
171
mut materials : ResMut < Assets < ColorMaterial > > ,
172
- mut standard_material : ResMut < Assets < StandardMaterial > > ,
173
172
time : Res < Time > ,
174
173
mut simulation_timer : ResMut < SimulationTimer > ,
175
174
gizmo_query : Query < Entity , With < Gizmo > > ,
176
175
text_query : Query < Entity , With < ColorText > > ,
177
176
convex_hull_query : Query < Entity , With < ConvexHull > > ,
178
177
mut drawing_history : ResMut < DrawingHistory > ,
179
- mut window : Query < & mut Window , With < PrimaryWindow > > ,
178
+ window : Query < & mut Window , With < PrimaryWindow > > ,
180
179
) {
181
180
let window = window. single ( ) ;
182
181
if drawing_history. 0 . is_empty ( ) || drawing_history. 0 . len ( ) == drawing_history. 1 {
0 commit comments