Fix clicked UI nodes getting reset when hovering child nodes (#4194)
# Objective Fixes #4193 ## Solution When resetting a node's `Interaction` to `None`, ignore any `Clicked` node because that should be handled by the mouse release check exclusively.
This commit is contained in:
		
							parent
							
								
									21a875d67b
								
							
						
					
					
						commit
						6f16580b8a
					
				| @ -169,7 +169,8 @@ pub fn ui_focus_system( | |||||||
|     // reset lower nodes to None
 |     // reset lower nodes to None
 | ||||||
|     for (_entity, _focus_policy, interaction, _) in moused_over_z_sorted_nodes { |     for (_entity, _focus_policy, interaction, _) in moused_over_z_sorted_nodes { | ||||||
|         if let Some(mut interaction) = interaction { |         if let Some(mut interaction) = interaction { | ||||||
|             if *interaction != Interaction::None { |             // don't reset clicked nodes because they're handled separately
 | ||||||
|  |             if *interaction != Interaction::Clicked && *interaction != Interaction::None { | ||||||
|                 *interaction = Interaction::None; |                 *interaction = Interaction::None; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Gabriel Bourgeois
						Gabriel Bourgeois