Posts: 6
Threads: 1
Joined: Jul 2020
Reputation:
0
07-02-2020, 08:28 AM
(This post was last modified: 07-10-2020, 04:02 AM by longpanda .)
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
Posts: 1,358
Threads: 86
Joined: Apr 2020
Reputation:
133
07-02-2020, 11:04 AM
(This post was last modified: 07-02-2020, 11:08 AM by longpanda .)
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 ....
Posts: 6
Threads: 1
Joined: Jul 2020
Reputation:
0
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
Posts: 6
Threads: 1
Joined: Jul 2020
Reputation:
0
07-02-2020, 02:33 PM
(This post was last modified: 07-02-2020, 02:34 PM by senga34 .)
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
Attached Files
Thumbnail(s)
Posts: 51
Threads: 5
Joined: May 2020
Reputation:
2
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"
}
]
}
Posts: 1,358
Threads: 86
Joined: Apr 2020
Reputation:
133
07-02-2020, 03:52 PM
(This post was last modified: 07-02-2020, 03:53 PM by longpanda .)
(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"
}
]
}
Posts: 6
Threads: 1
Joined: Jul 2020
Reputation:
0
copy in my ventoy.json
Idem
This does not work, and the Vimix theme is no longer displayed.
Posts: 6
Threads: 1
Joined: Jul 2020
Reputation:
0
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"
}
]
}
Posts: 51
Threads: 5
Joined: May 2020
Reputation:
2
Copy the acronis icon to the vimix/icons folder on the first partition. Sorry about your poor english.
Posts: 6
Threads: 1
Joined: Jul 2020
Reputation:
0
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!