Document LuaSimulation.get_widget_position

Place to report issues and suggest improvements to the API documentation.
i142857
Inserter
Inserter
Posts: 24
Joined: Mon Nov 04, 2024 9:56 am
Contact:

Document LuaSimulation.get_widget_position

Post by i142857 »

The docs for get_widget_position don't really give you much. The arguments are called data and data2, and there's no explanation on what they mean (for each type). Only source of information I can find are files like tips-and-tricks-simulations.lua but only certain kinds of examples are in there. For instance, I can't find any example using data2, so I can't figure out what, if anything, it does. Experimenting with these APIs is relatively difficult and time-consuming, too.

Here's what I'd like to know:
  • Does this API work for custom UIs too, or only built-in UIs? So far I haven't been able to get it to work for my custom UIs, but perhaps I'm holding it wrong.
  • If custom UIs are supported, how do I find things? Can it locate controls by name? I have tried, for example, finding a custom label by content (like the base game does) and it doesn't seem to work.
  • What kind of data/data2 arguments are expected by each type?
Thank you!
Osmo
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: Document LuaSimulation.get_widget_position

Post by Osmo »

I agree, it is hard to figure out what is supported and what isn't
Post Reply

Return to “Documentation Improvement Requests”