BizHawk
BizHawk copied to clipboard
Lua forms library: elements misplaced when only x is supplied
Summary
When using functions with optional x/y values in the Lua forms library (button(), checkbox() etc), supplying only x causes both x and y to revert to default (0). I feel this is a bug as any optional parameter should be omittable, and supplying only x has a usecase whenever the user wants an element along the top of the form. If this bug is a wontfix, this behavior should at least be documented.
Repro
Any of the following commented API calls (and others) will reveal a misplaced element:
handle = forms.newform()
--forms.button(handle, "Click", nil, 50)
--forms.dropdown(handle, tbl, 40)
--forms.label(handle, "Label", 70)
Host env.
- BizHawk 2.9.1 x64. Win10 Pro
This is intentional, and it should be documented.