GUI: static position

Started by Slasher, Mon 19/08/2013 09:12:29

Previous topic - Next topic

Slasher

Hi

I am trying to figure out the following.

Room size 1000 x 2000.

One left edge is a GUI (gGuage)70 X 1800 with a Button (BGuage) that follows characters y up and down.

What I am trying to achieve is for the GUI to fill the whole 1800 (length) instead of just the seeing the top half (480).

The game is 640 x 480.

Would you help please?

cheers



Gilbert

(Correct me if I am wrong)As far as I remember GUIs cannot have negative coordinates, so you can make a GUI clip at the right or bottom edges of the screen but not the left and top edges. So, unfortunately no, there is no way(at least not simple ones) to do this with a GUI, you need to reconsider using something else, such as an overlay, a character or an object, instead.

Khris

I'm actually positive that GUIs can have negative coordinates; I've implemented GUIs that slide in from the top/left. The only thing that doesn't work afaik: the GUI can't be off the screen completely.

slasher:
Put this in repeatedly_execute(_always):
Code: ags
  gGuage.Y = -GetViewportY(); // (gGauge?) 

Slasher

Hi,

Khris
It will not do the effect I had in mind. Instead I have used an object (oGuage: it is an indicator arrow that follows player's y) and the background has a depth ruler on it that measures the depth of water and it gives the same effect.

cheers

Gilbert

Quote from: Khris on Mon 19/08/2013 12:07:49
I've implemented GUIs that slide in from the top/left.
If this is the case I think it's been changed. Even the manual entry isn't updated to reflect the change:
http://www.adventuregamestudio.co.uk/manual/ags57.htm#gui.x

Khris

I have opened my Default Game I use for testing stuff, changed gStatusline's top to -5 in the properties and run it. Works just fine, the GUI appears 5 pixels further up, with it's upper part cut off.

Ryan Timothy B

It'll just crash if you move the GUI completely off screen, which is a "feature" that really should be removed.

SMF spam blocked by CleanTalk