1
1
package org .runejs .client .frame ;
2
2
3
3
import org .runejs .client .MovedStatics ;
4
+ import org .runejs .client .cache .media .TypeFace ;
4
5
import org .runejs .client .media .Rasterizer ;
5
6
import org .runejs .client .scene .Point2d ;
6
7
@@ -25,23 +26,33 @@ public static void drawWalkPath() {
25
26
int tileX = walkpathX [i ];
26
27
int tileY = walkpathY [i ];
27
28
28
- Point2d nextPos = MovedStatics .getProjectedScreenPosition (10 , tileY * 128 + 64 , tileX * 128 + 64 );
29
+ Point2d nextPos = MovedStatics .getProjectedScreenPosition (0 , tileY * 128 + 64 , tileX * 128 + 64 );
29
30
30
31
if (lastTilePos != null && nextPos != null ) {
31
32
Rasterizer .drawDiagonalLine (lastTilePos .x , lastTilePos .y , nextPos .x , nextPos .y , 0x00FFAC );
32
33
}
33
34
35
+ // handle final walkpath label separately to avoid clipping issues
36
+ if (nextPos != null && i != walkpathX .length - 1 ) {
37
+ TypeFace .fontSmall .drawStringLeft (tileX + "," + tileY , nextPos .x , nextPos .y + 1 , 0 );
38
+ TypeFace .fontSmall .drawStringLeft (tileX + "," + tileY , nextPos .x , nextPos .y , 0x00AAFF );
39
+ }
40
+
34
41
lastTileX = tileX ;
35
42
lastTileY = tileY ;
36
43
lastTilePos = nextPos ;
37
44
}
38
45
39
46
if (pathStartPos != null ) {
40
47
Rasterizer .drawCircle (pathStartPos .x , pathStartPos .y , 2 , 0xE055DE );
48
+ TypeFace .fontSmall .drawStringLeft (walkpathX [0 ] + "," + walkpathY [0 ], pathStartPos .x , pathStartPos .y + 1 , 0 );
49
+ TypeFace .fontSmall .drawStringLeft (walkpathX [0 ] + "," + walkpathY [0 ], pathStartPos .x , pathStartPos .y , 0x00AAFF );
41
50
}
42
51
43
52
if (pathFinishPos != null ) {
44
53
Rasterizer .drawCircle (pathFinishPos .x , pathFinishPos .y , 4 , 0xE055DE );
54
+ TypeFace .fontSmall .drawStringLeft (walkpathX [walkpathX .length - 1 ] + "," + walkpathY [walkpathY .length - 1 ], pathFinishPos .x , pathFinishPos .y + 1 , 0 );
55
+ TypeFace .fontSmall .drawStringLeft (walkpathX [walkpathX .length - 1 ] + "," + walkpathY [walkpathY .length - 1 ], pathFinishPos .x , pathFinishPos .y , 0x00AAFF );
45
56
}
46
57
}
47
58
}
0 commit comments