forked from vipoo/iRacingReplayOverlay.net
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from kareem613/master
collapses overlay submodules into main repo Closes #36
- Loading branch information
Showing
49 changed files
with
2,182 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule JockeOverlays
deleted from
1ca876
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
Oops, something went wrong.