Fix compile from removal of SFML.

This commit is contained in:
PJB3005
2017-10-20 20:55:59 +02:00
parent 60f975f0dc
commit de4583d14b
2 changed files with 7 additions and 21 deletions

View File

@@ -75,18 +75,6 @@
<Project>{59250baf-0000-0000-0000-000000000000}</Project>
<Name>Lidgren.Network</Name>
</ProjectReference>
<ProjectReference Include="..\engine\SFML\src\Graphics\sfml-graphics.csproj">
<Project>{46786269-57b9-48e7-aa4f-8f4d84609fe6}</Project>
<Name>sfml-graphics</Name>
</ProjectReference>
<ProjectReference Include="..\engine\SFML\src\System\sfml-system.csproj">
<Project>{31d24303-f6a9-4d53-bb03-a73edcb3186d}</Project>
<Name>sfml-system</Name>
</ProjectReference>
<ProjectReference Include="..\engine\SFML\src\Window\sfml-window.csproj">
<Project>{d17de83d-a592-461f-8af2-53f9e22e1d0f}</Project>
<Name>sfml-window</Name>
</ProjectReference>
<ProjectReference Include="..\engine\SS14.Client.Graphics\SS14.Client.Graphics.csproj">
<Project>{302b877e-0000-0000-0000-000000000000}</Project>
<Name>SS14.Client.Graphics</Name>

View File

@@ -1,10 +1,8 @@
using Content.Client.Interfaces.GameObjects;
using OpenTK.Graphics;
using SFML.Graphics;
using SFML.Window;
using SS14.Client.GameObjects;
using SS14.Client.Graphics;
using SS14.Client.Graphics.Utility;
using SS14.Client.Graphics.Input;
using SS14.Client.Graphics.Sprites;
using SS14.Client.Interfaces.Player;
using SS14.Client.Interfaces.Resource;
using SS14.Client.Interfaces.UserInterface;
@@ -18,7 +16,7 @@ namespace Content.Client.UserInterface
{
public class HandsGui : GuiComponent
{
private readonly Color4 _inactiveColor = new Color4(90, 90, 90, 255);
private readonly Color _inactiveColor = new Color(90, 90, 90);
private readonly IPlayerManager _playerManager = IoCManager.Resolve<IPlayerManager>();
private readonly IUserInterfaceManager _userInterfaceManager = IoCManager.Resolve<IUserInterfaceManager>();
@@ -46,7 +44,7 @@ namespace Content.Client.UserInterface
public override void Update(float frameTime)
{
var slotBounds = handSlot.GetLocalBounds();
var slotBounds = handSlot.LocalBounds;
var width = (int)((slotBounds.Width * 2) + spacing);
var height = (int)slotBounds.Height;
Position = new Vector2i((int)(CluwneLib.Window.Viewport.Width - width) / 2, (int)CluwneLib.Window.Viewport.Height - height - 10);
@@ -74,13 +72,13 @@ namespace Content.Client.UserInterface
handSlot.SetTransformToRect(leftActive ? handL : handR);
handSlot.Draw();
handSlot.Color = _inactiveColor.Convert();
handSlot.Color = _inactiveColor;
handSlot.SetTransformToRect(leftActive ? handR : handL);
handSlot.Draw();
if (LeftHand.Entity != null && LeftHand.HeldSprite != null)
{
var bounds = LeftHand.HeldSprite.GetLocalBounds();
var bounds = LeftHand.HeldSprite.LocalBounds;
LeftHand.HeldSprite.SetTransformToRect(
Box2i.FromDimensions(handL.Left + (int)(handL.Width / 2f - bounds.Width / 2f),
handL.Top + (int)(handL.Height / 2f - bounds.Height / 2f),
@@ -90,7 +88,7 @@ namespace Content.Client.UserInterface
if (RightHand.Entity != null && RightHand.HeldSprite != null)
{
var bounds = RightHand.HeldSprite.GetLocalBounds();
var bounds = RightHand.HeldSprite.LocalBounds;
RightHand.HeldSprite.SetTransformToRect(
Box2i.FromDimensions(handR.Left + (int)(handR.Width / 2f - bounds.Width / 2f),
handR.Top + (int)(handR.Height / 2f - bounds.Height / 2f),