MrBounty / PZ-UI_API

UI API for the game project zomboid
17 stars 4 forks source link

ISSimpleTickBox: position can't be set #11

Open toomanynights opened 6 months ago

toomanynights commented 6 months ago

Even though the documentation states that you can provide a position argument, the appropriate function doesn't process that second argument, leading to inability to manage tick box's position in a conventional manner.

It still can be managed, but it would require decorating / rewriting ISSimpleTickBox:setPositionAndSize() function.

On a side note, the mentioned function sets tickSize equal to the line's height (or width), which leads to further complications in positioning the element. Since the tickBox element itself is vanilla, it has a hard coded size of 16px. Setting that value to anything else leads to the tick box's "hitbox" being larger than the tick box itself, proving the attempts to position it futile (the invisible "hitbox" extension will also take up space).