BizHawk icon indicating copy to clipboard operation
BizHawk copied to clipboard

Lua forms library: elements misplaced when only x is supplied

Open j-ac opened this issue 6 months ago • 1 comments

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

j-ac avatar Jan 27 '24 23:01 j-ac

This is intentional, and it should be documented.

YoshiRulz avatar Jan 28 '24 05:01 YoshiRulz