Formspec alignment problems

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Formspec alignment problems

by Byakuren » Wed Feb 17, 2016 02:51

I am having trouble lining up formspec elements. I have this image, artifice_straight_diag.png:
Image
And am generating the formspec
Code: Select all
background[0.5,0.5;8,8;default_stone.png]
image_button[1.6,0.6;0.8,0.8;default_tree.png^progress_tree_check.png^\[colorize:#00FF00:50;wood;]tooltip[wood;Wood]
image_button[4.6,2.6;0.8,0.8;default_wood.png^progress_tree_check.png^\[colorize:#00FF00:50;plank;]tooltip[plank;Plank]
image[2,1;3,2;artifice_straight_diag.png]

I expected this to draw a line between the centers of the two image buttons, but instead I get this:
Image

What am I doing wrong?
Every time a mod API is left undocumented, a koala dies.
 

User avatar
kaadmy
Member
 
Posts: 706
Joined: Thu Aug 27, 2015 23:07
GitHub: kaadmy
IRC: KaadmY
In-game: KaadmY kaadmy NeD

Re: Formspec alignment problems

by kaadmy » Wed Feb 17, 2016 03:14

I have had similar problems before, see this and maybe figure a way around ithttps://github.com/minetest/minetest/ ... .cpp#L2005
Never paint white stripes on roads near Zebra crossings.

Pixture
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Formspec alignment problems

by Byakuren » Wed Feb 17, 2016 03:28

kaadmy wrote:I have had similar problems before, see this and maybe figure a way around ithttps://github.com/minetest/minetest/ ... .cpp#L2005


Thank you kaadmy. Multiplying my widths by 5/4 and my heights by 15/13 worked.
Every time a mod API is left undocumented, a koala dies.
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 4 guests