Skip to content

Commit

Permalink
Functions renamed for cursor handling (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdahlblom authored Jan 27, 2024
1 parent de16910 commit 30576b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/client/DCSInsight/Misc/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ public static Tuple<bool, bool> CheckJSONDirectory(string jsonDirectory)
return new Tuple<bool, bool>(true, jsonFound);
}

public static void UIElement_OnMouseEnter(object sender, MouseEventArgs e)
public static void UIElement_OnMouseEnterHandIcon(object sender, MouseEventArgs e)
{
Mouse.OverrideCursor = Cursors.Hand;
}

public static void UIElement_OnMouseLeave(object sender, MouseEventArgs e)
public static void UIElement_OnMouseLeaveNormalIcon(object sender, MouseEventArgs e)
{
Mouse.OverrideCursor = Cursors.Arrow;
}
Expand Down
8 changes: 4 additions & 4 deletions src/client/DCSInsight/UserControls/UserControlAPI.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ protected override void BuildUI()
Content = "[warning]",
Foreground = (SolidColorBrush)new BrushConverter().ConvertFromString("#0000FF"),
};
labelConsoleWarning.MouseEnter += Common.UIElement_OnMouseEnter;
labelConsoleWarning.MouseLeave += Common.UIElement_OnMouseLeave;
labelConsoleWarning.MouseEnter += Common.UIElement_OnMouseEnterHandIcon;
labelConsoleWarning.MouseLeave += Common.UIElement_OnMouseLeaveNormalIcon;
labelConsoleWarning.MouseDown += LabelConsoleWarningOnMouseDown;

void LabelConsoleWarningOnMouseDown(object sender, MouseButtonEventArgs e)
Expand All @@ -121,8 +121,8 @@ void LabelConsoleWarningOnMouseDown(object sender, MouseButtonEventArgs e)
Content = "[list environment]",
Foreground = (SolidColorBrush)new BrushConverter().ConvertFromString("#0000FF"),
};
labelDefaultLua.MouseEnter += Common.UIElement_OnMouseEnter;
labelDefaultLua.MouseLeave += Common.UIElement_OnMouseLeave;
labelDefaultLua.MouseEnter += Common.UIElement_OnMouseEnterHandIcon;
labelDefaultLua.MouseLeave += Common.UIElement_OnMouseLeaveNormalIcon;
labelDefaultLua.MouseDown += LabelDefaultLuaOnMouseDown;

void LabelDefaultLuaOnMouseDown(object sender, MouseButtonEventArgs e)
Expand Down

0 comments on commit 30576b5

Please sign in to comment.