There is a new version of the forums ready for testing. Please post here if you're willing to help test!

Author Topic: GUI Controls clipping  (Read 292 times)

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
GUI Controls clipping
« on: 11 Jan 2022, 22:09 »
Following this request, I want to add a game setting that makes the GUI controls clip their graphic contents, that is limit the drawing to their formal rectangle defined by X, Y, Width, Height.

https://github.com/adventuregamestudio/ags/pull/1495

I don't know why, but in AGS controls don't clip, so the text may extend outside of the control. The only exception here is a button with image, which image may be clipped by setting specific property.

My initial plan was to introduce a global setting, that affects all controls, and is enabled by default (for the new projects). Personally, I believe that it's normal for gui controls to restrict their contents, and most graphic frameworks seem to do this. But since AGS has its own history of use, and there may be strange cases, I also would like to hear opinions.

Theoretically, I may also add a per-control property, merging it with the Button's "Clip Image". Technically this should be trivial, as this is just an internal engine's flag that may already be applied to any control (but only buttons know how to handle); so that's not a big deal. But in this case I'm more worried that it will make engine's design more complicated, and perhaps game design too, as people will have to specifically remember to toggle this on or off per each thing that needs it.

« Last Edit: 11 Jan 2022, 22:14 by Crimson Wizard »