@@ -1721,26 +1721,74 @@ public void drawText(final CoordinateType ctype, final int x, final int y, final
1721
1721
addShape (ShapeType .Text , ctype , x , y , 0 , 0 , formatted , textSize .id , 0 , false );
1722
1722
}
1723
1723
1724
+ /**
1725
+ * Draw formatted text on the Map. (0, 0) coordinate is TopLeft.
1726
+ * Use the %c delimiter to change the color of the following text to given `colors` until the next %c
1727
+ * <p>
1728
+ * Example:
1729
+ * `drawTextMap(50, 50, "%cHello %cWorld", Text.Red, Text.Blue)`
1730
+ * will draw the text `Hello` in Red and `World` in Blue at offset (50, 50) from the TopLeft of the Map.
1731
+ */
1724
1732
public void drawTextMap (final int x , final int y , final String string , final Text ... colors ) {
1725
1733
drawText (CoordinateType .Map , x , y , string , colors );
1726
1734
}
1727
1735
1736
+ /**
1737
+ * Draw formatted text on the Map. (0, 0) coordinate is TopLeft of the Map.
1738
+ * Use the %c delimiter to change the color of the following text to given `colors` until the next %c
1739
+ * <p>
1740
+ * Example:
1741
+ * `drawTextMap(new Position(50, 50), "%cHello %cWorld", Text.Red, Text.Blue)`
1742
+ * will draw the text `Hello` in Red and `World` in Blue at offset (50, 50) from the TopLeft of the Map.
1743
+ */
1728
1744
public void drawTextMap (final Position p , final String string , final Text ... colors ) {
1729
1745
drawTextMap (p .x , p .y , string , colors );
1730
1746
}
1731
1747
1748
+ /**
1749
+ * Draw formatted text relative to the Mouse location. (0, 0) is the Mouse location.
1750
+ * Use the %c delimiter to change the color of the following text to given `colors` until the next %c
1751
+ * <p>
1752
+ * Example:
1753
+ * `drawTextMouse(50, 50, "%cHello %cWorld", Text.Red, Text.Blue)`
1754
+ * will draw the text `Hello` in Red and `World` in Blue at offset (50, 50) from the Mouse location.
1755
+ */
1732
1756
public void drawTextMouse (final int x , final int y , final String string , final Text ... colors ) {
1733
1757
drawText (CoordinateType .Mouse , x , y , string , colors );
1734
1758
}
1735
1759
1760
+ /**
1761
+ * Draw formatted text relative to the Mouse location. (0, 0) is the Mouse location.
1762
+ * Use the %c delimiter to change the color of the following text to given `colors` until the next %c
1763
+ * <p>
1764
+ * Example:
1765
+ * `drawTextMouse(new Position(50, 50), "%cHello %cWorld", Text.Red, Text.Blue)`
1766
+ * will draw the text `Hello` in Red and `World` in Blue at offset (50, 50) from the Mouse location.
1767
+ */
1736
1768
public void drawTextMouse (final Position p , final String string , final Text ... colors ) {
1737
1769
drawTextMouse (p .x , p .y , string , colors );
1738
1770
}
1739
1771
1772
+ /**
1773
+ * Draw formatted text relative to the Screen location. (0, 0) is TopLeft of the Screen.
1774
+ * Use the %c delimiter to change the color of the following text to given `colors` until the next %c
1775
+ * <p>
1776
+ * Example:
1777
+ * `drawTextScreen(50, 50, "%cHello %cWorld", Text.Red, Text.Blue)`
1778
+ * will draw the text `Hello` in Red and `World` in Blue at offset (50, 50) from the TopLeft of the Screen.
1779
+ */
1740
1780
public void drawTextScreen (final int x , final int y , final String string , final Text ... colors ) {
1741
1781
drawText (CoordinateType .Screen , x , y , string , colors );
1742
1782
}
1743
1783
1784
+ /**
1785
+ * Draw formatted text relative to the Screen location. (0, 0) is TopLeft of the Screen.
1786
+ * Use the %c delimiter to change the color of the following text to given `colors` until the next %c
1787
+ * <p>
1788
+ * Example:
1789
+ * `drawTextScreen(new Position(50, 50), "%cHello %cWorld", Text.Red, Text.Blue)`
1790
+ * will draw the text `Hello` in Red and `World` in Blue at offset (50, 50) from the TopLeft of the Screen.
1791
+ */
1744
1792
public void drawTextScreen (final Position p , final String string , final Text ... colors ) {
1745
1793
drawTextScreen (p .x , p .y , string , colors );
1746
1794
}
0 commit comments