Skip to content

fix: render mouse example buttons side by side (#117)#118

Merged
meszmate merged 1 commit into
mainfrom
issue-117
Jun 27, 2026
Merged

fix: render mouse example buttons side by side (#117)#118
meszmate merged 1 commit into
mainfrom
issue-117

Conversation

@meszmate

@meszmate meszmate commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Fixes #117. The mouse example rendered each button as a multi-line bordered box and concatenated them as raw strings, which smeared the boxes into a broken diagonal stair-step. This joins the rendered boxes with joinHorizontal so they sit side by side, and corrects buttonHitBox to match where the boxes actually render (row 4, columns 0/16/32) so clicks land on the buttons. The now-unused Writer import was removed. Verified with zig build, zig build test, and by rendering the boxes directly to confirm correct column-aligned output.

The mouse example rendered each button as a multi-line bordered box and
concatenated them as raw strings, which smeared the boxes diagonally into
a broken stair-step. Join the rendered boxes with joinHorizontal so they
sit side by side, and correct buttonHitBox to match where the boxes
actually render (row 4, columns 0/16/32) so clicks land on them.
@meszmate meszmate merged commit 5197bc9 into main Jun 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong button rendering in examples/mouse.zig

1 participant