-
Active Member
How to display potion icon texture or potion buff in my code
I ve wrote a plugin which display a text when potion is ready
BaiduShurufa_2019-8-20_8-59-25.png
Here is my code
[C#] using System; using Turbo.Plugins.Default; namespace Turbo.Plugins.adrian { - Pastebin.com
Now i want to display the potion icon texture instead of text.
How could i modify the code ? Or should i display the potion buff icon instead ?
-
First Dev On The Internet
potions — imgbb.com
var texture = Hud.Texture.GetTexture(TEXTURENUMBERINIMAGEABOVE);
var itemSizeX = 63f; // ADJUST TO RESPECT THE X Y RATIO OF THE POTION IMG
var itemSizeY = 63f; // potions are squares 63 x63 pixels so use same X and Y
texture.Draw(X, Y, itemSizeX, itemSizeY, itemOpacity);
-
Post Thanks / Like - 2 Thanks
JarJarD3,
RNN (2 members gave Thanks to User5981 for this useful post)
-
Contributor
Originally Posted by
User5981
potions — imgbb.com
var texture = Hud.Texture.GetTexture(TEXTURENUMBERINIMAGEABOVE);
var itemSizeX = 63f; // ADJUST TO RESPECT THE X Y RATIO OF THE POTION IMG
var itemSizeY = 63f; // potions are squares 63 x63 pixels so use same X and Y
texture.Draw(X, Y, itemSizeX, itemSizeY, itemOpacity);
You're the man!