Hello !
Can you give me an example in order to display an icon in front of each "iso" file used.
I don't really understand the doc
https://www.ventoy.net/en/plugin_menuclass.html
The isos files are in a directory named isos
I created a sub directory named icons (+ icons) in the theme directory
the icon names correspond to the key line of the ventoy file
In the ventoy.json file, I have these lines...
{
"theme": {
"file": "/ventoy/theme/Vimix/theme.txt",
"gfxmode": "1920x1080."
"display_mode": "GUI",
"ventoy_left": "5%."
"ventoy_top": "95%",
"ventoy_color": "#0000ff"
}
}
{
"menu_class": [
{
"key": "Acronis."
"class": "Acronis_Bootable_PE_Media_06.2020"
},
{
"key." Acronis-Backup-advanced",
"class": "Acronis_Backup_Advanced_11.7_50230_en"
},
{
"key": "R-Drive-Image",
"class": "R-DriveImage."
}
]
}
exemple :
my iso name is Acronis_Bootable_PE_Media_06.2020.iso ( in the folder ISOS)
the respective icon is named 'Acronis.png (in the folder theme/icons )
Greetings
Code:
{
"theme": {
"file": "/ventoy/theme/Vimix/theme.txt",
"gfxmode": "1920x1080."
"display_mode": "GUI",
"ventoy_left": "5%."
"ventoy_top": "95%",
"ventoy_color": "#0000ff"
},
"menu_class": [
{
"key": "Acronis_Bootable"
"class": "Acronis"
}
]
}
1. theme and menu_class MUST in one object in the json file.
2. class is just the png file name, here class Acronis means you have a Acronis.png file in icons directory
3. key is used to match the iso file name, here your iso file name is
Acronis_Bootable_PE_Media_06.2020.iso so you can set key as Acronis_Bootable or Acronis_ or Acronis_Bootable_PE ....
This does not work, and the Vimix theme is no longer displayed.
my ventoy file
{
"theme": {
"file": "/ventoy/theme/Vimix/theme.txt",
"gfxmode": "1920x1080."
"display_mode": "GUI",
"ventoy_left": "5%."
"ventoy_top": "95%",
"ventoy_color": "#0000ff."
}
"menu_class": [
{
"key": "Acronis_Bootable_PE_Media."
"class": "Acronis"
}
]
}
What is the role of commas, can we put a comment behind it?
Thank you for your support
I found this
http://json.parser.online.fr/
syntaxe_error
SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 10 column 5 of the JSON data ???
I don't see the mistake
try it:
{
"theme": {
"file": "/Vimix/theme.txt",
"gfxmode": "1920x1080",
"display_mode": "GUI",
"ventoy_left": "5%",
"ventoy_top": "95%",
"ventoy_color": "#0000ff",
"fonts": [
"/ventoy/theme/blur/Hack-12.pf2",
"/ventoy/theme/blur/Hack-14.pf2",
"/ventoy/theme/blur/Hack-16.pf2"
]
},
"menu_class" : [
{
"key": "Acronis_Bootable",
"class": "Acronis"
}
]
}
(07-02-2020, 12:19 PM)senga34 Wrote: [ -> ]This does not work, and the Vimix theme is no longer displayed.
my ventoy file
{
"theme": {
"file": "/ventoy/theme/Vimix/theme.txt",
"gfxmode": "1920x1080."
"display_mode": "GUI",
"ventoy_left": "5%."
"ventoy_top": "95%",
"ventoy_color": "#0000ff."
}
"menu_class": [
{
"key": "Acronis_Bootable_PE_Media."
"class": "Acronis"
}
]
}
What is the role of commas, can we put a comment behind it?
Thank you for your support
You miss a comma after }
That's the json syntax.
Just copy bellows:
{
"theme": {
"file": "/ventoy/theme/Vimix/theme.txt",
"gfxmode": "1920x1080."
"display_mode": "GUI",
"ventoy_left": "5%."
"ventoy_top": "95%",
"ventoy_color": "#0000ff"
},
"menu_class": [
{
"key": "Acronis_Bootable"
"class": "Acronis"
}
]
}
copy in my ventoy.json
Idem
This does not work, and the Vimix theme is no longer displayed.
The theme is ok but no icon
{
"theme": {
"file": "/ventoy/theme/Vimix/theme.txt",
"gfxmode": "1920x1080",
"display_mode": "GUI",
"ventoy_left": "5%",
"ventoy_top": "95%",
"ventoy_color": "#0000ff",
"fonts": [
"/ventoy/theme/Vimix/Hack-12.pf2",
"/ventoy/theme/Vimix/Hack-14.pf2",
"/ventoy/theme/Vimix/Hack-16.pf2"
]
},
"menu_class": [
{
"key": "Acronis_Bootable",
"class": "Acronis"
}
]
}
Copy the acronis icon to the vimix/icons folder on the first partition. Sorry about your poor english.
WOW! Miracle! It's all good
and the theme, and the icon !
Thank you very much for your help
Now I try to add as many icons as isos files. (Maintenant je tente de rajouter autan d'icône que de fichier isos)
Merci encore!