chatIconManager

Methods
6
Fields
None

Getting one

chatIconManager

Methods

MethodReturnsDescription
registerChatIcon(BufferedImage)numberAdd image as a chat icon (ImageUtil.getImageIndexedSprite: at most 255 opaque colours, every other pixel transparent); its id. It gets…
reserveChatIcon()numberAdd a transparent 13x13 chat icon now, to fill in later with updateChatIcon; its id. Game thread only; an error before the client loaded…
updateChatIcon(number, BufferedImage)()Make icon iconId show image (drawn from the next frame). An id no icon has is an error.
chatIconIndex(number)numberIcon iconId's slot in the client's icons: the n of <img=n>, -1 while it has none (before the next tick placed it) or for an id no ico…
getRankImage(FriendsChatRank)BufferedImage?(ChatIconManager, FriendsChatRank) -> BufferedImage?: The friends chat rank's 11x11 icon, outlined (nil for UNRANKED, before the rank…
getRankImage(ClanTitle)BufferedImage?
getIconNumber(FriendsChatRank)number(ChatIconManager, FriendsChatRank) -> number: The friends chat rank's slot in the client's icons (<img=n>'s n), -1 before the rank ic…
getIconNumber(ClanTitle)number

Method details

registerChatIcon

registerChatIcon: (ChatIconManager, BufferedImage) -> number

Add image as a chat icon (ImageUtil.getImageIndexedSprite: at most 255 opaque colours, every other pixel transparent); its id. It gets its slot at the next client tick, so chatIconIndex(id) is -1 until then. An AsyncBufferedImage is refused ("invalid image").

reserveChatIcon

reserveChatIcon: (ChatIconManager) -> number

Add a transparent 13x13 chat icon now, to fill in later with updateChatIcon; its id. Game thread only; an error before the client loaded its icons.

chatIconIndex

chatIconIndex: (ChatIconManager, number) -> number

Icon iconId's slot in the client's icons: the n of <img=n>, -1 while it has none (before the next tick placed it) or for an id no icon has.

getRankImage

getRankImage: ((ChatIconManager, FriendsChatRank) -> BufferedImage?) & ((ChatIconManager, ClanTitle) -> BufferedImage?)

(ChatIconManager, FriendsChatRank) -> BufferedImage?: The friends chat rank's 11x11 icon, outlined (nil for UNRANKED, before the rank icons are loaded, and while its sprite is not read yet).

(ChatIconManager, ClanTitle) -> BufferedImage?: The clan title's 11x11 icon (nil before the rank icons are loaded, and while its sprite is not read yet).

getIconNumber

getIconNumber: ((ChatIconManager, FriendsChatRank) -> number) & ((ChatIconManager, ClanTitle) -> number)

(ChatIconManager, FriendsChatRank) -> number: The friends chat rank's slot in the client's icons (<img=n>'s n), -1 before the rank icons are loaded.

(ChatIconManager, ClanTitle) -> number: The clan title's slot in the client's icons (<img=n>'s n), -1 before the rank icons are loaded.