Skip to content

Commit e3a2c27

Browse files
committed
Merge branch 'dev' into main
2 parents 57b6931 + 179d632 commit e3a2c27

File tree

117 files changed

+2256
-1171
lines changed

Some content is hidden

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

117 files changed

+2256
-1171
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ riderModule.iml
99
/_ReSharper.Caches/
1010
/.idea
1111
*.user
12-
.vs/
13-
VRCOSCSecrets.cs
12+
.vs/

VRCOSC.Desktop/Program.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ namespace VRCOSC.Desktop;
1010

1111
public static class Program
1212
{
13+
#if DEBUG
14+
private const string base_game_name = @"VRCOSC-Development";
15+
#else
16+
private const string base_game_name = @"VRCOSC";
17+
#endif
18+
1319
public static void Main()
1420
{
1521
initSquirrel();
1622

17-
using GameHost host = Host.GetSuitableDesktopHost(@"VRCOSC");
23+
using GameHost host = Host.GetSuitableDesktopHost(base_game_name);
1824
using osu.Framework.Game game = new VRCOSCGameDesktop();
1925
host.Run(game);
2026
}

VRCOSC.Desktop/VRCOSC.Desktop.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
<ApplicationIcon>game.ico</ApplicationIcon>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Version>0.0.0</Version>
9-
<FileVersion>2023.109.0</FileVersion>
9+
<FileVersion>2023.205.0</FileVersion>
1010
<Title>VRCOSC</Title>
1111
<Authors>VolcanicArts</Authors>
1212
<Company>VolcanicArts</Company>
1313
<Nullable>enable</Nullable>
14-
<AssemblyVersion>2023.109.0</AssemblyVersion>
14+
<AssemblyVersion>2023.205.0</AssemblyVersion>
1515
</PropertyGroup>
1616
<ItemGroup Label="Project References">
1717
<ProjectReference Include="..\VRCOSC.Game\VRCOSC.Game.csproj" />
18+
<ProjectReference Include="..\VRCOSC.Modules\VRCOSC.Modules.csproj" />
1819
</ItemGroup>
1920
<ItemGroup Label="Resources">
2021
<EmbeddedResource Include="game.ico" />

VRCOSC.Desktop/VRCOSCGameDesktop.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
using VRCOSC.Desktop.Updater;
55
using VRCOSC.Game;
66
using VRCOSC.Game.Graphics.Updater;
7+
using VRCOSC.Modules;
78

89
namespace VRCOSC.Desktop;
910

1011
public partial class VRCOSCGameDesktop : VRCOSCGame
1112
{
12-
protected override VRCOSCUpdateManager CreateUpdateManager()
13-
{
14-
return new SquirrelUpdateManager();
15-
}
13+
protected override IVRCOSCSecrets GetSecrets() => new VRCOSCModuleSecrets();
14+
protected override VRCOSCUpdateManager CreateUpdateManager() => new SquirrelUpdateManager();
1615
}

VRCOSC.Game/Graphics/MainContent.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using osu.Framework.Graphics.Containers;
88
using VRCOSC.Game.Graphics.About;
99
using VRCOSC.Game.Graphics.ModuleListing;
10+
using VRCOSC.Game.Graphics.Router;
1011
using VRCOSC.Game.Graphics.Settings;
1112
using VRCOSC.Game.Graphics.TabBar;
1213

@@ -51,6 +52,7 @@ private void load()
5152
{
5253
new ModuleListingScreen(),
5354
new SettingsScreen(),
55+
new RouterScreen(),
5456
new AboutScreen()
5557
}
5658
}

VRCOSC.Game/Graphics/ModuleEditing/Attributes/Text/IntTextAttributeCard.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ protected override void OnTextBoxUpdate(ValueChangedEvent<string> e)
1919
{
2020
UpdateAttribute(0);
2121
TextBox.Current.Value = "0";
22+
return;
2223
}
2324

2425
if (int.TryParse(e.NewValue, out var intValue))

VRCOSC.Game/Graphics/ModuleEditing/ModuleEditingContent.cs

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public sealed partial class ModuleEditingContent : Container
1818
{
1919
private readonly SpriteText titleText;
2020
private readonly SeparatedAttributeFlow settings;
21+
private readonly SeparatedAttributeFlow parameters;
2122
private readonly BasicScrollContainer scrollContainer;
2223
private readonly FillFlowContainer<SeparatedAttributeFlow> separatedAttributeFlowFlow;
2324

@@ -67,7 +68,12 @@ public ModuleEditingContent()
6768
Spacing = new Vector2(0, 5),
6869
Children = new[]
6970
{
70-
settings = new SeparatedAttributeFlow()
71+
settings = new SeparatedAttributeFlow(),
72+
parameters = new SeparatedAttributeFlow
73+
{
74+
Title = "Parameter Names",
75+
SubTitle = "Only edit these if you know what you are doing"
76+
}
7177
}
7278
}
7379
}
@@ -91,26 +97,58 @@ protected override void LoadComplete()
9197

9298
settings.Replace(editingModule.Value.Settings.Values);
9399
settings.Alpha = editingModule.Value.HasSettings ? 1 : 0;
100+
101+
parameters.Replace(editingModule.Value.Parameters.Values);
102+
parameters.Alpha = editingModule.Value.HasParameters ? 1 : 0;
94103
}, true);
95104
}
96105

97-
private sealed partial class SeparatedAttributeFlow : Container
106+
private sealed partial class SeparatedAttributeFlow : FillFlowContainer
98107
{
99-
private readonly AttributeFlow attributeFlow;
108+
public string Title { get; init; } = string.Empty;
109+
public string SubTitle { get; init; } = string.Empty;
110+
111+
private AttributeFlow attributeFlow = null!;
100112

101-
public SeparatedAttributeFlow()
113+
[BackgroundDependencyLoader]
114+
private void load()
102115
{
103116
Anchor = Anchor.TopCentre;
104117
Origin = Anchor.TopCentre;
105118
RelativeSizeAxes = Axes.X;
106119
AutoSizeAxes = Axes.Y;
120+
Spacing = new Vector2(0, 5);
121+
Direction = FillDirection.Vertical;
122+
107123
Children = new Drawable[]
108124
{
109125
new LineSeparator
110126
{
111127
Anchor = Anchor.TopCentre,
112128
Origin = Anchor.TopCentre
113129
},
130+
new SpriteText
131+
{
132+
Anchor = Anchor.TopCentre,
133+
Origin = Anchor.TopCentre,
134+
Font = FrameworkFont.Regular.With(size: 60),
135+
Colour = ThemeManager.Current[ThemeAttribute.Text],
136+
Text = Title,
137+
Alpha = string.IsNullOrEmpty(Title) ? 0 : 1
138+
},
139+
new SpriteText
140+
{
141+
Anchor = Anchor.TopCentre,
142+
Origin = Anchor.TopCentre,
143+
Font = FrameworkFont.Regular.With(size: 25),
144+
Colour = ThemeManager.Current[ThemeAttribute.SubText],
145+
Margin = new MarginPadding
146+
{
147+
Vertical = 10
148+
},
149+
Text = SubTitle,
150+
Alpha = string.IsNullOrEmpty(SubTitle) ? 0 : 1
151+
},
114152
attributeFlow = new AttributeFlow()
115153
};
116154
}

VRCOSC.Game/Graphics/ModuleListing/Listing.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// See the LICENSE file in the repository root for full license text.
33

44
using osu.Framework.Allocation;
5+
using osu.Framework.Bindables;
56
using osu.Framework.Extensions.IEnumerableExtensions;
67
using osu.Framework.Graphics;
78
using osu.Framework.Graphics.Containers;
@@ -17,7 +18,7 @@ public sealed partial class Listing : Container
1718
private GameManager gameManager { get; set; } = null!;
1819

1920
[Resolved]
20-
private VRCOSCGame game { get; set; } = null!;
21+
private Bindable<Module.ModuleType?> typeFilter { get; set; } = null!;
2122

2223
private readonly FillFlowContainer<ModuleCard> moduleCardFlow;
2324

@@ -62,12 +63,12 @@ private void load()
6263

6364
protected override void LoadComplete()
6465
{
65-
game.TypeFilter.BindValueChanged(_ => filter(), true);
66+
typeFilter.BindValueChanged(_ => filter(), true);
6667
}
6768

6869
private void filter()
6970
{
70-
var type = game.TypeFilter.Value;
71+
var type = typeFilter.Value;
7172

7273
moduleCardFlow.ForEach(moduleCard =>
7374
{

VRCOSC.Game/Graphics/ModuleListing/ModuleCard.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ private Colour4 calculateModuleColour()
182182
Module.ModuleType.General => Colour4.White.Darken(0.15f),
183183
Module.ModuleType.Health => Colour4.Red,
184184
Module.ModuleType.Integrations => Colour4.Yellow.Darken(0.25f),
185-
Module.ModuleType.Accessibility => Colour4.FromHex(@"66ccff"),
186185
Module.ModuleType.OpenVR => Colour4.FromHex(@"04144d"),
187186
_ => throw new ArgumentOutOfRangeException()
188187
};

VRCOSC.Game/Graphics/ModuleListing/ModuleInfoPopover.cs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,12 @@ public ModuleInfoPopover()
123123

124124
private sealed partial class ParameterData : Container
125125
{
126-
public string ParameterName { get; init; } = null!;
127-
public string Description { get; init; } = null!;
128-
public string Type { get; init; } = null!;
129-
public bool Outgoing { get; init; }
130-
public bool Incoming { get; init; }
126+
public required string ParameterName;
127+
public required string DisplayName;
128+
public required string Description;
129+
public required string Type;
130+
public required bool Outgoing;
131+
public required bool Incoming;
131132

132133
public ParameterData()
133134
{
@@ -142,11 +143,11 @@ public ParameterData()
142143
[BackgroundDependencyLoader]
143144
private void load()
144145
{
145-
var name = $"Name: {ParameterName}";
146+
var metadata = $"{DisplayName} - {Description}";
147+
var name = $"Parameter Name: {ParameterName}";
146148
var type = $"Type: {Type}";
147149
var outgoing = $"Writes To VRC?: {Outgoing}";
148150
var incoming = $"Reads From VRC?: {Incoming}";
149-
var description = $"Description: {Description}";
150151

151152
Children = new Drawable[]
152153
{
@@ -167,7 +168,7 @@ private void load()
167168
{
168169
RelativeSizeAxes = Axes.X,
169170
AutoSizeAxes = Axes.Y,
170-
Text = $"{name}\n{type}\n{outgoing}\n{incoming}\n{description}"
171+
Text = $"{metadata}\n\n{name}\n{type}\n{outgoing}\n{incoming}"
171172
}
172173
}
173174
}
@@ -200,8 +201,9 @@ public override void Show()
200201
{
201202
parameters.Add(new ParameterData
202203
{
203-
ParameterName = parameter.Name,
204-
Description = parameter.Description,
204+
ParameterName = (string)parameter.Attribute.Value,
205+
DisplayName = parameter.Metadata.DisplayName,
206+
Description = parameter.Metadata.Description,
205207
Type = parameter.ExpectedType.ToReadableName(),
206208
Outgoing = parameter.Mode.HasFlagFast(ParameterMode.Write),
207209
Incoming = parameter.Mode.HasFlagFast(ParameterMode.Read)

VRCOSC.Game/Graphics/ModuleListing/TypeFilter.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System;
55
using osu.Framework.Allocation;
6+
using osu.Framework.Bindables;
67
using osu.Framework.Graphics;
78
using osu.Framework.Graphics.Containers;
89
using VRCOSC.Game.Graphics.UI;
@@ -13,7 +14,7 @@ namespace VRCOSC.Game.Graphics.ModuleListing;
1314
public sealed partial class TypeFilter : Container
1415
{
1516
[Resolved]
16-
private VRCOSCGame game { get; set; } = null!;
17+
private Bindable<Module.ModuleType?> typeFilter { get; set; } = null!;
1718

1819
private readonly VRCOSCDropdown<Group> dropdown;
1920

@@ -35,16 +36,16 @@ protected override void LoadComplete()
3536
{
3637
base.LoadComplete();
3738

38-
dropdown.Current.BindValueChanged(group => game.TypeFilter.Value = groupToType(group.NewValue), true);
39+
dropdown.Current.BindValueChanged(group => typeFilter.Value = groupToType(group.NewValue), true);
3940
}
4041

4142
private enum Group
4243
{
4344
All = -1,
44-
General = 0,
45-
Health = 1,
45+
Health = 0,
46+
OpenVR = 1,
4647
Integrations = 2,
47-
OpenVR = 4
48+
General = 3,
4849
}
4950

5051
private static Module.ModuleType? groupToType(Group group) => group == Group.All ? null : (Module.ModuleType)(int)group;

VRCOSC.Game/Graphics/ModuleRun/ParameterContainer.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using osu.Framework.Graphics.Shapes;
88
using VRCOSC.Game.Graphics.Themes;
99
using VRCOSC.Game.Modules;
10-
using VRCOSC.OSC.VRChat;
10+
using VRCOSC.Game.OSC.VRChat;
1111

1212
namespace VRCOSC.Game.Graphics.ModuleRun;
1313

@@ -65,8 +65,8 @@ public ParameterContainer()
6565

6666
protected override void LoadComplete()
6767
{
68-
gameManager.OscClient.OnParameterSent += onParameterSent;
69-
gameManager.OscClient.OnParameterReceived += onParameterReceived;
68+
gameManager.VRChatOscClient.OnParameterSent += onParameterSent;
69+
gameManager.VRChatOscClient.OnParameterReceived += onParameterReceived;
7070
}
7171

7272
private void onParameterSent(VRChatOscData data)
@@ -132,7 +132,7 @@ public void ClearContent()
132132
protected override void Dispose(bool isDisposing)
133133
{
134134
base.Dispose(isDisposing);
135-
gameManager.OscClient.OnParameterSent -= onParameterSent;
136-
gameManager.OscClient.OnParameterReceived -= onParameterReceived;
135+
gameManager.VRChatOscClient.OnParameterSent -= onParameterSent;
136+
gameManager.VRChatOscClient.OnParameterReceived -= onParameterReceived;
137137
}
138138
}

0 commit comments

Comments
 (0)