diff --git a/README.md b/README.md
index f58275e..33c8b13 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,14 @@
-
+
+
-
+
+
+
-# ValorantCC (Valorant Crosshair Changer) [Download Here](https://github.com/weedeej/ValorantCC/releases/latest/download/ValorantCC.exe)
+# ValorantCC (Valorant Crosshair Changer)
Change your Crosshair's color to **ANY** color you want for style and/or visiblity.
![image](https://user-images.githubusercontent.com/87055977/155284250-d01577c2-5661-43b1-8759-a6a8525e7709.png)
diff --git a/ValorantCC/MainWindow.xaml b/ValorantCC/MainWindow.xaml
index 10ad1c7..39f091a 100644
--- a/ValorantCC/MainWindow.xaml
+++ b/ValorantCC/MainWindow.xaml
@@ -42,6 +42,7 @@
+
diff --git a/ValorantCC/MainWindow.xaml.cs b/ValorantCC/MainWindow.xaml.cs
index 1e028ce..2e3260f 100644
--- a/ValorantCC/MainWindow.xaml.cs
+++ b/ValorantCC/MainWindow.xaml.cs
@@ -25,6 +25,7 @@ public partial class MainWindow : MetroWindow
public API ValCCAPI;
public int SelectedIndex;
public bool LoggedIn;
+ public bool PressedForceLogin = false;
private string _sharecode;
private FetchResponse? sharedProfileResp;
public MainWindow()
@@ -392,5 +393,12 @@ private void _zoom_ValueChanged(object sender, RoutedPropertyChangedEventArgs imageSources = new List();
static ImageBrush RandomBG => imageSources[rand.Next(0, imageSources.Count - 1)];
@@ -33,12 +34,16 @@ static CreateRender()
public static async Task GenerateRender(this ProfilesWindow profilesWindow, PublicProfile profile)
{
- // This will be changed and will be replaced with more efficient method of rendering multiple settings.
+ //More random BG xd
+ var RandomBGC = RandomBG;
+ while (RandomBGC == previousBG)
+ RandomBGC = RandomBG;
+ previousBG = RandomBGC;
// Main border
Border template = new Border()
{
- Background = RandomBG,
+ Background = RandomBGC,
CornerRadius = new CornerRadius(7, 7, 25, 25),
MinHeight = 95,
MaxHeight = 95,
diff --git a/ValorantCC/ValorantCC.csproj b/ValorantCC/ValorantCC.csproj
index 443bd4f..246c12f 100644
--- a/ValorantCC/ValorantCC.csproj
+++ b/ValorantCC/ValorantCC.csproj
@@ -14,7 +14,7 @@
false
- 3.0.0
+ 3.0.1
false
diff --git a/ValorantCC/src/BackgroundAuth.cs b/ValorantCC/src/BackgroundAuth.cs
index 3e26401..b94bd7b 100644
--- a/ValorantCC/src/BackgroundAuth.cs
+++ b/ValorantCC/src/BackgroundAuth.cs
@@ -20,9 +20,11 @@ public async void LoopCheck()
{
string LockfilePath = Environment.GetEnvironmentVariable("LocalAppData") + "\\Riot Games\\Riot Client\\Config\\lockfile"; //Copy pasted from Auth.cs because why not?
bool lockfilexists = false;
+ int FlagExistsCount = 0;
main.ch_display.Visibility = Visibility.Collapsed;
main.buttons_group.Visibility = Visibility.Collapsed;
main.controls_group.Visibility = Visibility.Collapsed;
+ main.ForceLoginBtn.Visibility = Visibility.Collapsed;
while (true)
{
if (AuthObj.CheckLockFile(LockfilePath) && !lockfilexists)
@@ -31,9 +33,12 @@ public async void LoopCheck()
main.StatusTxt.Text = "Waiting for session. . .";
lockfilexists = true;
}
- if (!await LoginFlagExists())
+ if (!await LoginFlagExists() && !main.PressedForceLogin)
{
await Task.Delay(1500);
+ FlagExistsCount++;
+ if (FlagExistsCount > 10)
+ main.ForceLoginBtn.Visibility = Visibility.Visible;
continue;
}
if (lockfilexists && AuthObj.ObtainLockfileData(LockfilePath).Success)
@@ -45,6 +50,7 @@ public async void LoopCheck()
if (!main.LoggedIn)
{
main.StatusTxt.Text = "Failed. Please login to Riot Client or Start Valorant.";
+ main.ForceLoginBtn.Visibility = Visibility.Collapsed;
await Task.Delay(1500);
continue;
}
@@ -67,6 +73,7 @@ public async void LoopCheck()
main.chkbxShareable.Visibility = Visibility.Visible;
main.spinner.Visibility = Visibility.Collapsed;
+ main.ForceLoginBtn.Visibility = Visibility.Collapsed;
main.spinner.Spin = false;
main.UpdateLayout();
Trace.WriteLine(main.Height + " || " + OriginalHeight);
@@ -74,7 +81,7 @@ public async void LoopCheck()
return;
}
- await Task.Delay(1500);
+ await Task.Delay(500);
}
}
@@ -85,17 +92,13 @@ public async static Task LoginFlagExists()
string content;
using (FileStream fileStream = File.Open(log.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
- {
using (StreamReader sr = new StreamReader(fileStream))
- {
content = (String)sr.ReadToEnd().Clone();
- }
- }
+
bool t = false;
if (content.Contains("riot-messaging-service: State is now Connected"))
- {
t = true;
- }
+
await Task.Delay(1);
return t;
}