Skip to content

Latest commit

 

History

History

ToolbarIcons

Toolbar Icons

Framework for adding icons to the toolbar.

API

Add toolbar icons using the Toolbar Icons API.

Assets

Integration is possible via data paths using SMAPI or Content Patcher.

furyx639.ToolbarIcons/Toolbar

Sample content.json:

{
  "Format": "1.24.0",
  "ConfigSchema": {
    "EventLookupHotkey": {
      "AllowBlank": true,
      "Default": "N"
    }
  },
  "Changes": [
    // Load Texture Icons
    {
      "Action": "Load",
      "Target": "example.ModId/Icons",
      "FromFile": "assets/icon.png"
    },

    // Add Event Lookup Icon using Keybind
    {
      "Action": "EditData",
      "Target": "furyx639.ToolbarIcons/Toolbar",
      "Entries": {
        "shekurika.EventLookup/LookupEvents": "{{i18n: button.EventLookup}}/example.ModId\\Icons/0/keybind/{{EventLookupHotkey}}"
      },
      "When": {
        "HasMod": "shekurika.EventLookup"
      }
    },

    // Add Lookup Anything Icon using method
    {
      "Action": "EditData",
      "Target": "furyx639.ToolbarIcons/Toolbar",
      "Entries": {
        "Pathoschild.LookupAnything/ToggleSearch": "{{i18n: button.LookupAnything}/example.ModId\\Icons/1/method/TryToggleSearch"
      },
      "When": {
        "HasMod": "Pathoschild.LookupAnything"
      }
    },

    // Replace texture for Stardew Aquarium icon
    {
      "Action": "EditImage",
      "Target": "furyx639.ToolbarIcons/Icons",
      "FromFile": "assets/aquarium-icon.png",
      "FromArea": {"X": 0, "Y": 0, "Width": 16, "Height": 16},
      "ToArea" {"X": 16, "Y": 0, "Width": 16, "Height": 16}
    }
  ]
}

The data entry is as follows:

Entry Description
Hover Text The text to display when hovering over an icon.1
Texture Path Path to the icon texture.2
Texture Index The position of the texture for this icon.3
Integration Type The type of action for this icon.4
Integration Params Additional parameters depending on the action type.5
  1. Preferably localized text describing the icon's action.
  2. Path must be to a loaded texture asset.
  3. Index goes from left to right for each 16x16 icon.
  4. Supported actions are method or keybind.
  5. Parameters depend on the action type:
    • method the method name, such as TryToggleSearch
    • keybind must include one or more buttons, such as B

Integrations

Some integrations are handled directly by the Toolbar Icons mod which means icons are automatically added for them.

Supported mods

Translations

Language Status Credits
Chinese ❌️ Not Translated
French ✔️ Complete CaranudLapin
German ❌️ Not Translated
Hungarian ❌️ Not Translated
Italian ❌️ Not Translated
Japanese ❌️ Not Translated
Korean ❔ Incomplete wally232
Portuguese] ❌️ Not Translated
Russian ❌️ Not Translated
Spanish ❌️ Not Translated
Turkish ❌️ Not Translated

Credits

Icons created by Tai:

  • Always Scroll Map
  • To-Dew
  • Daily Quests
  • Special Orders