Tweak a comment

This commit is contained in:
Rich Churcher 2024-11-17 17:48:54 +13:00
parent b606aa88e1
commit 777d558a5a

View file

@ -227,9 +227,8 @@ fn drag_inventory_items(
let Some(cursor_pos) = primary_window.cursor_position() else { let Some(cursor_pos) = primary_window.cursor_position() else {
return; return;
}; };
// We can't assign exact values with a `PositionType::Absolute` UI node. However, we can use // We can use distance from top of viewport and distance from left of viewport to accurately
// distance from top of viewport and distance from left of viewport to accomplish the same // position a `PositionType::Absolute` node.
// thing.
item_node.left = Val::Px(cursor_pos.x); item_node.left = Val::Px(cursor_pos.x);
item_node.top = Val::Px(cursor_pos.y); item_node.top = Val::Px(cursor_pos.y);
} }