Author Topic: Couple Newbie HUD making questions  (Read 5268 times)

GeneralScott

  • Posts: 291
  • Turrets: +3/-8
Couple Newbie HUD making questions
« on: October 31, 2010, 01:06:37 am »
Hi people! I was just screwing with Superpie's 1.2 HUD just now and I've isolated a list of a couple things that I don't know how to do and can't figure out.
1) - How do you rotate HUD components?
2) - Is there any easy way to find coordinates of places on the screen, or is it just trial and error?
3) - <I'll find something soon>

Thanks

Meisseli

  • Spam Killer
  • *
  • Posts: 765
  • Turrets: +83/-25
Re: Couple Newbie HUD making questions
« Reply #1 on: October 31, 2010, 01:42:25 pm »
1) I think you can't really rotate items properly but you can experiment with

Code: [Select]
align ITEM_ALIGN_RIGHT
align ITEM_ALIGN_LEFT
align ITEM_ALIGN_CENTER

where applicable (health bars, for example). Also just switching the last two rect numbers, for example

Quote
   //INVENTORY
    itemDef
    {
      name "inventory"
      rect 158.5 425 325 25
      visible 1
      decoration
      forecolor 1 1 1 .6
      ownerdraw CG_PLAYER_SELECT
    }

Quote
   //INVENTORY
    itemDef
    {
      name "inventory"
      rect 158.5 425 25 325
      visible 1
      decoration
      forecolor 1 1 1 .6
      ownerdraw CG_PLAYER_SELECT
    }

works in some items.

2) I think this is correct.
The way I understand it is: x and y values in rect are from "0 0" (for top left corner) to "640 480" (bottom right), which is then scaled to match your screen resolution. The other 2 values are width and height, from the point defined by x and y towards bottom right corner.
« Last Edit: October 31, 2010, 01:44:07 pm by Meisseli »