Author Topic: How do I set a static position for a HUD?  (Read 2910 times)

/title

Like you know how Jasa's CRP GUI stays to the left over the paint GUI?

How do I make mine stay at the top, to the left of the tools?

Try running a loop to make it in the same position based on resolution and the extent.

or look at how jasa's CRP GUI does it
if you post a bit of the code that you think does it, we can probably find it

Set the reference point to top right instead of top left, then use the offset to move it to the left of the paint GUI.

position = "0 "@ getword($pref::Video::resolution,1)-435;

this line right here does the magic, but i can't figure out how to work it.

That places Jasa's GUI right about the paint menu, but I would like mine to be to the left of the tools menu.

Try running a loop to make it in the same position based on resolution and the extent.

That's what this is doing right? Im pretty sure 0 would have to change, I think that refers to 0 on the x axis, which is placing it to the far left of the screen and that makes sense because that's where Jasa's stays. As for the other number, I don't know whether to go up or down, or anything.

Set the reference point to top right instead of top left, then use the offset to move it to the left of the paint GUI.

i don't know how to do those things, which is why i am inquiring

I bet this is really simple its just going over my head

position = getword($pref::Video::resolution,0) SPC getword($pref::Video::resolution,1) - 435;
what happens if you use that?
it'll swap it to the other side of the screen (getword($pref::Video::resolution,1) is the screen height, getword($pref::Video::resolution,0) is width)

if it doesn't show up, try
position = getword($pref::Video::resolution,0) - 400 SPC getword($pref::Video::resolution,1) - 435;

There's also getRes(), not sure if that is default


if it doesn't show up, try
position = getword($pref::Video::resolution,0) - 400 SPC getword($pref::Video::resolution,1) - 435;



i changed res and restarted BL, it puts itself in proportionally the same spot

now how do I adjust it to get up there?

Set the Y position to 0.



omg guise!

which way do I move the x axis number now? would I go up or down?

change the - 400 to something like - 200
just experiment with the numbers.. it's not hard to test, is it?

edit: looks like - 150 should be about right, how wide is each star? ~25 pixels?

20, so would i put 120?

for the X, try the getWord(getRes(), 0) and then subtract it with the gui's X extent

for the X, try the getWord(getRes(), 0) and then subtract it with the gui's X extent
is there any advantage to using getRes() over $pref::Video::resolution?

20, so would i put 120?
maybe try 130 or 140, so it has a buffer against the edge