treeform / fidget

Figma based UI library for nim, with HTML and OpenGL backends.
MIT License
768 stars 33 forks source link

Polygon element support #83

Closed wiltzutm closed 4 years ago

wiltzutm commented 4 years ago

Support for Figma's polygon element. Because there's lacking support of both polygons and unicodes in Fidget I cannot create arrow buttons. Maybe this is possible with images, but I like to use simple elements.

Thank you!

treeform commented 4 years ago

Polygon elements can be really complex. It will be a long time before I have support for polygons. I recommend marking your polygons with an export to PNG and exporting. Figma Fidget plugin automatically will insert image code there.

image

component "icons/refresh":
  box 250, -415, 20, 20
  image "icons/refresh.png"

I support both 1x and 2x images for high DPI screens.

wiltzutm commented 4 years ago

Thanks a bunch for your quick answer and the alternative! When seeing your example it doesn't seem so difficult after all! Sorry If I make my feature requests seem trivial, it's just because I don't understand what it takes to implement them. :)