Skip to content

Commit

Permalink
Merge pull request #37 from kareem613/master
Browse files Browse the repository at this point in the history
collapses overlay submodules into main repo
Closes #36
  • Loading branch information
MerlinCooper authored Jun 9, 2020
2 parents c79b2b5 + 75ddd10 commit 99e114e
Show file tree
Hide file tree
Showing 49 changed files with 2,182 additions and 72 deletions.
9 changes: 0 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
[submodule "SuperMFLib"]
path = SuperMFLib
url = git://github.com/vipoo/SuperMFLib.git
[submodule "plugins/iRacingDirector.Plugin.StandardOverlays"]
path = plugins/iRacingDirector.Plugin.StandardOverlays
url = git://github.com/vipoo/iRacingDirector.Plugin.StandardOverlays.git
[submodule "GitHubReleases"]
path = GitHubReleases
url = git://github.com/vipoo/GitHubReleases.git
[submodule "plugins/iRacingDirector.Plugin.Support"]
path = plugins/iRacingDirector.Plugin.Support
url = git://github.com/vipoo/iRacingDirector.Plugin.Support.git
[submodule "plugins/JockeOverlays"]
path = plugins/JockeOverlays
url = git://github.com/vipoo/JockeOverlays.git
[submodule "iRacingSDK.Net"]
path = iRacingSDK.Net
url = https://github.com/MerlinCooper/iRacingSDK.Net.git
6 changes: 0 additions & 6 deletions NuGet.config

This file was deleted.

35 changes: 20 additions & 15 deletions iRacingReplayOverlay.net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingSDK.Net.Tests", "iRa
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenerateDataModels", "iRacingSDK.Net\GenerateDataModels\GenerateDataModels.csproj", "{90126FE7-C20E-43EC-93AF-77AA5268E860}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2BCCAE92-016E-41D6-9CB5-4FC83AC190BE}"
ProjectSection(SolutionItems) = preProject
NuGet.config = NuGet.config
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaFoundation", "SuperMFLib\mfnet\mflib\src\MediaFoundation.csproj", "{B78C0F3B-071A-4FD2-829D-7A67E0F7BD1C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingDirector.Plugin.StandardOverlays", "plugins\iRacingDirector.Plugin.StandardOverlays\iRacingDirector.Plugin.StandardOverlays.csproj", "{5916B84C-0264-4102-9CCC-28006D84E4FA}"
Expand All @@ -36,14 +31,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingDirector.Plugin.Stan
{0E523573-2972-4DC0-AECB-C4CF746854BB} = {0E523573-2972-4DC0-AECB-C4CF746854BB}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingDirector.Plugin.Support", "plugins\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support.csproj", "{CEC2BB31-324D-41E3-83C8-A5C35C63129B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingDirector.Plugin.Tester", "plugins\iRacingDirector.Plugin.Tester\iRacingDirector.Plugin.Tester.csproj", "{96FA1C80-396C-4792-9E8B-C7CBFC25833D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JockeOverlays", "plugins\JockeOverlays\JockeOverlays.csproj", "{F49DAE6F-321E-45A8-B9B4-23475A3F6080}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingReplayDirector", "iRacingReplayDirector.csproj", "{F82A3871-1554-4964-BF81-59854E9C4BB3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoOverlay", "plugins\NoOverlay\NoOverlay.csproj", "{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingDirector.Plugin.Support", "plugins\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support.csproj", "{CEC2BB31-324D-41E3-83C8-A5C35C63129B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -127,14 +124,6 @@ Global
{5916B84C-0264-4102-9CCC-28006D84E4FA}.Release|Any CPU.Build.0 = Release|Any CPU
{5916B84C-0264-4102-9CCC-28006D84E4FA}.Release|x64.ActiveCfg = Release|Any CPU
{5916B84C-0264-4102-9CCC-28006D84E4FA}.Release|x64.Build.0 = Release|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Debug|x64.ActiveCfg = Debug|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Debug|x64.Build.0 = Debug|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Release|Any CPU.Build.0 = Release|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Release|x64.ActiveCfg = Release|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Release|x64.Build.0 = Release|Any CPU
{96FA1C80-396C-4792-9E8B-C7CBFC25833D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96FA1C80-396C-4792-9E8B-C7CBFC25833D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96FA1C80-396C-4792-9E8B-C7CBFC25833D}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -156,6 +145,22 @@ Global
{F82A3871-1554-4964-BF81-59854E9C4BB3}.Release|Any CPU.ActiveCfg = Release|x64
{F82A3871-1554-4964-BF81-59854E9C4BB3}.Release|x64.ActiveCfg = Release|x64
{F82A3871-1554-4964-BF81-59854E9C4BB3}.Release|x64.Build.0 = Release|x64
{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|x64.ActiveCfg = Debug|Any CPU
{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|x64.Build.0 = Debug|Any CPU
{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|Any CPU.Build.0 = Release|Any CPU
{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|x64.ActiveCfg = Release|Any CPU
{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|x64.Build.0 = Release|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Debug|x64.ActiveCfg = Debug|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Debug|x64.Build.0 = Debug|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Release|Any CPU.Build.0 = Release|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Release|x64.ActiveCfg = Release|Any CPU
{CEC2BB31-324D-41E3-83C8-A5C35C63129B}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 0 additions & 1 deletion plugins/JockeOverlays
Submodule JockeOverlays deleted from 1ca876
118 changes: 118 additions & 0 deletions plugins/JockeOverlays/JockeOverlays.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F49DAE6F-321E-45A8-B9B4-23475A3F6080}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>JockeOverlays</RootNamespace>
<AssemblyName>JockeOverlays</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="Exists('.\packages')">
<PackagesFolder>.\packages\</PackagesFolder>
</PropertyGroup>
<PropertyGroup Condition="Exists('.\..\packages')">
<PackagesFolder>.\..\packages\</PackagesFolder>
</PropertyGroup>
<PropertyGroup Condition="Exists('.\..\..\packages')">
<PackagesFolder>.\..\..\packages\</PackagesFolder>
</PropertyGroup>
<ItemGroup Condition="!Exists('..\..\iRacingSDK.Net\iRacingSDK.csproj')">
<Reference Include="iRacingSDK, Version=1.0.0.36, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(PackagesFolder)iRacingSDK.1.0.0.36\lib\net40-client\iRacingSDK.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="YamlDotNet, Version=2.0.1.20271, Culture=neutral, PublicKeyToken=2b53052c5884d7a1, processorArchitecture=MSIL">
<HintPath>$(PackagesFolder)YamlDotNet.3.1.1\lib\net35\YamlDotNet.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup Condition="Exists('..\..\iRacingSDK.Net\iRacingSDK.csproj')">
<ProjectReference Include="..\..\iRacingSDK.Net\iRacingSDK.csproj">
<Project>{5422ae20-f220-4be1-9e61-5296981abb5c}</Project>
<Name>iRacingSDK</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<SupportProject Condition="Exists('..\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support.csproj')">..\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support.csproj</SupportProject>
<SupportProject Condition="Exists('..\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support.csproj')">..\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support.csproj</SupportProject>
</PropertyGroup>
<ItemGroup Condition="'$(SupportProject)' != ''">
<ProjectReference Include="$(SupportProject)">
<Project>{cec2bb31-324d-41e3-83c8-a5c35c63129b}</Project>
<Name>iRacingDirector.Plugin.Support</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup Condition="'$(SupportProject)' == ''">
<Reference Include="iRacingDirector.Plugin.Support, Version=1.0.0.48, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(PackagesFolder)\iRacingDirector.Plugin.Support.1.0.0.48\lib\net40-client\iRacingDirector.Plugin.Support.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="MyPlugin.FastestLaps.cs" />
<Compile Include="MyPlugin.FlashCardOutro.cs" />
<Compile Include="MyPlugin.Extensions.cs" />
<Compile Include="MyPlugin.RaceMessages.cs" />
<Compile Include="MyPlugin.DriverCamera.cs" />
<Compile Include="MyPlugin.FlashCardIntro.cs" />
<Compile Include="MyPlugin.FlashCardHeading.cs" />
<Compile Include="MyPlugin.Leaderboard.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Styles.cs" />
<Compile Include="MyPlugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<PostBuildEvent>
mkdir $(SolutionDir)\bin\x64\Debug\plugins\JockeOverlays
copy $(TargetDir)\JockeOverlays.* $(SolutionDir)\bin\x64\Debug\plugins\JockeOverlays
copy $(TargetDir)\iRacingDirector.Plugin.Support.* $(SolutionDir)\bin\x64\Debug\plugins\JockeOverlays
</PostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<PreBuildEvent>rmdir /S /Q $(SolutionDir)\bin\x64\Debug\plugins\JockeOverlays</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
48 changes: 48 additions & 0 deletions plugins/JockeOverlays/MyPlugin.DriverCamera.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using iRacingDirector.Plugin;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace JockeOverlays
{
public partial class MyPlugin
{
public Driver CamDriver;

void DrawCurrentDriverRow()
{
var position = CamDriver.Position != null ? CamDriver.Position.Value.ToString() : "";
var indicator = CamDriver.Position != null ? CamDriver.Position.Value.Ordinal() : "";

var offset = 5;

Graphics.InRectangle(1920 / 2 - 440 / 2, 980, 70, 40)
.WithBrush(Styles.YellowBrush)
.WithPen(Styles.BlackPen)
.DrawRectangleWithBorder()
.WithFontSizeOf(24)
.WithBrush(Styles.BlackBrush)
.WithStringFormat(StringAlignment.Near)
.Center(cg => cg
.DrawText(position, topOffset: offset)
.AfterText(position)
.MoveRight(3)
.WithFont(Settings.FontName, 18, FontStyle.Bold)
.DrawText(indicator, topOffset: offset)
)

.ToRight(width: 70)
.WithLinearGradientBrush(Styles.White, Styles.WhiteSmoke, LinearGradientMode.BackwardDiagonal)
.DrawRectangleWithBorder()
.WithStringFormat(StringAlignment.Center)
.WithBrush(Styles.BlackBrush)
.DrawText(CamDriver.CarNumber, topOffset: offset)

.ToRight(width: 300)
.WithLinearGradientBrush(Styles.White, Styles.WhiteSmoke, LinearGradientMode.BackwardDiagonal)
.DrawRectangleWithBorder()
.WithStringFormat(StringAlignment.Center)
.WithBrush(Styles.BlackBrush)
.DrawText(CamDriver.UserName, topOffset: offset);
}
}
}
66 changes: 66 additions & 0 deletions plugins/JockeOverlays/MyPlugin.Extensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
using iRacingDirector.Plugin;
using System;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace JockeOverlays
{
public static class MyPluginExtensions
{
public static string FormattedForLeaderboard(this string shortName)
{
var length = Math.Min(4, shortName.Length);
return shortName.Substring(0, length).ToUpper();
}

public static GraphicRect DrawBlackBackground(this GraphicRect rr)
{
return rr
.WithBrush(Styles.TransparentLightBlack)
.WithPen(Styles.WhitePen)
.DrawRectangleWithoutBorder();
}

public static GraphicRect DrawGrayBackground(this GraphicRect rr)
{
return rr
.WithBrush(Styles.TransparentLightGray)
.WithPen(Styles.WhitePen)
.DrawRectangleWithoutBorder();
}

public static GraphicRect DrawWhiteText(this GraphicRect rr, string text, StringAlignment alignment)
{
rr.WithBrush(Styles.WhiteBrush)
.WithStringFormat(alignment)
.DrawText(text);

return rr;
}

public static GraphicRect WithFontSizeOf(this GraphicRect rr, int fontSize)
{
return rr
.WithFont(Settings.FontName, fontSize, FontStyle.Regular);
}

public static GraphicRect DrawWhiteGradiantBox(this GraphicRect rr)
{
return rr
.WithLinearGradientBrush(Color.DarkGray, Color.White, LinearGradientMode.Vertical)
.WithPen(Styles.BlackPen)
.DrawRectangleWithBorder()
.WithBrush(Styles.BlackBrush);
}

public static GraphicRect DrawRedGradiantBox(this GraphicRect rr)
{
return rr
.WithHeight(rr.Rectangle.Height + 3)
.MoveUp(3)
.WithLinearGradientBrush(Styles.RedBannerDark, Styles.RedBannerLight, LinearGradientMode.Vertical)
.DrawRoundRectangle(5)
.WithBrush(Styles.WhiteBrush);
}
}
}
38 changes: 38 additions & 0 deletions plugins/JockeOverlays/MyPlugin.FastestLaps.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using iRacingDirector.Plugin;
using System;
using System.Drawing;

namespace JockeOverlays
{
public partial class MyPlugin
{
public FastLap FastLap;

void DrawFastestLap()
{
if (FastLap == null)
return;

const int left = 1920 - 80 - 450;
const int top = 900;

Graphics.InRectangle(left, top + 34, 400, 34)
.DrawRedGradiantBox();

Graphics.InRectangle(left, top + 34, 250, 34)
.WithBrush(Styles.WhiteBrush)
.WithFontSizeOf(19)
.WithStringFormat(StringAlignment.Center)
.DrawText(FastLap.Driver.UserName, topOffset: 5)
.ToRight(width: 150)
.DrawText(TimeSpan.FromSeconds(FastLap.Time).ToString(@"mm\:ss\.fff"), topOffset: 5);

Graphics.InRectangle(left, top, 400, 34)
.DrawWhiteGradiantBox()
.WithBrush(Styles.BlackBrush)
.WithFontSizeOf(18)
.WithStringFormat(StringAlignment.Center)
.DrawText("New Fast Lap", topOffset: 5);
}
}
}
Loading

0 comments on commit 99e114e

Please sign in to comment.