addEventHandler("onClientRender", getRootElement(),
function()
local groupY = 0
for index, group in ipairs ( testGroups ) do
dxDrawText(group.name, 0, groupY, tocolor(255, 255, 255, 255), 1, Font, "left")
for index, contact in ipairs ( group.contacts ) do
dxDrawText(contact.name, 10, (index * dxGetFontHeight(1, Font)) + groupY, tocolor(0, 255, 0, 255), 1, Font, "left")
--friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ] = guiCreateStaticImage(0.03, ( groupY + 0.10 * index ), 0.05, 0.06, "images/".. contact.state ..".png", true, friendsList [ "main" ] [ "contacts_scrollPane" ])
--friendsList [ "main" ] [ "contacts_contact_label_".. contact.name ] = guiCreateLabel(0.10, ( groupY + 0.10 * index ), 0.90, 0.06, contact.name, true, friendsList [ "main" ] [ "contacts_scrollPane" ])
end
groupY = ((#group.contacts + 1) * dxGetFontHeight(1, Font)) + groupY
end
end)
You can edit it, it was problem math, I told you.