*HOW-TO* Hack your hud (by editing the .gfx files)

Comment below rating threshold, click here to show it.

TheBziur

Member

05-28-2012

Ok UI can get stretched out, but still Why would the aspect ratio of HudAtlas matter?


Comment below rating threshold, click here to show it.

Polka Dot Robot

This user has referred a friend to League of Legends, click for more information

Senior Member

05-28-2012

You're using a 1:1 pixel ratio between the UV (1:1) and the rectangle (16:9). To have a 1:1 pixel ratio between the UV and the screen (for instance, 16:10), you need a pixel ratio of 1: (10/9) between the UV (1,1) and the rectangle (16:9).

It's ratio of UV:rectangle and UV:screen that matters.


Comment below rating threshold, click here to show it.

TheBziur

Member

05-28-2012

What is pixel ratio between UV and the rectangle?
You mean my UV should be 1/9 higher in order to have it be proportional?
Plz Explain.

(sorry for not understanding ><)


Comment below rating threshold, click here to show it.

Phauxe

Member

05-28-2012

I cant seem to figure this out. Any help would be great. This is the block of code im currently working on. I have moved the target frame down as far as I can go. But I still need to move it further down and more right so its centered with my ability frame on the right side. The code says Rect: 1346,978 - 1804,1080 / 1920x1080 its bottomed out. What am I doing wrong and is there another way to code in positions for the huds?
__________

It might go back to that aspect ratio thing. I am not very clear on that subject. I get that in the atlas working with a 1024x1024 you are working in pixels of a 1:1 ratio they are square. However the in game on screen is a 16:9 they are rectangles. I dont understand how to take a UV: 331,524 - 667,623 / 1024x1024 and turn it into Rect: 1346,978 - 1804,1080 / 1920x1080.
//////////////////////////////////////////
Type: Icon
Name: TargetBarFrame
Group: TargetBar
Enabled: 1
AlwaysRespond: 0
Draggable: 0
Layer: 0
Anchor: 0,0
Rect: 1346,978 - 1804,1080 / 1920x1080
Alpha: 1
Texture: HUDAtlas
UV: 331,524 - 667,623 / 1024x1024
//////////////////////////////////////////


Comment below rating threshold, click here to show it.

Polka Dot Robot

This user has referred a friend to League of Legends, click for more information

Senior Member

05-28-2012

TheBziur - Just scale the rectangle until it looks correct, then use the ratio of UV:rectangle for the rest of your objects

Phauxe - Your anchor is from the top left corner. 0,1 if the bottom left corner.

If it's any help, the source for my UI is attached (remove the .txt extension, as the forums limit .zip file size).


Comment below rating threshold, click here to show it.

Phauxe

Member

05-28-2012

Quote:
Originally Posted by knacko View Post
Phauxe - Your anchor is from the top left corner. 0,1 if the bottom left corner.

If it's any help, the source for my UI is attached (remove the .txt extension, as the forums limit .zip file size).
I am not fully understanding :[ I have tried so many things and still cant get the image quite right. The closest I get and the image has a giant black bar behind it.

Anchor: 0.5,1
Rect: 1462,978 - 1920,1080 / 1920x1080


Comment below rating threshold, click here to show it.

TheBziur

Member

05-28-2012

Quote:
Originally Posted by knacko View Post
TheBziur - Just scale the rectangle until it looks correct, then use the ratio of UV:rectangle for the rest of your objects
I know I can do that. though it kinda is a lot of math and I was asking if it was possible to avoid scaling objects.
Ehh. I'll pick it up after exams. thanks for your help


Comment below rating threshold, click here to show it.

Polka Dot Robot

This user has referred a friend to League of Legends, click for more information

Senior Member

05-28-2012

Type: Icon
Name: TargetBarFrame
Group: TargetBar
Enabled: 1
AlwaysRespond: 0
Draggable: 0
Layer: 0
Anchor: 0,1
Rect: 1346,978 - 1804,1080 / 1920x1080
Alpha: 1
Texture: HUDAtlas
UV: 331,524 - 667,623 / 1024x1024

The anchor is the point in which the (x1, y1) coordinates will be. 0,0 is top left - 0,1 is bottom left - 1, 0 is top right - 1,1 is bottom right (or you can use anything in between).


Comment below rating threshold, click here to show it.

Phauxe

Member

05-30-2012

Okay so I made some changes to the code and got good and bad results. The good news is the panels are where they need to be, and the bad news a black bar showed up behind the player and target bars. Any ideas? Thanks for the continued help. =D

This code is for the target bar:
//////////////////////////////////////////
Type: Icon
Name: TargetBarFrame
Group: TargetBar
Enabled: 1
AlwaysRespond: 0
Draggable: 0
Layer: 0
Anchor: 0.5,1
Rect: 1271,938 - 1729,1041/ 1920x1080
Alpha: 1
Texture: HUDAtlas
UV: 331,524 - 667,623 / 1024x1024
//////////////////////////////////////////
__________

This next set of coding is for the player bar:
//////////////////////////////////////////
Type: Icon
Name: HUDLeftFrame
Group: HUDLeft
Enabled: 1
AlwaysRespond: 0
Draggable: 0
Layer: 3
Anchor: 0.5,1
Rect: 195,938 - 653,1041/ 1920x1080
Alpha: 1
Texture: HUDAtlas
UV: 10,15 - 345,114 / 1024x1024
//////////////////////////////////////////


Comment below rating threshold, click here to show it.

TheBziur

Member

05-30-2012

I guess, but It's only guess, it has something to do with grouping Also if something in HudAtlas is transparent but has an Alpha atribute set to 0 it will be black. It is possible that grouping (or some element that has something to do with it) draws a rectangle which has a texture and isn't transparent. (look how black rectangles are adjusted to a place you put frames to) Maybe try moving every element into it's place and see what you will get. See what elements have alpha set to 0 and move them in the first priority. That's my guess. Good luck.

HINT: You can remove elements which you havent touched yet (titanbar, background wall, minimap from elementslistnormal.ini to hide them. It helps sometimes a bit to see what's wrong clearlier. (backup it first)