adventuregamestudio / ags

AGS editor and engine source code
Other
708 stars 159 forks source link

Editor: in GUI editor support drawing controls with level of transparency #2379

Closed ivan-mogilko closed 7 months ago

ivan-mogilko commented 8 months ago

Sometimes user may need to see GUI background without controls covering the view.

For a (relatively) quick solution I propose to support drawing controls with certain level of transparency, from 0 to 100%.

On possible implementation. The controls may be drawn on a separate transparent bitmap, size of GUI, and then this bitmap drawn with certain transparency over GUI. Note that GUI are still drawn in the native code. In GUIMain there are 2 functions DrawSelf and DrawWithControls. I see two immediate alternatives here:

  1. Add a third DrawControlsOnly(ds) method which makes gui draw only its controls onto a provided bitmap.
  2. Manually loop GUIMain's controls, using GetControlCount/GetControl, and call Draw for each one of them passing the bitmap.

The transparency may be controlled by a slider, similar to how mask transparency is controlled in room editor.