Line 25: |
Line 25: |
| Themes can be optionally loaded from SD "/config/nx-hbmenu/themes/". The theme (or the default) can be selected using the Theme Menu via the - button. This uses [https://hyperrealm.github.io/libconfig/libconfig_manual.html libconfig]. Default settings will be used for any settings not specified in the theme (including themeInfo). | | Themes can be optionally loaded from SD "/config/nx-hbmenu/themes/". The theme (or the default) can be selected using the Theme Menu via the - button. This uses [https://hyperrealm.github.io/libconfig/libconfig_manual.html libconfig]. Default settings will be used for any settings not specified in the theme (including themeInfo). |
| | | |
− | The file extension is .cfg. Git-only: .romfs is also supported. This is RomFs. With the [[Setting_up_Development_Environment|toolchain]] setup you can run the following to build a .romfs: <code>build_romfs {input directory} {out name}.romfs</code>. The .romfs (and therefore the input directory) contains: '/theme.cfg', optionally '/icon.jpg' for the menu-entry in Theme Menu, and any assets. | + | The file extension is .cfg. .romfs is also supported, this is RomFs. With the [[Setting_up_Development_Environment|toolchain]] setup you can run the following to build a .romfs: <code>build_romfs {input directory} {out name}.romfs</code>. The .romfs (and therefore the input directory) contains: '/theme.cfg', optionally '/icon.jpg' for the menu-entry in Theme Menu, and any assets. |
| | | |
| See [[Homebrew Themes]] for a list of themes. | | See [[Homebrew Themes]] for a list of themes. |
Line 31: |
Line 31: |
| The string used for displaying the buttons/stars can be set with buttonAText, buttonBText, buttonXText, buttonYText, buttonMText, labelStarOnText, and labelStarOffText, but normally these can be left at the defaults. Change the value of the enableWaveBlending field to 1 to enable wave blending. | | The string used for displaying the buttons/stars can be set with buttonAText, buttonBText, buttonXText, buttonYText, buttonMText, labelStarOnText, and labelStarOffText, but normally these can be left at the defaults. Change the value of the enableWaveBlending field to 1 to enable wave blending. |
| | | |
− | There's also borderColor, borderTextColor, and progressBarColor fields which can be set like the other color fields. Git-only: logoColor can be used to set the RGB color of the logo, the alpha component is loaded from the logo image. Git-only: highlightGradientEdgeColor is also available. | + | There's also borderColor, borderTextColor, and progressBarColor fields which can be set like the other color fields. logoColor can be used to set the RGB color of the logo, the alpha component is loaded from the logo image. highlightGradientEdgeColor is also available. |
| | | |
| The color fields are RGBA. | | The color fields are RGBA. |
Line 65: |
Line 65: |
| }; | | }; |
| | | |
− | layout={ // git-only | + | layout={ |
| <object name>={ | | <object name>={ |
| visible=true; | | visible=true; |
Line 78: |
Line 78: |
| }; | | }; |
| | | |
− | assets={ // git-only | + | assets={ |
| <object name>={ | | <object name>={ |
| path = "relative_path_in_romfs"; | | path = "relative_path_in_romfs"; |
Line 237: |
Line 237: |
| The generated menu entry launches the specified app_path where the first passed argument (argv[1] in the launched app) is the absolute filepath for the associated file. See below regarding the icon used for the menu entry. The author and version fields for the menu entry are loaded from app_path, while the name is the filename (unless a directory is being processed, in this case the directory name is used). When {$FILEPATH with extension changed to .nacp} exists, the aforementioned strings will be loaded from there instead. | | The generated menu entry launches the specified app_path where the first passed argument (argv[1] in the launched app) is the absolute filepath for the associated file. See below regarding the icon used for the menu entry. The author and version fields for the menu entry are loaded from app_path, while the name is the filename (unless a directory is being processed, in this case the directory name is used). When {$FILEPATH with extension changed to .nacp} exists, the aforementioned strings will be loaded from there instead. |
| | | |
− | The only optional setting is icon_path. All paths are absolute. Icon will attempted to be loaded from the following: {$FILEPATH with extension changed to .jpg} -> icon_path setting if it exists (target setting -> main file_assoc setting) -> icon from app_path. | + | The only optional setting is icon_path and app_args. All paths are absolute. Icon will attempted to be loaded from the following: {$FILEPATH with extension changed to .jpg} -> icon_path setting if it exists (target setting -> main file_assoc setting) -> icon from app_path. |
| | | |
| If you have targets where file_extension and filename both have the same extension, the filename target should be located before that file_extension target in the cfg. Targets which have both file_extension and filename settings are ignored. Each target must have either a file_extension or filename setting. | | If you have targets where file_extension and filename both have the same extension, the filename target should be located before that file_extension target in the cfg. Targets which have both file_extension and filename settings are ignored. Each target must have either a file_extension or filename setting. |
| + | |
| + | app_args specifies the args to pass following argv[0](app-path). This is an array of strings for each argv[N+1]. If a "%f" token is found (only one per array index is handled), it's replaced with the path for the fileassoc. If no "%f" token is specified or app_args is not specified, the fileassoc path is passed to argv[1]. |
| | | |
| Sample fileassoc file: | | Sample fileassoc file: |
Line 246: |
Line 248: |
| app_path="/switch/myapp/app.nro"; | | app_path="/switch/myapp/app.nro"; |
| icon_path="/switch/myapp/myicon.jpg"; | | icon_path="/switch/myapp/myicon.jpg"; |
| + | app_args = ["arg1", "arg2", "%f"]; |
| | | |
| targets=( | | targets=( |
Line 251: |
Line 254: |
| file_extension=".ext3"; | | file_extension=".ext3"; |
| icon_path="/switch/myapp/myicon2.jpg"; | | icon_path="/switch/myapp/myicon2.jpg"; |
| + | app_args = ["arg1", "arg2", "--path=%f"]; // Optional, overrides fileassoc.app_args. |
| }, | | }, |
| { | | { |