Skip to content

Commit

Permalink
Viktor/default naming style (#5)
Browse files Browse the repository at this point in the history
Using the default coding style of Rider
  • Loading branch information
viktor-ferenczi authored Sep 26, 2021
1 parent 4fd291f commit 0a9bea8
Show file tree
Hide file tree
Showing 10 changed files with 165 additions and 935 deletions.
760 changes: 0 additions & 760 deletions .editorconfig

This file was deleted.

208 changes: 104 additions & 104 deletions EnhancedUI/Content/Terminal.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,120 +10,120 @@

<div class="full">

<h1>TERMINAL</h1>
<h1>TERMINAL</h1>

Window inner size: <p id="window-size"></p> pixels
Window inner size: <p id="window-size"></p> pixels

<p>
<p>
<textarea cols="30" rows="5">
Hello 1
Hello 2
</textarea>
</p>
</p>

<p>
<button type="button">Click Me!</button>
</p>
<p>
<button type="button">Click Me!</button>
</p>

<p>
<a href="https://google.com">Google</a>
</p>
<p>
<a href="https://google.com">Google</a>
</p>

<ul>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
</ul>
<ul>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
<li>X</li>
</ul>

<p>END</p>
<p>END</p>

</div>

Expand Down
2 changes: 1 addition & 1 deletion EnhancedUI/Content/common.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
window.onload = function() {
window.onload = function () {
document.getElementById("window-size").innerText = `${window.innerWidth}x${window.innerHeight}`;
}
20 changes: 10 additions & 10 deletions EnhancedUI/EnhancedUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

<ItemGroup>
<Reference Include="EmptyKeys.UserInterface, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>$(SolutionDir)GameBinaries\EmptyKeys.UserInterface.dll</HintPath>
<Private>False</Private>
<HintPath>$(SolutionDir)GameBinaries\EmptyKeys.UserInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sandbox.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down Expand Up @@ -44,8 +44,8 @@
<Private>False</Private>
</Reference>
<Reference Include="SharpDX.DXGI, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1">
<HintPath>$(SolutionDir)GameBinaries\SharpDX.DXGI.dll</HintPath>
<Private>False</Private>
<HintPath>$(SolutionDir)GameBinaries\SharpDX.DXGI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SpaceEngineers.Game, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -57,7 +57,7 @@
<HintPath>$(SolutionDir)GameBinaries\SpaceEngineers.ObjectBuilders.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web"/>
<Reference Include="VRage, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(SolutionDir)GameBinaries\VRage.dll</HintPath>
Expand Down Expand Up @@ -119,13 +119,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CefSharp.Common" Version="93.1.140" />
<PackageReference Include="CefSharp.OffScreen" Version="93.1.140" />
<PackageReference Include="Lib.Harmony" Version="2.1.1" />
<PackageReference Include="CefSharp.Common" Version="93.1.140"/>
<PackageReference Include="CefSharp.OffScreen" Version="93.1.140"/>
<PackageReference Include="Lib.Harmony" Version="2.1.1"/>
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy /s /e /r /y $(TargetDir)* $(SolutionDir)GameBinaries\Plugins\Local\EnhancedUI" />
<Exec Command="start steam://rungameid/244850" />
<Exec Command="xcopy /s /e /r /y $(TargetDir)* $(SolutionDir)GameBinaries\Plugins\Local\EnhancedUI"/>
<Exec Command="start steam://rungameid/244850"/>
</Target>
</Project>
8 changes: 4 additions & 4 deletions EnhancedUI/Gui/BatchDataPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace EnhancedUI.Gui
{
public class BatchDataPlayer : IVideoPlayer
{
private static readonly Func<Device> _deviceInstance =
private static readonly Func<Device> DeviceInstance =
AccessTools.MethodDelegate<Func<Device>>(AccessTools.PropertyGetter(
Type.GetType("VRage.Platform.Windows.Render.MyPlatformRender, VRage.Platform.Windows", true),
"DeviceInstance"));
Expand Down Expand Up @@ -46,10 +46,10 @@ public void Init(string filename)
Count = 1,
Quality = 0
},
OptionFlags = ResourceOptionFlags.None,
OptionFlags = ResourceOptionFlags.None
};

texture = new Texture2D(_deviceInstance(), texture2DDescription)
texture = new Texture2D(DeviceInstance(), texture2DDescription)
{
DebugName = "BatchDataPlayer.Texture"
};
Expand All @@ -65,7 +65,7 @@ public void Init(string filename)
}
};

shaderResourceView = new ShaderResourceView(_deviceInstance(), texture, shaderResourceViewDescription)
shaderResourceView = new ShaderResourceView(DeviceInstance(), texture, shaderResourceViewDescription)
{
DebugName = texture.DebugName
};
Expand Down
17 changes: 12 additions & 5 deletions EnhancedUI/Gui/Chromium.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ namespace EnhancedUI.Gui
{
public class Chromium : IDisposable
{
private byte[] videoData;
private readonly byte[] videoData;

public event Action? Ready;

public readonly ChromiumWebBrowser Browser;

public Chromium(Vector2I size)
{
videoData = new byte[size.X * size.Y * 4];
Expand Down Expand Up @@ -51,7 +52,7 @@ public void Draw()

private void BrowserOnPaint(object sender, OnPaintEventArgs e)
{
Marshal.Copy(e.BufferHandle, this.videoData, 0, e.Width * e.Height * 4);
Marshal.Copy(e.BufferHandle, videoData, 0, e.Width * e.Height * 4);
e.Handled = true;
}

Expand All @@ -71,11 +72,17 @@ bool ILifeSpanHandler.OnBeforePopup(IWebBrowser browserControl, IBrowser browser
}

bool ILifeSpanHandler.DoClose(IWebBrowser browserControl, IBrowser browser)
{ return false; }
{
return false;
}

void ILifeSpanHandler.OnBeforeClose(IWebBrowser browserControl, IBrowser browser) { }
void ILifeSpanHandler.OnBeforeClose(IWebBrowser browserControl, IBrowser browser)
{
}

void ILifeSpanHandler.OnAfterCreated(IWebBrowser browserControl, IBrowser browser) { }
void ILifeSpanHandler.OnAfterCreated(IWebBrowser browserControl, IBrowser browser)
{
}
}
}
}
Loading

0 comments on commit 0a9bea8

Please sign in to comment.