Skip to content

Commit aaf8bd6

Browse files
authored
Include AlphaToApply in icon drawing (#2474)
1 parent df93037 commit aaf8bd6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

OpenDreamClient/Rendering/DreamViewOverlay.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,11 @@ public void DrawIcon(DrawingHandleWorld handle, Vector2i renderTargetSize, Rende
471471
handle.UseShader(GetBlendAndColorShader(iconMetaData, ignoreColor: true));
472472

473473
handle.SetTransform(CalculateDrawingMatrix(iconMetaData.TransformToApply, pixelPosition, frame.Size, renderTargetSize));
474-
handle.DrawTextureRect(frame, Box2.FromDimensions(Vector2.Zero, frame.Size), iconMetaData.ColorToApply);
474+
475+
Color colorToApply = iconMetaData.ColorToApply;
476+
colorToApply.A *= iconMetaData.AlphaToApply;
477+
478+
handle.DrawTextureRect(frame, Box2.FromDimensions(Vector2.Zero, frame.Size), colorToApply);
475479

476480
if (iconMetaData.Particles is not null) {
477481
handle.UseShader(GetBlendAndColorShader(iconMetaData, ignoreColor: true));

0 commit comments

Comments
 (0)