thefake
thefake
CC#
Created by thefake on 1/29/2024 in #help
confused, passing tuple?
// fixes times like more than 60 seconds
// int, int, int
public (int, int, int) Fix(int hours, int minutes, int seconds)
{
return realFix(hours, minutes, seconds);
}
// string
public string Fix(string timeString)
{
return ConvertVariablesToTimeString(realFix(ConvertTimeStringToVariables(timeString)));
}
// NOTE: maybe 1 convert method instead of 2?
// Converts Time String to variables to use
public (int, int, int) ConvertTimeStringToVariables(string timeString)
{
string[] times = timeString.Split(':');
int hours = int.Parse(times[0]);
int minutes = int.Parse(times[1]);
int seconds = int.Parse(times[2]);
return (hours, minutes, seconds);
}

// Converts Variables to Time String
public string ConvertVariablesToTimeString(int hours, int minutes, int seconds)
{
return $"{hours}:{minutes}:{seconds}";
}
public (int, int, int) realFix(int hours, int minutes, int seconds)
{
while (seconds >= 60)
{
seconds -= 60;
minutes++;
}
while (minutes >= 60)
{
minutes -= 60;
hours++;
}
return (hours, minutes, seconds);
}
// fixes times like more than 60 seconds
// int, int, int
public (int, int, int) Fix(int hours, int minutes, int seconds)
{
return realFix(hours, minutes, seconds);
}
// string
public string Fix(string timeString)
{
return ConvertVariablesToTimeString(realFix(ConvertTimeStringToVariables(timeString)));
}
// NOTE: maybe 1 convert method instead of 2?
// Converts Time String to variables to use
public (int, int, int) ConvertTimeStringToVariables(string timeString)
{
string[] times = timeString.Split(':');
int hours = int.Parse(times[0]);
int minutes = int.Parse(times[1]);
int seconds = int.Parse(times[2]);
return (hours, minutes, seconds);
}

// Converts Variables to Time String
public string ConvertVariablesToTimeString(int hours, int minutes, int seconds)
{
return $"{hours}:{minutes}:{seconds}";
}
public (int, int, int) realFix(int hours, int minutes, int seconds)
{
while (seconds >= 60)
{
seconds -= 60;
minutes++;
}
while (minutes >= 60)
{
minutes -= 60;
hours++;
}
return (hours, minutes, seconds);
}
13 replies
CC#
Created by thefake on 1/25/2024 in #help
making an overlay
I want to make my own overlay, just like xbox gamebar or that geforce experience thing where you can broadcast, etc. I dont want to tab out of my games when I just need media controls to skip a song. I want it to be similiar to the ALT + R thing from geforce experience where you get an overlay, that shows you info. How should I do this? I’d like it to be a system tray thing that toggles the gui on keypress. Should I do this with basic .NET C# in visual studio to make the gui and make it system tray thing somehow or should I do something else to build the ui?
43 replies