Skip to content

Commit 174001e

Browse files
authored
Merge pull request #257 from manups4e/PM_Experiment
Pause Menu new new new
2 parents 225f196 + 3f5bd30 commit 174001e

File tree

129 files changed

+11330
-13914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+11330
-13914
lines changed

MenuExample/MenuExample.cs

Lines changed: 407 additions & 307 deletions
Large diffs are not rendered by default.

ScaleformUI_Csharp/Elements/ScaleformLabel.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ public string Label
1717
}
1818
}
1919

20+
public string[] SplitLabel
21+
{
22+
get
23+
{
24+
int stringsNeeded = (_label.Length - 1) / 99 + 1; // division with round up
25+
26+
String[] outputString = new String[stringsNeeded];
27+
for (int i = 0; i < stringsNeeded; i++)
28+
{
29+
outputString[i] = _label.Substring(i * 99, MathUtil.Clamp(_label.Substring(i * 99).Length, 0, 99));
30+
}
31+
32+
return outputString;
33+
}
34+
}
35+
2036
public static implicit operator ScaleformLabel(string label)
2137
{
2238
return new ScaleformLabel(label);

ScaleformUI_Csharp/Elements/ScreenTools.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ private static void AdjustForSuperWidescreen(ref Vector2 pos, ref SizeF size)
162162

163163
float fDifference = ((16f/9f) / GetAspectRatio(false));
164164
if (pos != null)
165-
pos = new Vector2(0.5f - ((0.5f - pos.X) * fDifference));
165+
pos = new Vector2(0.5f - ((0.5f - pos.X) * fDifference), pos.Y);
166166

167167
if (size != null)
168168
size.Width *= fDifference;

ScaleformUI_Csharp/Menus/MenuHandler.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,6 @@ public static async Task SwitchTo(this MenuBase currentMenu, MenuBase newMenu, i
8787
max = newer.MaxItemsOnScreen;
8888

8989
newer._currentSelection = Math.Max(0, Math.Min(newMenuCurrentSelection, newer.MenuItems.Count - 1));
90-
91-
if (newMenuCurrentSelection < newer.topEdge)
92-
newer.topEdge = newMenuCurrentSelection;
93-
else if (newMenuCurrentSelection >= newer.topEdge + max)
94-
newer.topEdge = Math.Max(0, Math.Min(newMenuCurrentSelection, newer.MenuItems.Count - 1 - max)); ;
9590
}
9691
}
9792
else if (newMenu is RadialMenu rad)

ScaleformUI_Csharp/Menus/Pause Menus/Elements/Columns/Column.cs

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)