@@ -3,13 +3,12 @@ use macroquad::{
33 prelude:: {
44 mouse_position, Color ,
55 } ,
6- shapes:: { draw_circle, draw_rectangle, draw_circle_lines, draw_line, draw_triangle} , text:: { get_text_center, draw_text, measure_text} , math:: { Vec4 , Vec2 } , color:: { YELLOW , BLACK , MAGENTA , GREEN , RED } ,
6+ shapes:: { draw_circle, draw_rectangle, draw_circle_lines, draw_line, draw_triangle, draw_hexagon } , text:: { get_text_center, draw_text, measure_text} , math:: { Vec4 , Vec2 } , color:: { YELLOW , BLACK , MAGENTA , GREEN , RED } ,
77} ;
88use std:: ops:: { Div , Mul } ;
99use crate :: Mode ;
1010
11- // TODO: rework everything
12- // TODO: make points drawable as hexagons
11+ // TODO: HEXAGONS
1312
1413pub ( crate ) fn is_point_in_circle (
1514 point_x : f32 , point_y : f32 ,
@@ -68,7 +67,6 @@ pub(crate) fn handle_mouse_input(
6867 )
6968 {
7069 // --- MOVE ---
71- // FIX: delete line
7270
7371 // Select a point to be moved around
7472 ( Move , true , _, _, false , Some ( hovered_point_id) , _) =>
@@ -258,15 +256,8 @@ fn paint_points(
258256 . for_each ( |( id, point) |
259257 {
260258 // Drawing the points
261- draw_circle (
262- point. x ,
263- point. y ,
264- * radius,
265- if Some ( id) == * selected_point_id_option
266- { YELLOW }
267- else
268- { Color :: from_hex ( * point_color) }
269- ) ;
259+ draw_circle ( point. x , point. y , * radius, if Some ( id) == * selected_point_id_option { YELLOW } else { Color :: from_hex ( * point_color) } ) ;
260+ // draw_hexagon(point.x, point.y, *radius, 1.5, true, Color::from_hex(0xffffff), Color::from_hex(*point_color));
270261
271262 let text_center = get_text_center ( id. to_string ( ) . as_str ( ) , None , 20 , 1.0 , 0.0 ) ;
272263
@@ -297,7 +288,6 @@ fn paint_points(
297288 * hovered_point_id_option = None ;
298289}
299290
300- // FIX: draw arrow heads properly
301291fn paint_arrow_heads (
302292 graph : & DijkstraGraph ,
303293 radius : & f32 ,
0 commit comments