From 006ff4641a928f9b0a1dda56b9961a968c4b0dbc Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sat, 15 Aug 2020 02:16:22 -0400 Subject: [PATCH] update tabbar as part of App UI --- src/Mods/SecExp/attackOptions.tw | 12 +++---- src/Mods/SecExp/buildings/secBarracks.tw | 10 +++--- src/Mods/SecExp/edicts.tw | 6 ++-- src/Mods/SpecialForce/Firebase.tw | 8 ++--- src/endWeek/reports/childrenReport.js | 6 ++-- src/endWeek/saWhore.js | 4 +-- src/events/intro/introSummary.tw | 10 +++--- src/facilities/nursery/nursery.tw | 6 ++-- src/gui/multipleInspect.js | 10 +++--- src/gui/options/options.tw | 12 +++---- src/interaction/policies/policies.tw | 14 ++++---- src/js/rulesAssistantOptions.js | 4 +-- src/js/slaveListing.js | 42 +++++++++++----------- src/js/utilsSC.js | 4 +-- src/npc/slaveStats.tw | 14 ++++---- src/npc/startingGirls/startingGirls.tw | 18 +++++----- src/personalAssistant/assistantOptions.tw | 8 ++--- src/uncategorized/economics.tw | 18 +++++----- src/uncategorized/remoteSurgery.tw | 14 ++++---- src/uncategorized/slaveInteract.tw | 20 +++++------ src/uncategorized/underperformingSlaves.tw | 6 ++-- 21 files changed, 123 insertions(+), 123 deletions(-) diff --git a/src/Mods/SecExp/attackOptions.tw b/src/Mods/SecExp/attackOptions.tw index 8ea89c1acba..99fcedc2136 100644 --- a/src/Mods/SecExp/attackOptions.tw +++ b/src/Mods/SecExp/attackOptions.tw @@ -216,8 +216,8 @@ approximately <strong><<print _estimatedMen>> men</strong> are coming, they seem <</link>> <</if>> <br>For this battle you choose to follow <span id="tactic"><strong><<print $chosenTactic>></strong></span> tactics.<br> -<button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'defensiveTactics')" id="tab defensive tactics">Defensive tactics</button> -<button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'offensiveTactics')" id="tab offensiveTactics">Offensive Tactics</button> +<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'defensiveTactics')" id="tab defensive tactics">Defensive tactics</button> +<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'offensiveTactics')" id="tab offensiveTactics">Offensive Tactics</button> <div id="defensiveTactics" class="tab-content"> <div class="content"> @@ -407,7 +407,7 @@ approximately <strong><<print _estimatedMen>> men</strong> are coming, they seem <<set _sL = $slaveUnits.length>> <<set _meL = $mercUnits.length>> -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.Options)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.Options)>> <<if App.SecExp.battle.deployableUnits() === 0>> <strong>Unit roster full.</strong> <</if>> <<if $secBots.active == 1 && $secBots.troops > 0>> @@ -424,13 +424,13 @@ approximately <strong><<print _estimatedMen>> men</strong> are coming, they seem <br><br> <</if>> <<if $militiaUnits.length > 0>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'militia')" id="tab militia">Militia: ($militiaUnits.length)</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'militia')" id="tab militia">Militia: ($militiaUnits.length)</button> <</if>> <<if $slaveUnits.length > 0>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'slaves')" id="tab slaves">Slaves: ($slaveUnits.length)</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'slaves')" id="tab slaves">Slaves: ($slaveUnits.length)</button> <</if>> <<if $mercUnits.length > 0>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'mercs')" id="tab mercs">Mercs: ($mercUnits.length)</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'mercs')" id="tab mercs">Mercs: ($mercUnits.length)</button> <</if>> <div id="militia" class="tab-content"> diff --git a/src/Mods/SecExp/buildings/secBarracks.tw b/src/Mods/SecExp/buildings/secBarracks.tw index a61e40b4519..a6aea39b054 100644 --- a/src/Mods/SecExp/buildings/secBarracks.tw +++ b/src/Mods/SecExp/buildings/secBarracks.tw @@ -140,17 +140,17 @@ Your current maximum number of units is <<print App.SecExp.battle.maxUnits()>> ( <</if>> <div class="tab-bar"> <<if $arcologyUpgrade.drones == 1>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Bots')" id="tab Bots">Security Drones</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Bots')" id="tab Bots">Security Drones</button> <</if>> <<if $SecExp.edicts.defense.militia >= 1>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Militia')" id="tab Militia">Militia: ($militiaUnits.length)</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Militia')" id="tab Militia">Militia: ($militiaUnits.length)</button> <</if>> <<if $mercenaries >= 1>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Mercs')" id="tab Mercs">Mercenaries: ($mercUnits.length)</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Mercs')" id="tab Mercs">Mercenaries: ($mercUnits.length)</button> <</if>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Slaves')" id="tab Slaves">Slaves: ($slaveUnits.length)</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Slaves')" id="tab Slaves">Slaves: ($slaveUnits.length)</button> </div> -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.secBarracks)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.secBarracks)>> <div id="Bots" class="tab-content"> <div class="content"> <<set _secBotsCost = 500, _secBotsUpgradeCost = 250>> diff --git a/src/Mods/SecExp/edicts.tw b/src/Mods/SecExp/edicts.tw index 957ac456ce0..e5b288c13b9 100644 --- a/src/Mods/SecExp/edicts.tw +++ b/src/Mods/SecExp/edicts.tw @@ -3,11 +3,11 @@ <<set $nextButton = "Back", $nextLink = "Main">> //Passing any edict will cost <<print cashFormat(5000)>> and some authority. More edicts will become available as the arcology develops.// -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.edicts)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.edicts)>> <br> -<button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Society')" id="tab Society">Society</button> +<button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Society')" id="tab Society">Society</button> <<if $battlesCount > 0 || $rebellionsCount > 0 || $mercenaries > 0>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Military')" id="tab Military">Military</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Military')" id="tab Military">Military</button> <</if>> <div id="Society" class="tab-content"> diff --git a/src/Mods/SpecialForce/Firebase.tw b/src/Mods/SpecialForce/Firebase.tw index a477569fe83..f337cb84471 100644 --- a/src/Mods/SpecialForce/Firebase.tw +++ b/src/Mods/SpecialForce/Firebase.tw @@ -27,13 +27,13 @@ <</if>> <<if $SF.FS.Tension !== -1>> The Colonel's current Tension: $SF.FS.Tension<</if>> - <<run App.UI.tabbar.handlePreSelectedTab($tabChoice.Firebase)>> + <<run App.UI.tabBar.handlePreSelectedTab($tabChoice.Firebase)>> <div class="tab-bar"> <<if _size !== _max>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Upgrades')" id="tab Upgrades">Upgrades</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Upgrades')" id="tab Upgrades">Upgrades</button> <</if>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Actions')" id="tab Actions">Actions</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'FS')" id="tab FS">Future Societies</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Actions')" id="tab Actions">Actions</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'FS')" id="tab FS">Future Societies</button> </div> <div id="Upgrades" class="tab-content"> diff --git a/src/endWeek/reports/childrenReport.js b/src/endWeek/reports/childrenReport.js index 29f67ea80a0..beb2314a3ab 100644 --- a/src/endWeek/reports/childrenReport.js +++ b/src/endWeek/reports/childrenReport.js @@ -177,8 +177,8 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { if (V.nurseryWeight) { const - caretaker = Matron ? Matron.slaveName : NL > 1 ? `A nanny` : firstNanny.slaveName, - firstNanny = NL > 0 ? nannies[0] : null; + firstNanny = NL > 0 ? nannies[0] : null, + caretaker = Matron ? Matron.slaveName : NL > 1 ? `A nanny` : firstNanny.slaveName; if (V.nurseryWeightSetting === 1) { const weightSpan = App.UI.DOM.makeElement("span", 'rapid weight gain.', ["health", "dec"]); @@ -235,8 +235,8 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { // FIXME: this entire section needs a rewrite - numbers and text don't line up at all if (V.nurseryMuscles) { const - caretaker = Matron ? Matron.slaveName : NL > 1 ? `A nanny` : firstNanny.slaveName, firstNanny = NL > 0 ? nannies[0] : null, + caretaker = Matron ? Matron.slaveName : NL > 1 ? `A nanny` : firstNanny.slaveName, {His, He, he} = getPronouns(child); diff --git a/src/endWeek/saWhore.js b/src/endWeek/saWhore.js index 18970a8cfc5..b6433a237d2 100644 --- a/src/endWeek/saWhore.js +++ b/src/endWeek/saWhore.js @@ -400,10 +400,10 @@ App.SlaveAssignment.whore = (function() { } else { let canA = canDoAnal(slave); let canV = canDoVaginal(slave); - let skilltarget = (100 + ((slave.skill.anal - 100)*canA*(1.5 - 0.5*canV) + (slave.skill.vaginal - 100)*canV*(1.5 - 0.5*canA) + (slave.skill.oral - 100)*(3 - 1.5*canA - 1.5*canV + canA*canV))*3/10); + let skillTarget = (100 + ((slave.skill.anal - 100)*canA*(1.5 - 0.5*canV) + (slave.skill.vaginal - 100)*canV*(1.5 - 0.5*canA) + (slave.skill.oral - 100)*(3 - 1.5*canA - 1.5*canV + canA*canV))*3/10); // Complicated, I know - but it should automatically account for what acts are possible to scale the injury risk smoothly between 90% when totally unskilled // and 0% when perfectly skilled in the relevant method or methods. - if (jsRandom(1, 100) > skilltarget) { + if (jsRandom(1, 100) > skillTarget) { healthDamage(slave, 10 - 7 * canA * canV); // Any limitations means an injury inflicts the harsher 10 instead of 3 injury = 1; } diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw index b687c9ffb8d..eb834a391a4 100644 --- a/src/events/intro/introSummary.tw +++ b/src/events/intro/introSummary.tw @@ -95,13 +95,13 @@ You may review your settings before clicking "Continue" to begin.<br> <br><br> -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.IntroSummary)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.IntroSummary)>> <div class="tab-bar"> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'World')" id="tab World">World</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'slaves')" id="tab slaves">Slaves</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'PC')" id="tab PC">Player Character</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'UI')" id="tab UI">UI</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'World')" id="tab World">World</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'slaves')" id="tab slaves">Slaves</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'PC')" id="tab PC">Player Character</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'UI')" id="tab UI">UI</button> </div> <div id="UI" class="tab-content"> diff --git a/src/facilities/nursery/nursery.tw b/src/facilities/nursery/nursery.tw index 6839ea7c9e4..04ef01841b3 100644 --- a/src/facilities/nursery/nursery.tw +++ b/src/facilities/nursery/nursery.tw @@ -97,9 +97,9 @@ </p> <div class="tab-bar"> - /* <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'nannies')" id="tab nannies">Nannies</button> */ - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'pregnantSlaves')" id="tab pregnantSlaves">Pregnant Slaves</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'children')" id="tab children">Children</button> + /* <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'nannies')" id="tab nannies">Nannies</button> */ + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'pregnantSlaves')" id="tab pregnantSlaves">Pregnant Slaves</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'children')" id="tab children">Children</button> </div> /* diff --git a/src/gui/multipleInspect.js b/src/gui/multipleInspect.js index f4c106b7f58..d2b416661c6 100644 --- a/src/gui/multipleInspect.js +++ b/src/gui/multipleInspect.js @@ -12,22 +12,22 @@ App.UI.MultipleInspect = (function() { const tabbar = App.UI.DOM.appendNewElement("div", frag, "", "tab-bar"); for (const slave of slaves) { - tabbar.append(App.UI.tabbar.tabButtonDOM(`slave${slave.ID}`, slave.slaveName)); - frag.append(App.UI.tabbar.makeTabDOM(`slave${slave.ID}`, App.Desc.longSlave(slave, {market: market}))); + tabbar.append(App.UI.tabBar.tabButtonDOM(`slave${slave.ID}`, slave.slaveName)); + frag.append(App.UI.tabBar.makeTabDOM(`slave${slave.ID}`, App.Desc.longSlave(slave, {market: market}))); } if (slaves.length > 1 && showFamilyTree) { - const button = App.UI.tabbar.tabButtonDOM(`familyTreeTab`, "Family Tree"); + const button = App.UI.tabBar.tabButtonDOM(`familyTreeTab`, "Family Tree"); button.addEventListener('click', event => { renderFamilyTree(slaves, slaves[0].ID); }); tabbar.append(button); const ftTarget = document.createElement("div"); ftTarget.setAttribute("id", "familyTree"); - frag.append(App.UI.tabbar.makeTabDOM(`familyTreeTab`, ftTarget)); + frag.append(App.UI.tabBar.makeTabDOM(`familyTreeTab`, ftTarget)); } - App.UI.tabbar.handlePreSelectedTab(`slave${slaves[0].ID}`); + App.UI.tabBar.handlePreSelectedTab(`slave${slaves[0].ID}`); return frag; } diff --git a/src/gui/options/options.tw b/src/gui/options/options.tw index 8be4120ed3b..84ff75f2981 100644 --- a/src/gui/options/options.tw +++ b/src/gui/options/options.tw @@ -67,14 +67,14 @@ <</if>> <br> -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.Options)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.Options)>> <div class="tab-bar"> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Display')" id="tab Display">Display</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'CONTENT&FLAVOR')" id="tab CONTENT&FLAVOR">Content & flavour</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'MODS')" id="tab MODS">Mods</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'DEBUG/CHEATING')" id="tab DEBUG/CHEATING">Debug/cheating</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Experimental')" id="tab Experimental">Experimental</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Display')" id="tab Display">Display</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'CONTENT&FLAVOR')" id="tab CONTENT&FLAVOR">Content & flavour</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'MODS')" id="tab MODS">Mods</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'DEBUG/CHEATING')" id="tab DEBUG/CHEATING">Debug/cheating</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Experimental')" id="tab Experimental">Experimental</button> </div> <div id="Display" class="tab-content"> diff --git a/src/interaction/policies/policies.tw b/src/interaction/policies/policies.tw index 260306b0563..f6c39c1b1cb 100644 --- a/src/interaction/policies/policies.tw +++ b/src/interaction/policies/policies.tw @@ -17,7 +17,7 @@ <</if>> <<set $encyclopedia = "Future Societies">> -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.policies)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.policies)>> <p class="scene-intro"> Passing any law will cost <<print cashFormat(5000)>> and <<if $rep >= 1000>> @@ -28,12 +28,12 @@ More policies will become available as the arcology develops. </p> <div class="tab-bar"> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'SMRs')" id="tab SMRs">Slave Market Regulations</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'ST')" id="tab ST">Sexual Trendsetting</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Population')" id="tab Population">Population & Domestic</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Education')" id="tab Education">Education</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'FS')" id="tab FS">Future Societies</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'SRP')" id="tab SRP">Slave Retirement Planning</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'SMRs')" id="tab SMRs">Slave Market Regulations</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'ST')" id="tab ST">Sexual Trendsetting</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Population')" id="tab Population">Population & Domestic</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Education')" id="tab Education">Education</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'FS')" id="tab FS">Future Societies</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'SRP')" id="tab SRP">Slave Retirement Planning</button> </div> <div id="SMRs" class="tab-content"> diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index a12f0ca42cc..e319424bb03 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -225,7 +225,7 @@ globalThis.rulesAssistantOptions = (function() { btn.className = "tab-links"; btn.id = `tab ${name}`; btn.innerHTML = text; - btn.onclick = (event) => App.UI.tabbar.openTab(event, name); + btn.onclick = (event) => App.UI.tabBar.openTab(event, name); return btn; } } @@ -1072,7 +1072,7 @@ globalThis.rulesAssistantOptions = (function() { this.appendChild(new RuleOptions(this)); this.appendChild(new ConditionEditor(this)); this.appendChild(new EffectEditor(this)); - App.UI.tabbar.handlePreSelectedTab("appearance", true); + App.UI.tabBar.handlePreSelectedTab("appearance", true); } render(element) { diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js index f6df4dfb166..e523ff4c97d 100644 --- a/src/js/slaveListing.js +++ b/src/js/slaveListing.js @@ -624,20 +624,20 @@ App.UI.SlaveList.listSJFacilitySlaves = function(facility, facilityPassage, show } const tabbar = App.UI.DOM.appendNewElement("div", frag, '', "tab-bar"); tabbar.append( - App.UI.tabbar.tabButtonDOM('assign', tabCaptions.assign), - App.UI.tabbar.tabButtonDOM('remove', tabCaptions.remove), - (showTransfersTab ? App.UI.tabbar.tabButtonDOM('transfer', tabCaptions.transfer) : '') + App.UI.tabBar.tabButtonDOM('assign', tabCaptions.assign), + App.UI.tabBar.tabButtonDOM('remove', tabCaptions.remove), + (showTransfersTab ? App.UI.tabBar.tabButtonDOM('transfer', tabCaptions.transfer) : '') ); const facilitySlaves = [...job.employeesIDs()]; if (facilitySlaves.length > 0) { SlaveSort.IDs(facilitySlaves); - frag.append(App.UI.tabbar.makeTabDOM("remove", App.UI.SlaveList.render(facilitySlaves, [], + frag.append(App.UI.tabBar.makeTabDOM("remove", App.UI.SlaveList.render(facilitySlaves, [], App.UI.SlaveList.SlaveInteract.stdInteract, (slave) => App.UI.DOM.link(`Retrieve ${getPronouns(slave).object} from ${facility.name}`, () => removeJob(slave, job.desc.assignment), [], facilityPassage) ))); } else { - frag.append(App.UI.tabbar.makeTabDOM("remove", App.UI.DOM.makeElement("em", `${capFirstChar(facility.name)} is empty for the moment`))); + frag.append(App.UI.tabBar.makeTabDOM("remove", App.UI.DOM.makeElement("em", `${capFirstChar(facility.name)} is empty for the moment`))); } /** @@ -664,9 +664,9 @@ App.UI.SlaveList.listSJFacilitySlaves = function(facility, facilityPassage, show const assignableSlaveIDs = job.desc.partTime ? V.slaves.map(slave => slave.ID) : // all slaves can work here [...App.Entity.facilities.penthouse.employeesIDs()]; // only slaves from the penthouse can be transferred here - frag.append(App.UI.tabbar.makeTabDOM("assign", assignableTabContent(assignableSlaveIDs))); + frag.append(App.UI.tabBar.makeTabDOM("assign", assignableTabContent(assignableSlaveIDs))); } else { - frag.append(App.UI.tabbar.makeTabDOM("assign", App.UI.DOM.makeElement("strong", `${capFirstChar(facility.name)} is full and cannot hold any more slaves`))); + frag.append(App.UI.tabBar.makeTabDOM("assign", App.UI.DOM.makeElement("strong", `${capFirstChar(facility.name)} is full and cannot hold any more slaves`))); } if (showTransfersTab) { @@ -678,12 +678,12 @@ App.UI.SlaveList.listSJFacilitySlaves = function(facility, facilityPassage, show } return acc; }, []); - frag.append(App.UI.tabbar.makeTabDOM("transfer", assignableTabContent(transferableIDs))); + frag.append(App.UI.tabBar.makeTabDOM("transfer", assignableTabContent(transferableIDs))); } else { - frag.append(App.UI.tabbar.makeTabDOM("transfer", App.UI.DOM.makeElement("strong", `${capFirstChar(facility.name)} is full and cannot hold any more slaves`))); + frag.append(App.UI.tabBar.makeTabDOM("transfer", App.UI.DOM.makeElement("strong", `${capFirstChar(facility.name)} is full and cannot hold any more slaves`))); } } - App.UI.tabbar.handlePreSelectedTab(); + App.UI.tabBar.handlePreSelectedTab(); return frag; }; @@ -712,8 +712,8 @@ App.UI.SlaveList.listNGPSlaves = function() { frag.append(this.sortingLinks(thisPassage)); const tabbar = App.UI.DOM.appendNewElement("div", frag, '', "tab-bar"); tabbar.append( - App.UI.tabbar.tabButtonDOM('assign', "Import a slave"), - App.UI.tabbar.tabButtonDOM('remove', "Remove from import") + App.UI.tabBar.tabButtonDOM('assign', "Import a slave"), + App.UI.tabBar.tabButtonDOM('remove', "Remove from import") ); let imported = []; @@ -732,25 +732,25 @@ App.UI.SlaveList.listNGPSlaves = function() { if (imported.length > 0) { SlaveSort.IDs(imported); - frag.append(App.UI.tabbar.makeTabDOM("remove", App.UI.SlaveList.render(imported, [], + frag.append(App.UI.tabBar.makeTabDOM("remove", App.UI.SlaveList.render(imported, [], App.UI.SlaveList.makeNameDecorator(["emphasizedSlave", "pink"]), (s) => App.UI.DOM.passageLink('Remove from import list', thisPassage, () => removeJob(s, Job.IMPORTED)) ))); } else { - frag.append(App.UI.tabbar.makeTabDOM("remove", App.UI.DOM.makeElement('em', "No slaves will go with you to the new game"))); + frag.append(App.UI.tabBar.makeTabDOM("remove", App.UI.DOM.makeElement('em', "No slaves will go with you to the new game"))); } if (imported.length < V.slavesToImportMax) { SlaveSort.IDs(nonImported); - frag.append(App.UI.tabbar.makeTabDOM("assign", App.UI.SlaveList.render(nonImported, [], + frag.append(App.UI.tabBar.makeTabDOM("assign", App.UI.SlaveList.render(nonImported, [], App.UI.SlaveList.makeNameDecorator(["emphasizedSlave", "pink"]), (s) => App.UI.DOM.passageLink('Add to import list', thisPassage, () => assignJob(s, Job.IMPORTED)) ))); } else { - frag.append(App.UI.tabbar.makeTabDOM("assign", App.UI.DOM.makeElement('strong', `Slave import limit reached`))); + frag.append(App.UI.tabBar.makeTabDOM("assign", App.UI.DOM.makeElement('strong', `Slave import limit reached`))); } - App.UI.tabbar.handlePreSelectedTab(); + App.UI.tabBar.handlePreSelectedTab(); return frag; }; @@ -1036,12 +1036,12 @@ App.UI.SlaveList.penthousePage = function() { if (V.useSlaveSummaryTabs === 0) { const links = []; for (const tab of tabs) { - links.push(App.UI.tabbar.tabButtonDOM(tab.tabName, tab.caption, true)); + links.push(App.UI.tabBar.tabButtonDOM(tab.tabName, tab.caption, true)); } div.append(App.UI.DOM.arrayToList(links, " | ", " | ")); } else { for (const tab of tabs) { - const button = App.UI.tabbar.tabButtonDOM(tab.tabName, tab.caption); + const button = App.UI.tabBar.tabButtonDOM(tab.tabName, tab.caption); if (V.useSlaveSummaryTabs === 2) { button.classList.add("card"); } @@ -1051,7 +1051,7 @@ App.UI.SlaveList.penthousePage = function() { fragment.append(div); for (const tab of tabs) { - const div = App.UI.tabbar.makeTabDOM(tab.tabName, tab.content); + const div = App.UI.tabBar.makeTabDOM(tab.tabName, tab.content); if (V.useSlaveSummaryTabs === 0) { div.classList.add("noFade"); } else if (V.useSlaveSummaryTabs === 2) { @@ -1064,7 +1064,7 @@ App.UI.SlaveList.penthousePage = function() { fragment.append(App.UI.DOM.makeElement("div", App.UI.View.mainLinks(), "center")); } - App.UI.tabbar.handlePreSelectedTab(); + App.UI.tabBar.handlePreSelectedTab(); return fragment; }; diff --git a/src/js/utilsSC.js b/src/js/utilsSC.js index 3e2f679fc2a..50d0a12b444 100644 --- a/src/js/utilsSC.js +++ b/src/js/utilsSC.js @@ -143,7 +143,7 @@ App.UI.htag = function(text, attributes, tag = 'div') { return `<${tag} ${attributes}>${payload}</${tag}>`; }; -App.UI.tabbar = function() { +App.UI.tabBar = function() { return { openTab: openTab, tabButton: tabButton, @@ -175,7 +175,7 @@ App.UI.tabbar = function() { * @returns {string} */ function tabButton(name, text) { - return `<button class="tab-links" onclick="App.UI.tabbar.openTab(event, '${name}')" id="tab ${name}">${text}</button>`; + return `<button class="tab-links" onclick="App.UI.tabBar.openTab(event, '${name}')" id="tab ${name}">${text}</button>`; } /** diff --git a/src/npc/slaveStats.tw b/src/npc/slaveStats.tw index 5a72a97d45f..40240ea24d7 100644 --- a/src/npc/slaveStats.tw +++ b/src/npc/slaveStats.tw @@ -72,13 +72,13 @@ Expenses: <<= num($activeSlave.lastWeeksRepExpenses)>>, Income: <<= num($activeSlave.lastWeeksRepIncome)>> <div class="tab-bar"> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Skills')" id="tab Skills">Skills</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Mental')" id="tab Mental">Mental</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Body')" id="tab Body">Body</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Porn')" id="tab Porn">Porn</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Implants_Piercings_Tattoos')" id="tab Implants_Piercings_Tattoos">Implants, piercings & tattoos</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Family')" id="tab Family">Family</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Misc')" id="tab Misc">Misc</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Skills')" id="tab Skills">Skills</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Mental')" id="tab Mental">Mental</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Body')" id="tab Body">Body</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Porn')" id="tab Porn">Porn</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Implants_Piercings_Tattoos')" id="tab Implants_Piercings_Tattoos">Implants, piercings & tattoos</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Family')" id="tab Family">Family</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Misc')" id="tab Misc">Misc</button> </div> <div id="Skills" class="tab-content"> diff --git a/src/npc/startingGirls/startingGirls.tw b/src/npc/startingGirls/startingGirls.tw index 766d6a7c7af..9ddd751a3e3 100644 --- a/src/npc/startingGirls/startingGirls.tw +++ b/src/npc/startingGirls/startingGirls.tw @@ -151,7 +151,7 @@ </p> <</if>> -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.StartingGirls)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.StartingGirls)>> <<if !$activeSlave>> <<set $activeSlave = App.StartingGirls.generate()>> @@ -365,16 +365,16 @@ <h2>You are customizing this slave:</h2> <<includeDOM App.Desc.longSlave(V.activeSlave, {market: "generic"})>> <div class="tab-bar"> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Overview')" id="tab Overview">Overview</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Physical')" id="tab Physical">Physical</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Mental')" id="tab Mental">Mental</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Skills')" id="tab Skills">Skills</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Family', App.StartingGirls.uncommittedFamilyTree(V.activeSlave))" id="tab Family">Family</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Customization')" id="tab Customization">Customization</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Overview')" id="tab Overview">Overview</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Physical')" id="tab Physical">Physical</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Mental')" id="tab Mental">Mental</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Skills')" id="tab Skills">Skills</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Family', App.StartingGirls.uncommittedFamilyTree(V.activeSlave))" id="tab Family">Family</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Customization')" id="tab Customization">Customization</button> <<if $cash >= _slaveCost>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'assignRemove')" id="tab assignRemove">Finalize</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'assignRemove')" id="tab assignRemove">Finalize</button> <<else>> - <button class="tab-links, show-warning" onclick="App.UI.tabbar.openTab(event, 'assignRemove')" id="tab assignRemove">Finalize</button> + <button class="tab-links, show-warning" onclick="App.UI.tabBar.openTab(event, 'assignRemove')" id="tab assignRemove">Finalize</button> <</if>> </div> diff --git a/src/personalAssistant/assistantOptions.tw b/src/personalAssistant/assistantOptions.tw index 3b5819c7501..47c842bd6ff 100644 --- a/src/personalAssistant/assistantOptions.tw +++ b/src/personalAssistant/assistantOptions.tw @@ -27,13 +27,13 @@ Seated at your desk, you glance at the visual representation of <</if>> <br><br> -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.Assistant)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.Assistant)>> <div class="tab-bar"> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'upgrades')" id="tab upgrades">Computer Core Upgrades</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'upgrades')" id="tab upgrades">Computer Core Upgrades</button> <<if $week >= 11>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'settings')" id="tab settings">Settings</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'settings')" id="tab settings">Settings</button> <<if $assistant.personality != 0>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'appearance')" id="tab appearance">Appearance</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'appearance')" id="tab appearance">Appearance</button> <</if>> <</if>> </div> diff --git a/src/uncategorized/economics.tw b/src/uncategorized/economics.tw index 6921cffd81d..4a93c66ac5d 100644 --- a/src/uncategorized/economics.tw +++ b/src/uncategorized/economics.tw @@ -49,22 +49,22 @@ <body> <div class="tab-bar"> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Arcologies')" id="defaultOpen">Arcologies</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Management')">Arcology Management</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Arcologies')" id="defaultOpen">Arcologies</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Management')">Arcology Management</button> <<if $FSAnnounced > 0>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Societies')">Society Development</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Societies')">Society Development</button> <</if>> <<if $corp.Incorporated == 1>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Corporation')">Corporation Developments</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Corporation')">Corporation Developments</button> <</if>> <<if $secExpEnabled > 0>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Authority')">Authority</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'securityReport')">Security</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Authority')">Authority</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'securityReport')">Security</button> <</if>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Reputation')">Reputation</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Business')">Personal Business</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Reputation')">Reputation</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Business')">Personal Business</button> <<if $PC.boobs >= 1000 || $PC.pregKnown == 1 || $playerAging != 0>> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Personal')">Personal Notes</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Personal')">Personal Notes</button> <</if>> </div> diff --git a/src/uncategorized/remoteSurgery.tw b/src/uncategorized/remoteSurgery.tw index b314d960197..e8aaf17222e 100644 --- a/src/uncategorized/remoteSurgery.tw +++ b/src/uncategorized/remoteSurgery.tw @@ -26,7 +26,7 @@ })>> <</if>> -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.RemoteSurgery)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.RemoteSurgery)>> <h1>The Remote Surgery</h1> @@ -63,12 +63,12 @@ </div> <div class="tab-bar"> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'hairFace')" id="tab hairFace">Hair and Face</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'upper')" id="tab upper">Upper</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'lower')" id="tab lower">Lower</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Race')" id="tab Race">Race</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Structural')" id="tab Structural">Structural</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'ExtremeSurgery')" id="tab ExtremeSurgery">Extreme Surgery</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'hairFace')" id="tab hairFace">Hair and Face</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'upper')" id="tab upper">Upper</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'lower')" id="tab lower">Lower</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Race')" id="tab Race">Race</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Structural')" id="tab Structural">Structural</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'ExtremeSurgery')" id="tab ExtremeSurgery">Extreme Surgery</button> </div> <div id="hairFace" class="tab-content"> diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index 88216e869af..c80382f4ac8 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -12,7 +12,7 @@ } </style> -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.SlaveInteract)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.SlaveInteract)>> <<if !assignmentVisible(getSlave($AS))>> @@ -81,15 +81,15 @@ </span> </p> <div class="tab-bar"> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Description'), jQuery('#LSD').empty().append(App.Desc.longSlave(getSlave(V.activeSlave.ID)))" id="tab Description">Description</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Modify')" id="tab Modify">Modify</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Work')" id="tab Work">Work</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Appearance'), App.UI.Wardrobe.refreshAll(getSlave(V.activeSlave.ID))" id="tab Appearance">Appearance</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'PhysicalRegimen')" id="tab PhysicalRegimen">Physical Regimen</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Rules')" id="tab Rules">Rules</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Financial')" id="tab Financial">Financial</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'Customize'), App.UI.SlaveInteract.custom(getSlave(V.activeSlave.ID))" id="tab Customize">Customize</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'FamilyTab'), renderFamilyTree(V.slaves, V.activeSlave.ID)" id="tab FamilyTab">Family</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Description'), jQuery('#LSD').empty().append(App.Desc.longSlave(getSlave(V.activeSlave.ID)))" id="tab Description">Description</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Modify')" id="tab Modify">Modify</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Work')" id="tab Work">Work</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Appearance'), App.UI.Wardrobe.refreshAll(getSlave(V.activeSlave.ID))" id="tab Appearance">Appearance</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'PhysicalRegimen')" id="tab PhysicalRegimen">Physical Regimen</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Rules')" id="tab Rules">Rules</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Financial')" id="tab Financial">Financial</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Customize'), App.UI.SlaveInteract.custom(getSlave(V.activeSlave.ID))" id="tab Customize">Customize</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'FamilyTab'), renderFamilyTree(V.slaves, V.activeSlave.ID)" id="tab FamilyTab">Family</button> </div> <div id="art-frame"> diff --git a/src/uncategorized/underperformingSlaves.tw b/src/uncategorized/underperformingSlaves.tw index 9effeb9039a..bac53061bf5 100644 --- a/src/uncategorized/underperformingSlaves.tw +++ b/src/uncategorized/underperformingSlaves.tw @@ -19,10 +19,10 @@ <</if>> </div> </p> -<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.Options)>> +<<run App.UI.tabBar.handlePreSelectedTab($tabChoice.Options)>> <div class="tab-bar"> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'highSale')" id="tab highSale">Worth much but earning little</button> - <button class="tab-links" onclick="App.UI.tabbar.openTab(event, 'expensive')" id="tab expensive">Costing vs earning</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'highSale')" id="tab highSale">Worth much but earning little</button> + <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'expensive')" id="tab expensive">Costing vs earning</button> </div> <div id="highSale" class="tab-content"> -- GitLab