How to add BlackBox?
#1
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 :/)
Reply

#2
Have you tried SetIcon("black"); ?
[Image: azuw.jpg]
Reply

#3
omg Y U NO i'm always thinking too complicated Troll

Thx, that was the solution Like a sir
Reply

#4
(08-02-2012, 19:13)Deviler86 Wrote: omg Y U NO i'm always thinking too complicated Troll

Thx, that was the solution Like a sir

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?
Reply

#5
Please share the code you are using.
[Image: azuw.jpg]
Reply

#6
(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):

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.
Reply

#7
Thanks.

I will add sorting to the next update.
[Image: azuw.jpg]
Reply

#8
(08-25-2012, 09:05)zxz0O0 Wrote: Thanks.

I will add sorting to the next update.

thanks alot. i appreciate it Smile
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.