Skip to content

Commit

Permalink
Merge pull request #594 from Mixelz/exalt-challenge-subtab
Browse files Browse the repository at this point in the history
Exalt UI Overhaul
  • Loading branch information
Pseudonian authored May 29, 2024
2 parents c1ec9df + da40f1b commit bdcdcf3
Show file tree
Hide file tree
Showing 24 changed files with 758 additions and 194 deletions.
91 changes: 78 additions & 13 deletions Synergism.css
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,26 @@ p#transcendhotkeys {
padding: 0;
}

#challengesTabsToggle {
display: flex;
justify-content: center;
flex-flow: wrap;
margin-top: 15px;
margin-bottom: 10px;
gap: 10px 15px;
}

#challengesTabsToggle > button {
min-width: 100px;
text-align: center;
}

.singularityChallenges {
display: flex;
justify-content: center;
column-gap: 4px;
}

#challengesWrapper {
display: flex;
flex-direction: column;
Expand All @@ -1567,14 +1587,23 @@ p#transcendhotkeys {
#challengeIntroduction {
text-align: center;
font-size: 1.2em;
margin: 20px 0 0;
margin-top: 10px;
margin-bottom: 10px;
}

#ExaltIntroduction {
text-align: center;
font-size: 1.2em;
margin-top: 10px;
margin-bottom: 10px;
}

#challengesAutoToggles {
display: flex;
justify-content: center;
flex-flow: wrap;
gap: 10px 15px;
margin-bottom: 10px;
}

#challengesAutoToggles > button {
Expand Down Expand Up @@ -1635,10 +1664,11 @@ p#transcendhotkeys {
}

#challengeDetails {
display: flex;
display: grid;
grid-template-columns: repeat(2, auto);
justify-content: center;
max-width: 1200px;
align-self: center;
margin-top: 10px;
}

#challengeTimers {
Expand Down Expand Up @@ -3545,12 +3575,6 @@ header #obtainiumDisplay { color: pink; }
border: 2px solid blue;
}

.singularityChallenges {
display: flex;
justify-content: center;
column-gap: 4px;
}

.rainbowBorder {
width: 64px;
height: 64px;
Expand All @@ -3570,6 +3594,11 @@ header #obtainiumDisplay { color: pink; }
border-radius: 3px;
}

.rainbowBorder:hover {
cursor: pointer;
background-color: var(--hover-color);
}

.rainbowBorder::before {
position: absolute;
width: 150%; /* 96px */
Expand Down Expand Up @@ -3667,13 +3696,49 @@ img#singularityPerksIcon {
}

#singularityChallengeDetails {
width: 50%;
margin-left: 25%;
display: block;
}

#singularityChallengesMultiline {
#singularityChallengesInfo {
white-space: pre-line;
margin: 15px 0 0;
margin-top: 10px;
margin-bottom: 5px;
text-align: center;
}

#singularityChallengeAllRewards {
display: grid;
grid-template-rows: repeat(2, auto);
grid-template-columns: repeat(2, 375px);
justify-content: center;
grid-gap: 10px;
}

#singularityChallengeScalingHeader {
font-weight: bold;
font-size: 1.2em;
text-align: center;
margin: 0;
}

#singularityChallengeUniqueHeader {
font-weight: bold;
font-size: 1.2em;
text-align: center;
margin: 0;
}

#singularityChallengesScalingRewards {
display: block;
white-space: pre-line;
margin: 0;
text-align: center;
}

#singularityChallengesUniqueRewards {
display: block;
white-space: pre-line;
margin: 0;
}

.newPerk {
Expand Down
71 changes: 40 additions & 31 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,12 @@
</div>

<div id="challenges" style="display: none;">
<div id="challengesWrapper">
<div id="challengesTabsToggle">
<button id="toggleChallengesSubTab1" style="border: 2px solid green; color: white; background-color: crimson" i18n="tabs.challenges.normal"></button>
<button id="toggleChallengesSubTab2" class="singChallenges" style="border: 2px solid purple; color: gold" i18n="tabs.challenges.exalt"></button>
</div>
<!-- You call containers "Steamed Wrappers" despite the fact they contain multiple elements? -->
<div id="challengesWrapper1">
<p id="challengeIntroduction" style="color: white" i18n="challenges.header"></p>
<div id="challengesAutoToggles">
<button class="research150" id="toggleAutoChallengeStart"></button>
Expand Down Expand Up @@ -1655,6 +1660,39 @@
<p class="reincarnationunlock" id="challengewarningreincarnation" i18n="footnotes.challenges.leaveReincarnation"></p>
</div>
</div>
<div id="challengesWrapper2" style="display: none;">
<div id="singularityChallenges">
<div id="singularityChallengeFlavor">
<p id="ExaltIntroduction" i18n="singularityChallenge.intro"></p>
</div>
<div class="singularityChallenges">
<div id="noSingularityUpgradesDiv" class="rainbowBorder">
<img id="noSingularityUpgrades" class="challenge" src="Pictures/Default/ExaltChalNoSingularityUpgrade.png">
</div>
<div id="oneChallengeCapDiv" class="rainbowBorder">
<img id="oneChallengeCap" class="challenge" src="Pictures/Default/ExaltChalOneChallengeCap.png">
</div>
<div id="limitedAscensionsDiv" class="rainbowBorder">
<img id="limitedAscensions" class="challenge" src="Pictures/Default/ExaltChalLimitedAscensions.png">
</div>
<div id="noOcteractsDiv" class="rainbowBorder">
<img id="noOcteracts" class="challenge" src="Pictures/Default/ExaltChalNoOcteracts.png">
</div>
<div id="noAmbrosiaUpgradesDiv" class="rainbowBorder">
<img id="noAmbrosiaUpgrades" class="challenge" src="Pictures/Default/ExaltChalNoAmbrosiaUpgrades.png">
</div>
</div>
<div id="singularityChallengeDetails">
<p id="singularityChallengesInfo"></p>
<div id="singularityChallengeAllRewards">
<p id="singularityChallengeScalingHeader" i18n="singularityChallenge.ScalingHeader"></p>
<p id="singularityChallengeUniqueHeader" i18n="singularityChallenge.UniqueHeader"></p>
<p id="singularityChallengesScalingRewards"></p>
<p id="singularityChallengesUniqueRewards"></p>
</div>
</div>
</div>
</div>
</div>

<div id="research" style="display: none;">
Expand Down Expand Up @@ -3967,8 +4005,7 @@ <h1>Artists</h1>
<button id="toggleSingularitySubTab1" style="border: 2px solid silver; color: white; background-color: crimson" i18n="tabs.main.shop"></button>
<button id="toggleSingularitySubTab2" style="border: 2px solid orange; color: white" i18n="tabs.singularity.perks-penalties"></button>
<button id="toggleSingularitySubTab3" class="octeracts" style="border: 2px solid blue; color: white" i18n="tabs.singularity.octeracts"></button>
<button id="toggleSingularitySubTab4" class="singChallenges" style="border: 2px solid purple; color: gold" i18n="tabs.singularity.exalt"></button>
<button id="toggleSingularitySubTab5" class="ambrosia" style="border: 2px solid #ffbf00; color: gold" i18n="tabs.singularity.ambrosia"></button>
<button id="toggleSingularitySubTab4" class="ambrosia" style="border: 2px solid #ffbf00; color: gold" i18n="tabs.singularity.ambrosia"></button>
</div>

<div id="singularityContainer1">
Expand Down Expand Up @@ -4350,34 +4387,6 @@ <h1>Artists</h1>
</div>

<div id="singularityContainer4" style="display: none;">
<div id="singularityChallenges" class="singularityContainer">
<div id="singularityChallengeFlavor">
<p id="singularityChallengeIntro" i18n="singularityChallenge.intro"></p>
</div>
<div class="singularityChallenges">
<div id="noSingularityUpgradesDiv" class="rainbowBorder">
<img id="noSingularityUpgrades" src="Pictures/Default/ExaltChalNoSingularityUpgrade.png">
</div>
<div id="oneChallengeCapDiv" class="rainbowBorder">
<img id="oneChallengeCap" src="Pictures/Default/ExaltChalOneChallengeCap.png">
</div>
<div id="limitedAscensionsDiv" class="rainbowBorder">
<img id="limitedAscensions" src="Pictures/Default/ExaltChalLimitedAscensions.png">
</div>
<div id="noOcteractsDiv" class="rainbowBorder">
<img id="noOcteracts" src="Pictures/Default/ExaltChalNoOcteracts.png">
</div>
<div id="noAmbrosiaUpgradesDiv" class="rainbowBorder">
<img id="noAmbrosiaUpgrades" src="Pictures/Default/ExaltChalNoAmbrosiaUpgrades.png">
</div>
</div>
<div id="singularityChallengeDetails">
<p id="singularityChallengesMultiline"></p>
</div>
</div>
</div>

<div id="singularityContainer5" style="display: none;">
<div id="singularityAmbrosia" class="singularityContainer">
<div id="ambrosiaDisplay">
<img src="Pictures/Default/Ambrosia.png" loading="lazy">
Expand Down
2 changes: 2 additions & 0 deletions src/CheckVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,8 @@ export const checkVariablesOnLoad = (data: PlayerSave) => {
highestSingularityCompleted,
enabled,
singularityRequirement: singularityChallengeData[k].singularityRequirement,
scalingrewardcount: singularityChallengeData[k].scalingrewardcount,
uniquerewardcount: singularityChallengeData[k].uniquerewardcount,
effect: singularityChallengeData[k].effect,
cacheUpdates: singularityChallengeData[k].cacheUpdates
}
Expand Down
9 changes: 8 additions & 1 deletion src/EventListeners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,13 @@ export const generateEventHandlers = () => {
'input',
() => updateAutoChallenge(3)
)
// Part 3: Subtabs because Mixelz doesn't know what the fuck he's doing
for (let index = 0; index < 2; index++) {
DOMCacheGetOrSet(`toggleChallengesSubTab${index + 1}`).addEventListener(
'click',
() => changeSubTab(Tabs.Challenges, { page: index })
)
}

// RESEARCH TAB
// Part 1: Researches
Expand Down Expand Up @@ -1080,7 +1087,7 @@ TODO: Fix this entire tab it's utter shit
DOMCacheGetOrSet('importBlueberries').addEventListener('change', async (e) => importData(e, importBlueberryTree))

// Toggle subtabs of Singularity tab
for (let index = 0; index < 5; index++) {
for (let index = 0; index < 4; index++) {
DOMCacheGetOrSet(`toggleSingularitySubTab${index + 1}`).addEventListener(
'click',
() => changeSubTab(Tabs.Singularity, { page: index })
Expand Down
1 change: 1 addition & 0 deletions src/ImportExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export const resetGame = async () => {
changeTab(Tabs.Buildings)
changeSubTab(Tabs.Buildings, { page: 0 })
changeSubTab(Tabs.Runes, { page: 0 }) // Set 'runes' subtab back to 'runes' tab
changeSubTab(Tabs.Challenges, { page: 0 }) // Set 'challenges' subtab back to 'normal' tab
changeSubTab(Tabs.WowCubes, { page: 0 }) // Set 'cube tribues' subtab back to 'cubes' tab
changeSubTab(Tabs.Corruption, { page: 0 }) // set 'corruption main'
changeSubTab(Tabs.Singularity, { page: 0 }) // set 'singularity main'
Expand Down
1 change: 1 addition & 0 deletions src/Reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,7 @@ export const singularity = async (setSingNumber = -1): Promise<void> => {
changeTab(Tabs.Buildings)
changeSubTab(Tabs.Buildings, { page: 0 })
changeSubTab(Tabs.Runes, { page: 0 }) // Set 'runes' subtab back to 'runes' tab
changeSubTab(Tabs.Challenges, { page: 0 }) // Set 'challenges' subtab back to 'normal' tab
changeSubTab(Tabs.WowCubes, { page: 0 }) // Set 'cube tribues' subtab back to 'cubes' tab
changeSubTab(Tabs.Corruption, { page: 0 }) // set 'corruption main'
changeSubTab(Tabs.Singularity, { page: 0 }) // set 'singularity main'
Expand Down
Loading

0 comments on commit bdcdcf3

Please sign in to comment.