Skip to content

Commit

Permalink
Try Fix Crosshair zoom+added opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
weedeej committed Feb 19, 2022
1 parent 1e6874c commit 0cbf823
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ValorantCC/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
x:Class="ValorantCC.MainWindow"
xmlns:fa="http://schemas.fontawesome.io/icons/"
mc:Ignorable="d"
Title="vTools - ValorantCC" Height="500" Width="901" SizeToContent="Height" AllowsTransparency="True" WindowStartupLocation="CenterScreen" WindowState="Normal" ResizeMode="CanMinimize" WindowStyle="None" Icon="Resources/vtools-colored.ico"
Title="vTools - ValorantCC" Height="0" Width="901" SizeToContent="Height" AllowsTransparency="True" WindowStartupLocation="CenterScreen" WindowState="Normal" ResizeMode="CanMinimize" WindowStyle="None" Icon="Resources/vtools-colored.ico"
Background="#232429"
WindowTitleBrush="#232429"
GlowBrush="White"
Expand Down Expand Up @@ -89,7 +89,7 @@
</Border>

<TextBlock HorizontalAlignment="Center" Foreground="White" FontWeight="Bold" FontFamily="Segoe UI Semibold" Margin="0,12,0,0"><Run Text="Primary"/></TextBlock>
<Slider Margin="4,174,58,3" Grid.Row="0" Grid.Column="0" x:Name="_zoom" Minimum="1" Maximum="2" VerticalAlignment="Bottom"/>
<Slider Margin="4,174,58,3" Grid.Row="0" Grid.Column="0" x:Name="_zoom" Minimum="1" Maximum="2.1" VerticalAlignment="Bottom" ValueChanged="_zoom_ValueChanged" TickFrequency="0.006" IsSnapToTickEnabled="True" SmallChange="0.003"/>
</Grid>
<Grid Grid.Column="1">
<Border BorderBrush="#232429" BorderThickness="0 0 5 0">
Expand Down
5 changes: 5 additions & 0 deletions ValorantCC/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,5 +391,10 @@ private void btnCopyShareCode_Click(object sender, RoutedEventArgs e)
Clipboard.SetText(_sharecode);
Utilities.Utils.MessageText("Your sharecode has been copied!", Brushes.Lime);
}

private void _zoom_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
Trace.WriteLine(_zoom.Value);
}
}
}
10 changes: 5 additions & 5 deletions ValorantCC/src/Crosshair_Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public static void Generate(int column, Grid grid, ProfileSettings settings)
recindex++;

rectangle_redraw(rectangles[i], rectangles[i + 1], pos, settings);
rectangles[i].Fill = new SolidColorBrush(Color.FromRgb(settings.Color.R, settings.Color.G, settings.Color.B));
rectangles[i + 1].Stroke = new SolidColorBrush(Color.FromRgb(settings.OutlineColor.R, settings.OutlineColor.G, settings.OutlineColor.B));
rectangles[i].Fill = new SolidColorBrush(Color.FromArgb(settings.Color.A, settings.Color.R, settings.Color.G, settings.Color.B));
rectangles[i + 1].Stroke = new SolidColorBrush(Color.FromArgb(settings.OutlineColor.A, settings.OutlineColor.R, settings.OutlineColor.G, settings.OutlineColor.B));
Grid.SetColumn(rectangles[i], column);
Grid.SetRow(rectangles[i], 0);
Grid.SetColumn(rectangles[i + 1], column);
Expand All @@ -77,8 +77,8 @@ public static void Generate(int column, Grid grid, ProfileSettings settings)
};

dot_redraw(dot, dotOT, settings);
dot.Fill = new SolidColorBrush(Color.FromRgb(settings.Color.R, settings.Color.G, settings.Color.B));
dotOT.Stroke = new SolidColorBrush(Color.FromRgb(settings.OutlineColor.R, settings.OutlineColor.G, settings.OutlineColor.B));
dot.Fill = new SolidColorBrush(Color.FromArgb(settings.Color.A, settings.Color.R, settings.Color.G, settings.Color.B));
dotOT.Stroke = new SolidColorBrush(Color.FromArgb(settings.OutlineColor.A, settings.OutlineColor.R, settings.OutlineColor.G, settings.OutlineColor.B));
Grid.SetColumn(dot, column);
Grid.SetRow(dot, 0);
Grid.SetColumn(dotOT, column);
Expand All @@ -92,7 +92,7 @@ public static void Generate(int column, Grid grid, SniperSettings settings)
{
Ellipse ellipse = new();
dot_redraw(ellipse, settings);
ellipse.Fill = new SolidColorBrush(Color.FromRgb(settings.CenterDotColor.R, settings.CenterDotColor.G, settings.CenterDotColor.B));
ellipse.Fill = new SolidColorBrush(Color.FromArgb(settings.CenterDotColor.A, settings.CenterDotColor.R, settings.CenterDotColor.G, settings.CenterDotColor.B));
Grid.SetColumn(ellipse, column);
Grid.SetRow(ellipse, 0);

Expand Down

0 comments on commit 0cbf823

Please # to comment.