How would I make hexagonal widgets? #2037
Unanswered
veniamin-ilmer
asked this question in
Q&A
Replies: 1 comment 2 replies
-
you can use the Canvas to render anything you want. https://docs.rs/iced/latest/iced/widget/canvas/index.html |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd want to build games like hexagonal chess, hexagonal minesweeper, etc, so I was interested in hexagonal widget, hexagonal tiling, etc.
From what I see, all widgets seem to boil down to using
renderer::Quad
.Checking out renderer, I see it only had Quad. No other shapes available.
Even the "custom widget" circle example uses
Quad
, except with rounded edges. I don't even know how you'd determine mouse interaction, being able to tell where is the inside of the rounded edges.I got excited about the integration example, because it features a triangle, but it seems like the triangle is specific to wgpu, using
wgpu::PrimitiveTopology::TriangleList
.It seems if I want to build anything hexagonal, I'd need to do a bunch of math myself with lots of lines, correct?
Beta Was this translation helpful? Give feedback.
All reactions