Skip to content

Commit

Permalink
Selection system
Browse files Browse the repository at this point in the history
Updated the main selection system.
  • Loading branch information
DavidMolTor committed Feb 9, 2023
1 parent 87e30c6 commit 863e2f0
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion build/JapanGuessr/PanelSelection.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ Button select click event handler
private void ButtonSelect_Click(object sender, RoutedEventArgs e)
{
//Check if a location has been selected
if (mapPicture.Children.Count == 1)
if (mapPicture.Children.Count == 2)
{
//Check the selected game mode
double dDistance;
Expand Down Expand Up @@ -305,6 +305,14 @@ private void ButtonSelect_Click(object sender, RoutedEventArgs e)
//Clear all map childrens
mapPicture.Children.Clear();

//Add a border to the map
Border border = new Border()
{
BorderThickness = new Thickness(2),
BorderBrush = new SolidColorBrush(Color.FromRgb(70, 70, 70))
};
mapPicture.Children.Add(border);

//Update the picture
UpdatePicture();
}
Expand Down Expand Up @@ -378,6 +386,14 @@ private void MapPicture_MouseLeftEvent(object sender, MouseButtonEventArgs e)
//Clear the map children
mapPicture.Children.Clear();

//Add a border to the map
Border border = new Border()
{
BorderThickness = new Thickness(2),
BorderBrush = new SolidColorBrush(Color.FromRgb(70, 70, 70))
};
mapPicture.Children.Add(border);

//Get the current location
Location location = mapPicture.ViewportPointToLocation(e.GetPosition(mapPicture));

Expand Down

0 comments on commit 863e2f0

Please sign in to comment.