Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Mon 19/08/2013 09:12:29

Title: GUI: static position
Post by: Slasher on Mon 19/08/2013 09:12:29
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


Title: Re: GUI: static position
Post by: Gilbert on Mon 19/08/2013 11:14:10
(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.
Title: Re: GUI: static position
Post by: Khris on Mon 19/08/2013 12:07:49
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) Select
  gGuage.Y = -GetViewportY(); // (gGauge?)
Title: Re: GUI: static position
Post by: Slasher on Mon 19/08/2013 14:47:40
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
Title: Re: GUI: static position
Post by: Gilbert on Mon 19/08/2013 15:05:24
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 (http://www.adventuregamestudio.co.uk/manual/ags57.htm#gui.x)
Title: Re: GUI: static position
Post by: Khris on Mon 19/08/2013 16:55:10
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.
Title: Re: GUI: static position
Post by: Ryan Timothy B on Tue 20/08/2013 19:37:04
It'll just crash if you move the GUI completely off screen, which is a "feature" that really should be removed.