-
-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathLoadingScreenController.cs
More file actions
26 lines (23 loc) · 839 Bytes
/
LoadingScreenController.cs
File metadata and controls
26 lines (23 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using Rampastring.Tools;
namespace ClientCore
{
public static class LoadingScreenController
{
public static string GetLoadScreenName(string sideId)
{
int resHeight = UserINISettings.Instance.IngameScreenHeight;
int randomInt = new Random().Next(1, 1 + ClientConfiguration.Instance.LoadingScreenCount);
string resolutionText;
if (resHeight < 480)
resolutionText = "400";
else if (resHeight < 600)
resolutionText = "480";
else
resolutionText = "600";
return SafePath.CombineFilePath(
ProgramConstants.BASE_RESOURCE_PATH,
FormattableString.Invariant($"l{resolutionText}s{sideId}{randomInt}.pcx")).Replace('\\', '/');
}
}
}