Ventoy Forums
mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - Printable Version

+- Ventoy Forums (https://forums.ventoy.net)
+-- Forum: Ventoy Plugin —— Ventoy 插件 (https://forums.ventoy.net/forumdisplay.php?fid=3)
+--- Forum: Ventoy Plugin Forum (https://forums.ventoy.net/forumdisplay.php?fid=4)
+--- Thread: mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) (/showthread.php?tid=2388)

Pages: 1 2


mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - AlexBryansk - 02-26-2023

1. I present the changes in the plugin "menu_tip". Now "tip" can display messages with a length of 4000 English characters. Which is equivalent for many languages to about 2000 national symbols.
Screenshot of the ventoy.json file.
[attachment=698]

a)Added new parameters to the theme file theme.txt
  menu-tip-width: "33%" // label width - any number
  menu-tip-align: "right" // right, left, center
b)The spelling was corrected in ventoy.json : The "tip" parameter is written in one line. If you need to forcibly transfer a string (analogous to "Enter") when it is displayed in ventoy, insert the tilde symbol "~" into the text.
2. It is also now possible to transfer text in the "label" component.
Set the TIP_WIDTH parameter.
Example:
Code:
+ hbox{
    left = 2%
    top = 60%
    + label {text = "@VTOY_HOTKEY_TIP@" color = "white" align = "left" TIP_WIDTH = "38%"}
}

Screenshot of the result of item 1 and item2
[attachment=697]

3. "tip" can be added for the menu item set manually in the file "grub.cfg".
a) It is necessary to set "vt_tip_dir_id" any name, in the example "/message_1"
b) Add the "id" string to the submenu: "--id="DIR_" _VTIP_${ventoy_brower_tip}"
c) Set the "dir" parameter in the "menu_tip" plugin: "/message_1", the same as in paragraph a)

Example:
Code:
vt_tip_dir_id /message_1
submenu "  ventoy browser" --class iconFM --id="DIR_" _VTIP_${ventoy_brower_tip}{
        unset timeout
        set VTOY_MENU_TIP_ENABLE=0
        vt_browser_disk
}

Screenshot of the result of item 3

[attachment=696]

ventoy-mod_1.0.86-linux.tar.gz       ventoy-mod_1.0.86-windows.zip     ventoy-mod_1.0.86-livecd.iso


RE: mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - rahaaatul - 07-25-2023

These give me pointer error when I try to boot:

menu-tip-width: "33%"
menu-tip-align: "right"

Why is that? I'm running the latest version of ventoy?


RE: mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - AlexBryansk - 07-25-2023

This only works in the ventoy mod version.


RE: mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - rahaaatul - 07-26-2023

(07-25-2023, 06:40 PM)AlexBryansk Wrote: This only works in the ventoy mod version.

Are there any downside to it? And is there a latest version for it 1.0.96?

If there is a plan for it, can you add an option to hide Ventoy version info? Eg. 1.0.10 UEFI www.ventoy.net
and an option to auto align Ventoy Menu Tip Plugin to center or left or right?


RE: mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - AssGuard - 07-26-2023

Is it possible to do the same for automation?
I mention about it here:
https://forums.ventoy.net/showthread.php?tid=2532


RE: mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - AlexBryansk - 07-26-2023

for rahaaatul:
The latest version of ventoy is 1.0.94, mod_ventoy 1.0.93.

You can hide information about the Ventoy version, but I won't do it. I think it's more convenient this way.

Automatic alignment of "tip" in the ventoy file.json->menu_tip->align

[attachment=812]

for AssGuard:
Not automatically. But the contents of the file can be autounattended.xml put it in the *.txt file (mod_ventoy supports txt files) or from the autounattended content.xml to make a "tip" for example:
Code:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserData>
<AcceptEula>true</AcceptEula>
<ProductKey>
<Key>xxxxx-xxxxx-xxxxx-xxxxx-xxxxx</Key>
<WillShowUI>OnError</WillShowUI>
</ProductKey>
</UserData>
</component>
</settings>
</unattend>

Remove all quotes " and insert the tilde ~ as a forced line break.
In ventoy.json will turn out:
Code:
            {
                "dir": "/ISO/multiboot",
                "tip": "<?xml version=1.0 encoding=utf-8?>~<unattend xmlns=urn:schemas-microsoft-com:unattend>~<settings pass=windowsPE>~<component name=Microsoft-Windows-Setup processorArchitecture=x86 publicKeyToken=31bf3856ad364e35~ language=neutral versionScope=nonSxS xmlns:wcm=http://schemas.microsoft.com/WMIConfig/2002/State xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance>~<UserData>~<AcceptEula>true</AcceptEula>~<ProductKey>~<Key>xxxxx-xxxxx-xxxxx-xxxxx-xxxxx</Key><WillShowUI>OnError</WillShowUI>~</ProductKey>~</UserData>~</component>~</settings>~</unattend>"
            },

The result is on the directory "/ISO/multiboot" (and you will do it on the image file):[attachment=813]


RE: mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - rahaaatul - 07-27-2023

(07-26-2023, 06:11 PM)AlexBryansk Wrote:
Quote:The latest version of ventoy is 1.0.94, mod_ventoy 1.0.93.


I apologize. My bad.


Quote:You can hide information about the Ventoy version, but I won't do it. I think it's more convenient this way.

I mean, by default, you will keep it on, but give a flexibility to turn it off? That'd be more convenient IMO. Don't you think?


Quote:Automatic alignment of "tip" in the ventoy file.json->menu_tip->align

It's for modded version, no?



RE: mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - AlexBryansk - 07-27-2023

This only works in the ventoy mod version. In the regular version, only 2 lines are supported - there is nothing to align.


RE: mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - rahaaatul - 07-29-2023

(07-27-2023, 11:37 AM)AlexBryansk Wrote: This only works in the ventoy mod version. In the regular version, only 2 lines are supported - there is nothing to align.
I'm talking about aligning the text in screen's center.


RE: mod Ventoy Menu Tip Plugin(Design ventoy 1.0.86) - AlexBryansk - 07-29-2023

for example:
Left = 0%, width = 100%, align = center
or
Left = 10%, width = 80%, align = center
or ...