treeform / fidget

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

[Question] why does image add prefix automatically? #107

Closed ringabout closed 3 years ago

ringabout commented 3 years ago

I'm doing some homeworks using fidget.

image

I use native file dialog in windows with fidget and it works fine. But I need to display image in window from the file dialog. image function will automatically add data prefix to path. I have to modify the source code to display images.

By the way sometimes I need to disable image cache. Now I have to set different names for the images. I hope fidget can supply this options. Are there some road maps for fidget, maybe I can participate in:)

Thanks!

treeform commented 3 years ago

You should be able to set the dataDir to some thing else or "".

dataDir = ""

The reason for the data dir is that images might be part of APK, or stored on a different asset server.

https://github.com/treeform/fidget/blob/master/src/fidget/common.nim#L226