mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: clean file path usage in the examples, move all the fonts in the common assets folder (#12736)
This commit is contained in:
@@ -18,7 +18,7 @@ mut:
|
||||
}
|
||||
|
||||
fn main() {
|
||||
mut font_path := os.resource_abs_path(os.join_path('../assets/fonts/', 'RobotoMono-Regular.ttf'))
|
||||
mut font_path := os.resource_abs_path(os.join_path('..', 'assets', 'fonts', 'RobotoMono-Regular.ttf'))
|
||||
mut app := &App{
|
||||
gg: 0
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -29,7 +29,8 @@ fn main() {
|
||||
user_data: app
|
||||
init_fn: init_images
|
||||
)
|
||||
app.image = app.gg.create_image(os.resource_abs_path('logo.png'))
|
||||
mut logo_path := os.resource_abs_path(os.join_path('..', 'assets', 'logo.png'))
|
||||
app.image = app.gg.create_image(logo_path)
|
||||
app.gg.run()
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,8 @@ fn main() {
|
||||
}
|
||||
|
||||
fn init_images(mut app App) {
|
||||
app.image = app.gg.create_image(os.resource_abs_path('logo.png'))
|
||||
mut logo_path := os.resource_abs_path(os.join_path('..', 'assets', 'logo.png'))
|
||||
app.image = app.gg.create_image(logo_path)
|
||||
}
|
||||
|
||||
fn frame(mut app App) {
|
||||
|
||||
Reference in New Issue
Block a user