Skip to content

Fix UI left, right, etc. calculations

Alex Ksandra requested to merge 0player/t-engine4:uifix into master

While working on statusbox, I've discovered that:

  • absolutely everything dependent adds self.ix, self.iy twice. or thrice. this was masking top= bug, for example.
  • right=ui sets right to ui.x, which usually sets an object flying to the opposite side of the dialog,
  • top=ui sets top edge to be equal to the top edge of the ui, which is probably not what's desired (see left=)
  • bottom=ui has similar problem to right,
  • hcenter=ui sends a ui element flying half a dialog width to the right,
  • vcenter=ui, likewise,
  • and hcenter_left=ui I didn't understand what it's supposed to do.

This commit fixes all of the above, sans the last, and also adds 3 pixels of padding between everything to compensate for buggy yet sometimes desired previous results.

Merge request reports

Loading