PDA

View Full Version : Dropdown offsetXY affects options



rjotanm
06-28-2018, 08:28 AM
I create dropdown with this code



dropdown = {
tag = "Dropdown",
attributes = {
offsetXY = "100, -20",
rectAlignment = "UpperLeft"
},
children = {
{
tag = "Option",
value = "1"
},
{
tag = "Option",
value = "2"
}
}
}
UI.setXmlTable(dropdown)



But I got an unexpected result (https://snag.gy/uwlWkZ.jpg)

This code works correctly (https://snag.gy/RWJbwF.jpg), but I don't like many nested levels. This bad solution



dropdown ={
tag = "HorizontalLayout",
attributes = {
offsetXY = "100, -20",
rectAlignment = "UpperLeft",
width = "140",
height = "30"
},
children = {
{
tag = "Dropdown",
attributes = {
},
children = {
{
tag = "Option",
value = "1"
},
{
tag = "Option",
value = "2"
}
}
}
}
}


UI.setXmlTable(dropdown)


You could see that the problem is only with the x axis

game version is 10.7.1