minetest/minetest — pull request #1563 by sapier (2014-08-18 09:25:27+00:00)
Title: Make positioning of formspec elements consistent (WIP)

This is required in order to get acceptable results once fonts scale same way as formspecs do.
Without this cleanup it's not really possible to write a formspec that can be scaled up and down without loosing exact relative positioning.
Reason for this are various bugs in formspec locations as well as incorrect implementation, just to name some:
-some formspec elemnts use Y scaling factor for X-positioning
-Two different scaling bases:
*font/button height which is quite limited due to arithmetic issues
*image size ... I have no ide why various elements use image size which aren't at all related to images
sometimes they even use image size for padding and other strange things
-Improper handling of padding

In total it's a huge mess once you only fix one thing you're gonna break something else.

Benefits of this commit:
-All formspecs use same positioning, something placed at X=1,Y=1 will be placed there no matter if its a button or textfiled
-Padding is defined to be 0.25 slots
-images as well as buttons now use slot scale for their sizes too
-fonts will scale up if your formspec increases with or without freetype ... yes without is still not as smooth as freetype version

I added a test tab for you to see how positioning is now, that one is gonna be removed of course! BTW those overlapping texts are intentional to see that button/label/checkbox texts now match.
http://imgur.com/qwMqupb