Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
import app
redef class App
+ # Path to the expected location of the asset folder of this program
+ #
+ # The asset folder should be located relative to the executable at `../assets/`.
+ # This value can be redefined to change the expected location.
+ var assets_dir: String = sys.program_name.dirname / "../assets/" is lazy
+
redef fun setup
do
super
import linux_app
redef class App
- var assets_dir: String
-
- redef fun setup
- do
- assets_dir = sys.program_name.dirname + "/../assets/"
-
- super
- end
-
redef fun try_loading_asset( id )
do
var path = "{assets_dir}/{id}"