Provinces legend-box

I added a functional legend-box for provinces. Opens when clicked a new button added with standard icon for legends in Provinces editor dialog.
Bonus: Corrected a typo 'cuture'.
This commit is contained in:
Ángel Montero Lamas 2023-12-31 18:56:27 +01:00
parent 845dc893d2
commit 499c48ed16
3 changed files with 17 additions and 4 deletions

View file

@ -434,13 +434,13 @@ function editStateName(state) {
modules.editStateName = true;
// add listeners
byId("stateNameEditorShortCulture").on("click", regenerateShortNameCuture);
byId("stateNameEditorShortCulture").on("click", regenerateShortNameCulture);
byId("stateNameEditorShortRandom").on("click", regenerateShortNameRandom);
byId("stateNameEditorAddForm").on("click", addCustomForm);
byId("stateNameEditorCustomForm").on("change", addCustomForm);
byId("stateNameEditorFullRegenerate").on("click", regenerateFullName);
function regenerateShortNameCuture() {
function regenerateShortNameCulture() {
const state = +stateNameEditor.dataset.state;
const culture = pack.states[state].culture;
const name = Names.getState(Names.getCultureShort(culture), culture);