overwolf.settings

Use the overwolf.settings API to view and modify one of the following Overwolf settings properties:

  • Hotkeys – register a function for a given hotkey, or retrieve an existing hotkey key combination
  • Retrieve the current Overwolf user language
  • Video (i.e., folder location, capture settings, FPS settings, etc.)

You can also use the following helpful URLs to open the Overwolf settings and hotkey windows:

URL What it does
overwolf://settings/
  • A clickable link that opens the Overwolf settings window from your app
overwolf://settings/hotkeys
  • A clickable link that opens the Overwolf Hotkey settings window from your app
overwolf://settings/hotkeys#<local extension hotkey name>
  • A clickable link that opens the Overwolf Hotkey settings window from your app, and then focuses on the stated hotkey. This should be the same hotkey name as written in the manifest.json. Note that this means you can’t focus on Overwolf’s built-in hotkeys or hotkeys of other apps.

Methods

getHotKey(featureId, callback)

Version added: 0.78

Returns the hotkey assigned to a given feature id by calling the callback.

Permissions required: Hotkeys

  • Parameter: featureId <string>

    The feature id for which to get the set hotkey.

  • Parameter: callback <function>

    A function called with the result of the request which contains the hotkey if successful.

Callback argument:
{
    status : "success",
    hotkey : "Ctrl+F2"
}

registerHotKey(actionId, callback)

Version added: 0.78

Registers a callback for a given hotkey action.

If the registration had failed, the callback function will be called immediately with the status "error" and another property,
“error”, indicating the reason for the failure. Otherwise, the callback function will be called when the hotkey is pressed and the status
will be "success". Note that Shift can only be combined with F keys.

Note – If you use a hidden/background window that acts as a controller for the visible windows of the app, you must register the hotkey in that window.

Example

manifest.json:

...
"data": {
    ...
    "hotkeys" : {
        "my_cool_action": {
            "title": "My Cool Action",
            "action-type": "custom",
            "default": "Ctrl+Alt+C"
        }
    }
}
...

code (javascript or html file)

overwolf.settings.registerHotKey(
    "my_cool_action",
    function(arg) {
        if (arg.status == "success") {
            alert("This is my cool action!");
        }
    }
);

Permissions required: Hotkeys

  • Parameter: actionId <string>

    The action id for which to register the callback.

  • Parameter: callback <function>

    The function to run when the hotkey is pressed.

getCurrentOverwolfLanguage(callback)

Version added: 0.85.0

Returns the current language overwolf is set to in a two letter ISO name format.

  • Parameter: callback <function>

Callback argument:
{
    "language": "en"
}

getOverwolfVideosFolder(callback)

Version added: 0.86.0

Returns the current folder overwolf uses to store videos.

  • Parameter: callback <function>

Callback argument:
{
    "status": "success",
    "path": {
        "Value": "E:\Video\Overwolf",
        "Type": "System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
        "Name": "Folders_VideoCapturesFolder"
    }
}

getVideoCaptureSettings(callback)

Version added: 0.86.0

Returns the current video capture settings.

  • Parameter: callback <function>

Callback argument:
{
    "encoder": "NVIDIA_NVENC",
    "preset": "DEFAULT",
    "fps": 30,
    "resolution": 2
}

setFpsSettings(settings, callback)

Version added: 0.89.0

Sets the state (on/off), position, offset (in pixels) and scale [0, 1] of the Fps control.

  • Parameter: settings <fpsSettings>

  • Parameter: callback <function>

getFpsSettings(callback)

Version added: 0.89.0

Gets the status of the FPS control (on/off), its position, its offset (in pixels) and its scale [0, 1].

  • Parameter: callback <function>

Callback argument:
{
    "status": "success",
    "settings": {
        "offset": {
            "x": 0,
            "y": 0
        },
        "scale": 1,
        "enabled": false,
        "position": 0
    }
}

getOverwolfScreenshotsFolder(callback)

Version added: 0.103.1

Returns the current folder Overwolf uses to store screenshots and GIFs

  • Parameter: callback <function>

    A function called with the result of the request which contains the current Overwolf screenshots folder

Callback argument:
{  
   "status":"success",
   "path":{  
      "Value":"C:\Users\USER\Pictures\Overwolf",
      "Type":"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
      "Name":"Folders_ScreenCapturesFolder"
   }
}

Events How to use events

onFpsSettingsChanged

Version added: 0.89.1000

Fired when fps settings are changed.