Open sprunk opened 3 months ago
A significant use case in BAR would be https://github.com/beyond-all-reason/Beyond-All-Reason/pull/2625, where it would allow properly testing many features of the UI. Some events are easier than others; mouse dragging, for example, is something I haven't been able to get working from the Lua side.
Add a bunch of functions to the debug lib:
debug.keypress(keycode)
debug.keyrelease(keycode)
debug.mousepress(button)
debug.mouserelease(button)
debug.mousemove(x, y)
The difference between, say,
debug.mousepress(LMB)
andScript.LuaUI.MousePress(LMB)
is that the engine would be able to consume it (for example to do a native drag-a-box selection).The use case is for testing input.