Update content repo for CLYDE 2.0.

This commit is contained in:
Pieter-Jan Briers
2019-07-06 19:20:20 +02:00
parent c4523a956d
commit 4221fecff6
6 changed files with 12 additions and 12 deletions

View File

@@ -24,7 +24,7 @@ namespace Content.Client.Graphics.Overlays
Shader = _prototypeManager.Index<ShaderPrototype>("circlemask").Instance(); Shader = _prototypeManager.Index<ShaderPrototype>("circlemask").Instance();
} }
protected override void Draw(DrawingHandle handle) protected override void Draw(DrawingHandleBase handle)
{ {
var worldHandle = (DrawingHandleWorld)handle; var worldHandle = (DrawingHandleWorld)handle;
var viewport = _eyeManager.GetWorldViewport(); var viewport = _eyeManager.GetWorldViewport();

View File

@@ -23,7 +23,7 @@ namespace Content.Client.Graphics.Overlays
Shader = _prototypeManager.Index<ShaderPrototype>("gradientcirclemask").Instance(); Shader = _prototypeManager.Index<ShaderPrototype>("gradientcirclemask").Instance();
} }
protected override void Draw(DrawingHandle handle) protected override void Draw(DrawingHandleBase handle)
{ {
var worldHandle = (DrawingHandleWorld)handle; var worldHandle = (DrawingHandleWorld)handle;
var viewport = _eyeManager.GetWorldViewport(); var viewport = _eyeManager.GetWorldViewport();

View File

@@ -43,23 +43,25 @@ namespace Content.Client.Parallax
} }
} }
protected override void Draw(DrawingHandle handle) protected override void Draw(DrawingHandleBase handle)
{ {
if (_parallaxTexture == null) if (_parallaxTexture == null)
{ {
return; return;
} }
var screenHandle = (DrawingHandleScreen) handle;
var (sizeX, sizeY) = _parallaxTexture.Size; var (sizeX, sizeY) = _parallaxTexture.Size;
var (posX, posY) = _eyeManager.ScreenToWorld(Vector2.Zero).ToWorld(_mapManager).Position; var (posX, posY) = _eyeManager.ScreenToWorld(Vector2.Zero).ToWorld(_mapManager).Position;
var (ox, oy) = (Vector2i) new Vector2(-posX / Slowness, posY / Slowness); var (ox, oy) = (Vector2i) new Vector2(-posX / Slowness, posY / Slowness);
ox = MathHelper.Mod(ox, sizeX); ox = MathHelper.Mod(ox, sizeX);
oy = MathHelper.Mod(oy, sizeY); oy = MathHelper.Mod(oy, sizeY);
handle.DrawTexture(_parallaxTexture, new Vector2(ox, oy)); screenHandle.DrawTexture(_parallaxTexture, new Vector2(ox, oy));
handle.DrawTexture(_parallaxTexture, new Vector2(ox - sizeX, oy)); screenHandle.DrawTexture(_parallaxTexture, new Vector2(ox - sizeX, oy));
handle.DrawTexture(_parallaxTexture, new Vector2(ox, oy - sizeY)); screenHandle.DrawTexture(_parallaxTexture, new Vector2(ox, oy - sizeY));
handle.DrawTexture(_parallaxTexture, new Vector2(ox - sizeX, oy - sizeY)); screenHandle.DrawTexture(_parallaxTexture, new Vector2(ox - sizeX, oy - sizeY));
} }
} }
} }

View File

@@ -90,8 +90,8 @@ namespace Content.Client.UserInterface
var handL = new UIBox2(_handL.TopLeft * UIScale, _handL.BottomRight * UIScale); var handL = new UIBox2(_handL.TopLeft * UIScale, _handL.BottomRight * UIScale);
var handR = new UIBox2(_handR.TopLeft * UIScale, _handR.BottomRight * UIScale); var handR = new UIBox2(_handR.TopLeft * UIScale, _handR.BottomRight * UIScale);
handle.DrawStyleBox(handBox, leftActive ? handL : handR); handBox.Draw(handle, leftActive ? handL : handR);
handle.DrawStyleBox(inactiveHandBox, leftActive ? handR : handL); inactiveHandBox.Draw(handle, leftActive ? handR : handL);
} }
/// <summary> /// <summary>

View File

@@ -9,8 +9,6 @@
- type: ConstructionGhost - type: ConstructionGhost
- type: BoundingBox - type: BoundingBox
- type: Clickable - type: Clickable
baseshader: unshaded
selectionshader: selection_outline_unshaded
- type: entity - type: entity
name: somebody-messed-up frame name: somebody-messed-up frame