Weird Issue: Warnings on GUI's larger than default resolution, etc.

Started by Shane 'ProgZmax' Stevens, Sat 03/07/2010 00:02:57

Previous topic - Next topic

Shane 'ProgZmax' Stevens

By CJ's request, I've made a separate thread for this issue:


I found some weird behavior with resizing guis.  In particular, if you change to a room with a room size larger than the default game dimensions and try to resize the gui to fit that room size you'll get an error.  Now, while I understand it's going by the game resolution only for gui size limits I see this as rather strange behavior.  Why shouldn't we be able to make guis larger than the game resolution and have them off the limits of the screen?  It certainly wouldn't break anything by default.  I bring this up because, if you make one or two guis larger than the primary resolution of your game by default you get constant warnings that it may cause errors (which it doesn't) and since it doesn't actually break anything I'd rather either the warning was removed or the limitation of resizing guis beyond the game set resolution removed, that way I could avoid the warning by resizing the gui when you entered the larger room and changing it back when you leave.

Calin Leafshade

Possibly related to this:

If you try to resize a gui beyond the screen size at run time, or attempt to place the gui entirely off screen at run time(i.e with a y value >= screen height) the engine crashes out with a script error.

GarageGothic

Is this behavior new? I remember using larger-than-screen GUIs for scrolling credits, but I don't recall if the GUI was resized to those dimensions in script rather than in the editor. Seems like a weird thing to warn about, I totally agree with that - if the user has made the GUI larger than the viewport it's probably for a good reason.

Shane 'ProgZmax' Stevens

I've also discovered that there is an animated gui button limit in place of 10 (maybe 12).  This seems really arbitrary and (in the very least) should extend itself to the maximum number of buttons per gui.

Also, buttons would be so much nicer to work with were they to have the same basic functionality of characters, like:

1.  Animating() (this one is a real annoyance to work around)

2.  View,Loop (set/get, though this one isn't as important as the first)

3.  StopAnimation (this would be far better and particularly more consistent than setting NormalGraphic to something else.  It would also avoid having to remember the right image number to stop on, since it would stop on the current loop frame).

*optional

4. Move (this isn't really 'needed' so much as it would be useful for guis that have content that transforms or moves around).

5. Frame (while NormalGraphic 'technically' works as the current visible frame, it is useless as an index into a loop, making Frame useful for incrementing a button manually through a sequence of frames.)

GarageGothic

I didn't even know buttons could animate now  :o - shows how long it was since I coded my GUI, I suppose, I'm running all the animation through rep_exec :).

I agree with your suggestions, though I guess they could all be solved with a module, even if it might not end up entirely consistent with existing functions or compatible with the Button properties set in the editor - the Tween Module already covers the Move part at least.

Pumaman

Yeah, I suppose there is no longer any reason for AGS to not allow you to move a GUI off the screen, or have one larger than the screen.

The main reason it had this restriction was because of confusion with the co-ordinate system, but since hi-res co-ordinates have been supported for quite a while now it's probably not needed any more.

Knox

I was going to post an error I got for a GUI that is larger than the screen resolution but found this thread  ;D

Ive got a gui twice as large as my game res and I wanted to move it around on the screen...I  get the "error":

Code: ags
GUI gBloodSplatter is larger than the screen size and may cause errors in the game.


WHat kind of errors can it cause? Should I wait until this is fixed in a new release, or can I "safely" ignore it for now and continue using my larger GUI?
--All that is necessary for evil to triumph is for good men to do nothing.

Calin Leafshade

As far as I can tell it wont cause any errors.

The only way i can see it causing errors is if you go to extremes and overflow the values. (x values of like 20000000 or something)

SMF spam blocked by CleanTalk