Hi there,
i'm working on a Plugin in which i would like to add a BlackBox behind my menu.
I couldn't find a way to do so.
So now my question is if i can add something like that or (for example) display an icon and change it's rgb to 0,0,0.
Additional it would be nice to know how to do this.
I already tried using icons with an HudElem but the only thing i get to work with HudElem is a Text and Value type without any kind of background color. (hudelem.color only chances the fonts default color :/)
Have you tried SetIcon("black"); ?
omg
i'm always thinking too complicated
Thx, that was the solution
(08-02-2012, 19:13)Deviler86 Wrote: [ -> ]omg i'm always thinking too complicated
Thx, that was the solution
Since nobody answered my question in the General Help Thread, i'll just post it here:
I have a problem displaying the blackbox and a text above it.
Sometimes the blackbox is drawn above the text instead of behind it. I tried editing OriginZ but that didn't help.
Can somebody give me a solution on how to display something above another thing constantly?
Please share the code you are using.
(08-24-2012, 09:09)zxz0O0 Wrote: [ -> ]Please share the code you are using.
Ok here is the code i use (ClientInfo is a class that i wrote):
CSHARP Code
private void CreateHUDs(int ClientNum)
{
ClientInfo clientInfo
= new ClientInfo
();
int menu = CreateHUD_Menu(ClientNum);
int blackBox = CreateHUD_BlackBox(ClientNum);
clientInfo.HUD_Menu = menu;
clientInfo.HUD_BlackBox = blackBox;
ClientInfos.Add(ClientNum, clientInfo);
}
private int CreateHUD_Menu(int ClientNum)
{
HudElem hud = CreateNewHudElem();
hud.Type = HudElementTypes.Text;
hud.ShowToEnt = ClientNum;
hud.HideInMenu = true;
hud.Font = HudElementFonts.Default;
hud.FontScale = 1f;
hud.PointType = 0;
hud.OriginY = 210f;
hud.OriginX = -60f;
hud.SetLabel(hiddenMenuText);
hud.SetString("");
return hud.HudElementNum;
}
private int CreateHUD_BlackBox(int ClientNum)
{
HudElem hud = CreateNewHudElem();
hud.Type = HudElementTypes.Icon;
hud.ShowToEnt = ClientNum;
hud.HideInMenu = true;
hud.PointType = 0;
hud.OriginY = 210f;
hud.OriginX = -60f;
hud.IconWidth = 136;
hud.IconHeight = 110;
return hud.HudElementNum;
}
P.s.: I also tried creating the HUD-Elements in a different order but that didn't help.
Thanks.
I will add sorting to the next update.
(08-25-2012, 09:05)zxz0O0 Wrote: [ -> ]Thanks.
I will add sorting to the next update.
thanks alot. i appreciate it