mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 20:11:24 +01:00
Updated tooltips and fixed culture change from renaming locked burgs and group remove from deleting locked burgs
This commit is contained in:
parent
cb3890a68c
commit
d25d8112da
5 changed files with 30 additions and 9 deletions
|
|
@ -49,6 +49,7 @@ function editBurg(id) {
|
|||
document.getElementById("burgRelocate").addEventListener("click", toggleRelocateBurg);
|
||||
document.getElementById("burglLegend").addEventListener("click", editBurgLegend);
|
||||
document.getElementById("burgLock").addEventListener("click", toggleBurgLockButton);
|
||||
document.getElementById("burgLock").addEventListener("mouseover", showBurgELockTip);
|
||||
document.getElementById("burgRemove").addEventListener("click", removeSelectedBurg);
|
||||
|
||||
function updateBurgValues() {
|
||||
|
|
@ -224,12 +225,12 @@ function editBurg(id) {
|
|||
for (let i=0; i < group.children.length; i++) {
|
||||
burgsInGroup.push(+group.children[i].dataset.id);
|
||||
}
|
||||
const burgsToRemove = burgsInGroup.filter(b => !pack.burgs[b].capital);
|
||||
const burgsToRemove = burgsInGroup.filter(b => !(pack.burgs[b].capital || pack.burgs[b].lock));
|
||||
const capital = burgsToRemove.length < burgsInGroup.length;
|
||||
|
||||
alertMessage.innerHTML = `Are you sure you want to remove
|
||||
${basic || capital ? "all elements in the group" : "the entire burg group"}?
|
||||
<br>Please note that capital burgs will not be deleted.
|
||||
${basic || capital ? "all unlocked elements in the group" : "the entire burg group"}?
|
||||
<br>Please note that capital or locked burgs will not be deleted.
|
||||
<br><br>Burgs to be removed: ${burgsToRemove.length}`;
|
||||
$("#alert").dialog({resizable: false, title: "Remove route group",
|
||||
buttons: {
|
||||
|
|
@ -317,6 +318,11 @@ function editBurg(id) {
|
|||
|
||||
}
|
||||
|
||||
function showBurgELockTip() {
|
||||
const id = +elSelected.attr("data-id");
|
||||
showBurgLockTip(id);
|
||||
}
|
||||
|
||||
function showStyleSection() {
|
||||
document.querySelectorAll("#burgBottom > button").forEach(el => el.style.display = "none");
|
||||
document.getElementById("burgStyleSection").style.display = "inline-block";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue