blueprint function
This commit is contained in:
@@ -49,6 +49,12 @@ window.updateSelectionDisplay = function() {
|
||||
}
|
||||
} else if (type === 'market_offer') {
|
||||
labelEl.innerHTML = `🛒 Ρυθμίσεις Παζαριού`;
|
||||
} else if (type === 'blueprints') {
|
||||
if (window.selectedBlueprintName) {
|
||||
labelEl.innerHTML = `📜 ${window.selectedBlueprintName}`;
|
||||
} else {
|
||||
labelEl.innerHTML = `-- Επιλέξτε Blueprint --`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -58,6 +64,22 @@ window.reopenActiveModal = function() {
|
||||
else if (type === 'recruit') window.openUnitModal();
|
||||
else if (type === 'research') window.openAcademyModal();
|
||||
else if (type === 'market_offer') window.openMarketModal();
|
||||
else if (type === 'blueprints') window.openBlueprintsModal();
|
||||
};
|
||||
|
||||
window.selectedBlueprintName = null;
|
||||
window.selectBlueprint = function(name) {
|
||||
window.selectedBlueprintName = name;
|
||||
window.updateSelectionDisplay();
|
||||
window.closeBlueprintsModal();
|
||||
};
|
||||
|
||||
window.openBlueprintsModal = function() {
|
||||
document.getElementById('blueprints-modal-overlay').classList.add('open');
|
||||
};
|
||||
window.closeBlueprintsModal = function(e) {
|
||||
if (e && e.target.id !== 'blueprints-modal-overlay' && !e.target.classList.contains('modal-close')) return;
|
||||
document.getElementById('blueprints-modal-overlay').classList.remove('open');
|
||||
};
|
||||
|
||||
window.openMarketModal = function() {
|
||||
|
||||
Reference in New Issue
Block a user