diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index a223343999c65f7c96dfd231391ca3858be97772..b4e328666d39397b248cf3cacc01a56b65e39169 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -81,6 +81,7 @@ App.Data.defaultGameStateVariables = { extremeUnderage: 0, formatNumbers: 1, fucktoyInteractionsPosition: 1, + slaveInteractLongForm: false, headGirlSoftensFlaws: 1, headGirlTrainsFlaws: 1, headGirlTrainsHealth: 1, diff --git a/src/gui/options/options.tw b/src/gui/options/options.tw index 6077eb0299d2bcb0170b78166a57897b41d91ad7..1ab2f1a3fe5c74e4bbb620138e7dd4a2d05b0dd9 100644 --- a/src/gui/options/options.tw +++ b/src/gui/options/options.tw @@ -151,6 +151,9 @@ <<run _options.addOption("Interactions with your fucktoys are", "fucktoyInteractionsPosition") .addValueList([["next to them", 1], ["at page bottom", 0]])>> + <<run _options.addOption("Hide tabs in Slave Interact", "slaveInteractLongForm") + .addValue("Enabled", true).on().addValue("Disabled", false).off()>> + <<run _options.addOption("Line separations are", "lineSeparations") .addValue("Shown", 1).on().addValue("Hidden", 0).off()>> diff --git a/src/interaction/slaveInteract.js b/src/interaction/slaveInteract.js index 9490e14a4039e2af2b512190d27bf4cbb03b35f3..91a1a888977b04ec24308bd38ff3dbea4b479675 100644 --- a/src/interaction/slaveInteract.js +++ b/src/interaction/slaveInteract.js @@ -126,7 +126,11 @@ App.UI.SlaveInteract.mainPage = function(slave) { el.append(App.UI.SlaveInteract.navigation(slave)); - el.append(displayWithTabs()); + if (V.slaveInteractLongForm) { + el.append(displayWithoutTabs()); + } else { + el.append(displayWithTabs()); + } return el; @@ -164,17 +168,33 @@ App.UI.SlaveInteract.mainPage = function(slave) { return btn; } + } - function makeTabContents(item){ - const wrapperEl = document.createElement("div"); - wrapperEl.id = item.id; - wrapperEl.classList.add("tab-content"); - - const classEl = document.createElement("div"); - classEl.classList.add("content"); - classEl.append(item.node); - wrapperEl.append(classEl); - return wrapperEl; + function displayWithoutTabs() { + const el = new DocumentFragment(); + for (const tab of buttons) { + App.UI.DOM.appendNewElement("h2", el, tab.title); + if (tab.title !== "Family") { + el.append(tab.node); + } else { + // Families are weird and need the wrapper. But we can't have duplicate ID's all over the place, so just use it in their case. + el.append(makeTabContents(tab)); + if (tab.hasOwnProperty("onClick")){ + tab.onClick(); + } + } } + return el; + } + function makeTabContents(item) { + const wrapperEl = document.createElement("div"); + wrapperEl.id = item.id; + wrapperEl.classList.add("tab-content"); + + const classEl = document.createElement("div"); + classEl.classList.add("content"); + classEl.append(item.node); + wrapperEl.append(classEl); + return wrapperEl; } };