-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #689 from DanielNoord/update
Update
- Loading branch information
Showing
14 changed files
with
1,747 additions
and
612 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CMOptions } from '../VariablesAndData'; | ||
|
||
/** | ||
* This function updates the display setting of the two objects created by CM.Disp.CreateWrinklerButtons() | ||
* It is called by changes in CM.Options.WrinklerButtons | ||
*/ | ||
export default function ToggleSectionHideButtons() { | ||
if (CMOptions.HideSectionsButtons) { | ||
l('CMSectionHidButtons').style.display = ''; | ||
} else { | ||
l('CMSectionHidButtons').style.display = 'none'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* This function creates two objects at the top of the right column that allowing hiding the upgrade and building section | ||
*/ | ||
export default function CreateSectionHideButtons() { | ||
const div = document.createElement('div'); | ||
div.id = 'CMSectionHidButtons'; | ||
div.style.textAlign = 'center'; | ||
const a = document.createElement('a'); | ||
a.className = 'option'; | ||
a.onclick = function () { | ||
if (l('upgrades').style.display === 'flex') { | ||
l('upgrades').style.display = 'none'; | ||
l('toggleUpgrades').style.display = 'none'; | ||
l('techUpgrades').style.display = 'none'; | ||
l('vaultUpgrades').style.display = 'none'; | ||
} else { | ||
l('upgrades').style.display = 'flex'; | ||
if (l('toggleUpgrades').children.length !== 0) | ||
l('toggleUpgrades').style.display = 'block'; | ||
if (l('techUpgrades').children.length !== 0) | ||
l('techUpgrades').style.display = 'block'; | ||
if (l('vaultUpgrades').children.length !== 0) | ||
l('vaultUpgrades').style.display = 'block'; | ||
} | ||
}; | ||
a.textContent = 'Hide/Show Upgrades'; | ||
div.appendChild(a); | ||
const b = document.createElement('a'); | ||
b.className = 'option'; | ||
b.onclick = function () { | ||
if (l('products').style.display === 'grid') | ||
l('products').style.display = 'none'; | ||
else l('products').style.display = 'grid'; | ||
}; | ||
b.textContent = 'Hide/Show Buildings'; | ||
div.appendChild(b); | ||
l('store').insertBefore(div, l('store').childNodes[2]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters