solar2d/demo-app-store-automation

Feature requests

Closed this issue · 1 comments

A year ago or so I posted it on the forum, but had no answers, so I will post it here. I got used to work with .NET and being a developer in Solar2D I see that I apply same techniques, but some of them cannot be performed due to missing a following. Namely, I wish that EVERY object had ".id" / ".tag" or better ".user_data" fields. It would be easier to find created objects by such fields. E.g.:

Top_title = display.newText({
text = "yo!",
x = x_int,
y = y_int,
width = width_int,
font = bold_font_str,
fontSize = H1_font_size_int*2,
align = "center",
id = "Header"
})

or so:

Top_title = display.newText({
text = "yo!",
x = x_int,
y = y_int,
width = width_int,
font = bold_font_str,
fontSize = H1_font_size_int*2,
align = "center",
user_data =
{
id = "Header",
some_user_field = 1,
some_user_field = 2.3,
some_user_field = "1",
}
})

And another feature request is to update/add modern description for such objects like newRect.
Current is: display.newRect( [parent,] x, y, width, height )
Modern would be:
display.newRect({
[parent=parent,]
x = x_int,
y = y_int,
width = width_int,
height = height_int
})

Thanks.

Sure, you can do that. You can assign and re-define functions hovewer you desire. It’s Lua ¯_(ツ)_/¯
You can assign any field to your object’s tables and process them accordingly, as well as define new functions and even replace existing. Also, you don’t need () if only thing you passing is inline table {}.
If you need help figuring out how to do it, let me know.