From f5032a02ce4ebd05c2e57929226de2980f39cbe0 Mon Sep 17 00:00:00 2001 From: tobspr Date: Mon, 7 Dec 2020 12:57:49 +0100 Subject: [PATCH] Add layersupport for waypoints --- res/ui/icons/waypoint_wires.png | Bin 0 -> 1312 bytes res_raw/sprites/misc/waypoint_wires.png | Bin 0 -> 1312 bytes src/css/ingame_hud/waypoints.scss | 6 ++++++ src/js/changelog.js | 5 ++++- src/js/game/hud/parts/waypoints.js | 19 +++++++++++++------ 5 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 res/ui/icons/waypoint_wires.png create mode 100644 res_raw/sprites/misc/waypoint_wires.png diff --git a/res/ui/icons/waypoint_wires.png b/res/ui/icons/waypoint_wires.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d3fd2833c8d60a235b1d43989a836ba2211745 GIT binary patch literal 1312 zcmV+*1>gFKP)rKiOA4h{QB$;TG=dAG zs8|&jf)quR(o$WBby2L{L~*Br6$OJk3st0GmK8yKC89M&7nP=Hn_5kpKw?uHdR*K| z7^ZXQ_0OI8o&STgxzBUY+w}ADjbt%aJkLA?xpnRQH zmm1~pyrXirib#K&3}qQ$v%|7)N|U%O12hfwESW^46Sz8S{s!_T;W`nyB__=YRhB|KT$wR%9A5#)W73QR z!>anX|LYGEZLuT3-9TFoOW`vybu}W})96wM@cx@mS*-OBum^ZYJ?*Q+(hwNJ{O^NY z1nyGRv7GCj1J>qTroZe|^kT+!Sa;g%$Q#^msjpF)0#>Eeg&mf{MuEB`1FXYLM0qxT z9@v>ympU+L=@|!9buoEIN{*`j0c;kLdw@G~C~^k)SXIxZ%_x}PS(poXtE&FksAkQM z0B3>jK==hFzfm- zwic;KS=2BNP#7ES{pD%`TKQw$TaXK&=KjGhPbM$frCxZfIJPcJFx+LhS*KD zc8CuGs}mc*GeU>gjjCdZF#?;q%adRfB2otifCqs-%)w|6ZVx%ruoAc`VcJiDN0&Bu z6B*$DfQVcRYyoZuo+J8vV~?u70TnWU9}(#V-UsftB$)&HRQ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XJ%0s`J7|1A@UNx55!LkX1zaAO=2o^Cb^%`kD?*Ye@Cr1~hDI)U3!Z*pA7%r` z#z*R1{#d#u*9B}R{vktOqe@25E+WGj^R5JL1~wA^2I3cBmp@ z!aVblxV3`+aI_t`A;zK)0k6fR$;uRPZ^pcfz+}`{wz0epQ1gl^@?vCy*I13Ps3ly? zY!!FdN?HT_>_iL0xWlroq%we-cLTN!#zr~dsN6`h41p(sw=tWHc`yn*gE_P;oc{p% WOnDQHqQ9&F0000} @@ -192,7 +196,10 @@ export class HUDWaypoints extends BaseHUDPart { const waypoint = this.waypoints[i]; const label = this.getWaypointLabel(waypoint); - const element = makeDiv(this.waypointsListElement, null, ["waypoint"]); + const element = makeDiv(this.waypointsListElement, null, [ + "waypoint", + "layer--" + waypoint.layer, + ]); if (ShapeDefinition.isValidShortKey(label)) { const canvas = this.getWaypointCanvas(waypoint); @@ -544,7 +551,7 @@ export class HUDWaypoints extends BaseHUDPart { const iconOpacity = 1 - this.currentCompassOpacity; if (iconOpacity > 0.01) { context.globalAlpha = iconOpacity; - this.waypointSprite.drawCentered(context, dims / 2, dims / 2, dims * 0.7); + this.waypointSprites.regular.drawCentered(context, dims / 2, dims / 2, dims * 0.7); context.globalAlpha = 1; } } @@ -623,11 +630,11 @@ export class HUDWaypoints extends BaseHUDPart { } // Render the small icon on the left - this.waypointSprite.drawCentered( + this.waypointSprites[waypoint.layer].drawCentered( parameters.context, bounds.x + contentPaddingX, bounds.y + bounds.h / 2, - bounds.h * 0.7 + bounds.h * 0.6 ); }