Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ContainerAIActionTitle.c
Go to the documentation of this file.
2{
3 //------------------------------------------------------------------------------------------------
4 override bool _WB_GetCustomTitle(BaseContainer source, out string title)
5 {
6 title = source.GetClassName();
7 title.Replace("SCR_ScenarioFrameworkAIAction", "");
8 string sOriginal = title;
9 SplitStringByUpperCase(sOriginal, title);
10 return true;
11 }
12
13 //------------------------------------------------------------------------------------------------
14 protected void SplitStringByUpperCase(string input, out string output)
15 {
16 output = "";
17 bool wasPreviousUpperCase;
18 int asciiChar;
19 for (int i, count = input.Length(); i < count; i++)
20 {
21 asciiChar = input.ToAscii(i);
22 bool isLowerCase = (asciiChar > 96 && asciiChar < 123);
23 if (i > 0 && !wasPreviousUpperCase && !isLowerCase)
24 {
25 output += " " + asciiChar.AsciiToString();
26 wasPreviousUpperCase = true;
27 }
28 else
29 {
30 if (isLowerCase)
31 wasPreviousUpperCase = false;
32 output += asciiChar.AsciiToString();
33 }
34 }
35 }
36}
void SplitStringByUpperCase(string input, out string output)