diff --git a/src/interaction/siCustom.js b/src/interaction/siCustom.js index 3cfde0243b1b2a4cbc9e31186f432dce1217d3b9..5ca8d7a00a1cf22aa133e5c8688beef380595dc9 100644 --- a/src/interaction/siCustom.js +++ b/src/interaction/siCustom.js @@ -22,7 +22,8 @@ App.UI.SlaveInteract.custom = function(slave, refresh) { App.UI.DOM.appendNewElement("h3", el, `Names`); el.append( playerTitle(), - slaveFullName() + slaveFullName(), + pronouns() ); App.UI.DOM.appendNewElement("h3", el, `Description`); @@ -446,6 +447,23 @@ App.UI.SlaveInteract.custom = function(slave, refresh) { } } + function pronouns() { + const pnNode = new DocumentFragment(); + + const grp = new App.UI.OptionsGroup(); // note that OptionsGroup's default refresh will reload the entire page, which is desirable in this case + grp.addOption("Pronouns to use:", "pronoun", slave) + .addValue("Feminine", App.Data.Pronouns.Kind.female) + .addValue("Masculine", App.Data.Pronouns.Kind.male) + .addValue("Neuter/Toy", App.Data.Pronouns.Kind.neutral) + .addValue("Epicene/Plural", App.Data.Pronouns.Kind.epicene) + // .addValue("Custom", App.Data.Pronouns.Kind.custom) - TODO: custom pronoun mechanism is incomplete/broken right now + .addComment(`${slave.slaveName} will be addressed as "${he}/${him}."`); + + pnNode.append(grp.render()); + + return pnNode; + } + function hair() { let hairNode = new DocumentFragment(); hairNode.appendChild(hairStyle()); diff --git a/src/player/managePersonalAffairs.js b/src/player/managePersonalAffairs.js index 94142b5de8ad06136adddd3661dcb53b5813ac71..f769d388f870cc8deb1a788902370a43c98470d4 100644 --- a/src/player/managePersonalAffairs.js +++ b/src/player/managePersonalAffairs.js @@ -137,6 +137,7 @@ App.UI.managePersonalAffairs = function() { const textBoxDiv = document.createElement("div"); const renamePlayerDiv = document.createElement("div"); const newNameDiv = document.createElement("div"); + const pronounsDiv = document.createElement("div"); const rumorsDiv = document.createElement("div"); const familyDiv = document.createElement("div"); const pregnancyDiv = document.createElement("div"); @@ -153,6 +154,7 @@ App.UI.managePersonalAffairs = function() { `On formal occasions, you are announced as ${PCTitle()}. By slaves, however, you prefer to be called ${properMaster()}.`, customTitle(), renamePlayer(), + pronouns(), rumors(), family(), ); @@ -240,6 +242,19 @@ App.UI.managePersonalAffairs = function() { return customTitleDiv; } + function pronouns() { + const options = new App.UI.OptionsGroup(); + const {he, him} = getPronouns(V.PC); + options.addOption("", "pronoun", V.PC) + .addValue("She/Her", App.Data.Pronouns.Kind.female) + .addValue("He/Him", App.Data.Pronouns.Kind.male) + .addValue("It", App.Data.Pronouns.Kind.neutral) + .addValue("They/Them", App.Data.Pronouns.Kind.epicene); + // .addValue("Custom", App.Data.Pronouns.Kind.custom) - TODO: custom pronoun mechanism is incomplete/broken right now + pronounsDiv.append("Your preferred pronouns are ", App.UI.DOM.linkReplace(`${he}/${him}.`, options.render())); + return pronounsDiv; + } + function renamePlayer() { newNameDiv.append( `New name: `,