TheMillsFabula/lang/en.json
trotFunky 22dc500801 Implement Token UI adjustments
Implement the sub-module moving the attribute bars and nameplate
to work well with our dynamic borders.

The attribute bars are moved below the token, one on
top of the other, and the nameplate is moved above.

This is done by monkey patching the `_drawBar()` and
`_refreshNameplate()` functions from the Token class.
This is vulnerable to compatibility issues with other
modules, but is the only way I found for the changes
to be shown without further input.

Indeed, those functions are called after the `drawToken`
hook, which makes it impossible to move those UI elements
there.
We can do it in the `refreshToken` hook, which works *but*
requires the canvas view to be moved at least once for
the position change to be reflected, which looks a bit
broken.

So we monkey patch the functions, but bind them
beforehand to be able to call them within our custom
function as we don't want to duplicate what they do.

Update README and translations for the added setting.
2025-06-01 18:37:22 +01:00

30 lines
910 B
JSON

{
"the-mills-fabula.title": "Fabula Moletrina",
"the-mills-fabula.description": "A module implementing our idiosyncratic ideas for the Mill's campaigns.",
"MF": {
"Border": {
"Settings": {
"BorderEnabled": {
"Name": "Enable borders ?",
"Hint": "Should dynamic combat status borders be displayed ?"
},
"BaseBorder": {
"Name": "Base border",
"Hint": "The image to use as a border for player tokens at all times."
},
"PlayedBorder": {
"Name": "Turn taken border",
"Hint": "The image to use as a border for player tokens that have taken their turn."
}
}
},
"TokenUiAdjust": {
"Settings": {
"Enabled": {
"Name": "Token UI adjustments",
"Hint": "Moves both attribute bars below the token and the nameplate above."
}
}
}
}
}