Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
【Solved】icons iso
#1
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
Reply
#2
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 ....
Reply
#3
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
Reply
#4
Photo 
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)
   
Reply
#5
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"
        }
      ]
    }
Reply
#6
(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"
        }
    ]
}
Reply
#7
copy in my ventoy.json

Idem

This does not work, and the Vimix theme is no longer displayed.
Reply
#8
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"
        }
    ]
}
Reply
#9
Copy the acronis icon to the vimix/icons folder on the first partition. Sorry about your poor english.
Reply
#10
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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)