mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
1.0.20
This commit is contained in:
parent
85743b7956
commit
3f7abcb191
18 changed files with 329 additions and 332 deletions
12
icons.css
12
icons.css
|
|
@ -193,10 +193,10 @@
|
|||
.icon-percent:before { content: '\f295'; } /* '' */
|
||||
|
||||
/* Amended FA icons */
|
||||
.icon-sort-name-up:after { font-size: 9px; content: '\f15d'; }
|
||||
.icon-sort-name-down:after { font-size: 9px; content: '\f15e'; }
|
||||
.icon-sort-number-up:after { font-size: 9px; content: '\f162'; }
|
||||
.icon-sort-number-down:after { font-size: 9px; content: '\f163'; }
|
||||
.icon-sort-name-up:after { font-size: .9em; content: '\f15d'; }
|
||||
.icon-sort-name-down:after { font-size: .9em; content: '\f15e'; }
|
||||
.icon-sort-number-up:after { font-size: .9em; content: '\f162'; }
|
||||
.icon-sort-number-down:after { font-size: .9em; content: '\f163'; }
|
||||
|
||||
/* Custom icons */
|
||||
.icon-w:before { font-style: italic; content: 'w:'; }
|
||||
|
|
@ -209,7 +209,7 @@
|
|||
.icon-smooth:before {font-weight: bold; content: '∼'; }
|
||||
.icon-disrupt:before {font-weight: bold; content: '෴'; }
|
||||
.icon-if:before {font-style: italic; font-weight: bold; content: 'if'; }
|
||||
.icon-fleur:before {content: '⚜'; font-size: 11px; margin: -2px; }
|
||||
.icon-fleur:before {content: '⚜'; font-size: 1.1em; margin: -2px; }
|
||||
|
||||
.icon-ruler:before {content: 'I'; }
|
||||
.icon-curve:before {content: 'C'; }
|
||||
|
|
@ -222,6 +222,6 @@
|
|||
padding: 0;
|
||||
writing-mode: tb-rl;
|
||||
margin-left: 1px;
|
||||
width: 10px;
|
||||
width: .6em;
|
||||
font-family: monospace;
|
||||
}
|
||||
195
index.css
195
index.css
File diff suppressed because one or more lines are too long
161
index.html
161
index.html
|
|
@ -819,8 +819,8 @@
|
|||
|
||||
<g id="rose" stroke-width="1">
|
||||
<g id="sL" stroke="#3f3f3f">
|
||||
<line x1="0" y1="-10000000" x2="0" y2="10000000"/>
|
||||
<line x1="-10000000" y1="0" x2="10000000" y2="0"/>
|
||||
<line id="sL1" x1="0" y1="-2000" x2="0" y2="2000"/>
|
||||
<line id="sL2" x1="-2000" y1="0" x2="2000" y2="0"/>
|
||||
</g>
|
||||
<use xlink:href="#sL" transform="rotate(45)"/>
|
||||
<use xlink:href="#sL" transform="rotate(22.5)"/>
|
||||
|
|
@ -881,8 +881,8 @@
|
|||
<div id="optionsContainer" style="opacity:0">
|
||||
|
||||
<div id="collapsible">
|
||||
<button id="optionsTrigger" data-tip="Click to show options pane. Shortcut: Tab" class="options glow" onclick="showOptions(event)" style="padding:7px 5px">►</button>
|
||||
<button id="regenerate" data-tip="Click to generate a new map. Shortcut: F2" onclick="regeneratePrompt()" class="options" style="display:none; padding:7px 8px">New Map!</button>
|
||||
<button id="optionsTrigger" data-tip="Click to show options pane. Shortcut: Tab" class="options glow" onclick="showOptions(event)" style="padding:.6em .45em">►</button>
|
||||
<button id="regenerate" data-tip="Click to generate a new map. Shortcut: F2" onclick="regeneratePrompt()" class="options" style="display:none; padding:.6em 1em">New Map!</button>
|
||||
</div>
|
||||
|
||||
<div id="options" style="display:none">
|
||||
|
|
@ -909,8 +909,8 @@
|
|||
<option value="landmass">Pure landmass</option>
|
||||
<option hidden value="custom">Custom (not saved)</option>
|
||||
</select>
|
||||
<button id="savePresetButton" data-tip="Click to save displayed layers as a new preset" class="icon-plus styleButton" style="display:none" onclick="savePreset()"></button>
|
||||
<button id="removePresetButton" data-tip="Click to remove current custom preset" class="icon-minus styleButton" style="display:none" onclick="removePreset()"></button>
|
||||
<button id="savePresetButton" data-tip="Click to save displayed layers as a new preset" class="icon-plus presetButton" style="display:none" onclick="savePreset()"></button>
|
||||
<button id="removePresetButton" data-tip="Click to remove current custom preset" class="icon-minus presetButton" style="display:none" onclick="removePreset()"></button>
|
||||
|
||||
<p data-tip="Click to toggle a layer, drag to raise or lower a layer">Displayed layers:</p>
|
||||
<ul data-tip="Click to toggle a layer, drag to raise or lower a layer" id="mapLayers">
|
||||
|
|
@ -1643,21 +1643,21 @@
|
|||
<td></td>
|
||||
<td>Interface size</td>
|
||||
<td>
|
||||
<input id="uiSizeInput" data-stored="uiSize" type="range" min=.8 max=2 step=.1 value=1>
|
||||
<input id="uiSizeInput" data-stored="uiSize" type="range" min=.6 max=3 step=.1 value=1>
|
||||
</td>
|
||||
<td>
|
||||
<input id="uiSizeOutput" data-stored="uiSize" type="number" min=.6 max=2 step=.1 value=1>
|
||||
<input id="uiSizeOutput" data-stored="uiSize" type="number" min=.6 max=3 step=.1 value=1>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr data-tip="Set tooltips size">
|
||||
<tr data-tip="Set tooltip size">
|
||||
<td></td>
|
||||
<td>Tooltips size</td>
|
||||
<td>Tooltip size</td>
|
||||
<td>
|
||||
<input id="tooltipSizeInput" data-stored="tooltipSize" type="range" min=4 max=24 value=14>
|
||||
<input id="tooltipSizeInput" data-stored="tooltipSize" type="range" min=4 max=32 value=14>
|
||||
</td>
|
||||
<td>
|
||||
<input id="tooltipSizeOutput" data-stored="tooltipSize" type="number" min=4 max=24 value=14>
|
||||
<input id="tooltipSizeOutput" data-stored="tooltipSize" type="number" min=4 max=32 value=14>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
@ -1795,7 +1795,7 @@
|
|||
<div>
|
||||
<p>Statistics:</p>
|
||||
<span>Land cells: </span><span id="landmassCounter">0</span>
|
||||
<span style="margin-left:8px">Mean height: </span><span id="landmassAverage">0</span>
|
||||
<span style="margin-left:.9em">Mean height: </span><span id="landmassAverage">0</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
@ -1915,7 +1915,7 @@
|
|||
<div data-tip="Map coordinates on globe"><i>Coords:</i> <span id="mapCoordinates"></span></div>
|
||||
</div>
|
||||
|
||||
<svg id="globe" width="240" height="240" viewBox="-20 -25 240 240">
|
||||
<svg id="globe" width="22em" height="22em" viewBox="-20 -25 240 240">
|
||||
<defs>
|
||||
<linearGradient id="temperatureGradient" x1="0" x2="0" y1="0" y2="1">
|
||||
<stop class="tempGradient90" offset="0%" stop-color="blue"/>
|
||||
|
|
@ -1974,8 +1974,8 @@
|
|||
<button id="labelGroupShow" data-tip="Show the group selection" class="icon-tags"></button>
|
||||
<div id="labelGroupSection" style="display: none">
|
||||
<button id="labelGroupHide" data-tip="Hide the group selection" class="icon-tags"></button>
|
||||
<select id="labelGroupSelect" data-tip="Select a group for this label" style="width:113px"></select>
|
||||
<input id="labelGroupInput" placeholder="new group name" data-tip="Provide a name for the new group" style="display:none; width:109px; height:10px"/>
|
||||
<select id="labelGroupSelect" data-tip="Select a group for this label" style="width:10em"></select>
|
||||
<input id="labelGroupInput" placeholder="new group name" data-tip="Provide a name for the new group" style="display:none; width:10em">
|
||||
<span id="labelGroupNew" data-tip="Create new group for this label" class="icon-plus pointer"></span>
|
||||
<span id="labelGroupRemove" data-tip="Remove the Group with all labels" class="icon-trash-empty pointer"></span>
|
||||
</div>
|
||||
|
|
@ -1983,16 +1983,16 @@
|
|||
<button id="labelTextShow" data-tip="Show the edit label text section" class="icon-pencil"></button>
|
||||
<div id="labelTextSection" style="display: none">
|
||||
<button id="labelTextHide" data-tip="Hide the edit label text section" class="icon-pencil"></button>
|
||||
<input id="labelText" data-tip='Type to change the label. Enter "|" to move to a new line' style="width: 121px; height:12px"/>
|
||||
<input id="labelText" data-tip='Type to change the label. Enter "|" to move to a new line' style="width: 12em">
|
||||
<span id="labelTextRandom" data-tip="Generate random name" class="icon-shuffle pointer"></span>
|
||||
</div>
|
||||
|
||||
<button id="labelSizeShow" data-tip="Show the font size section" class="icon-text-height"></button>
|
||||
<div id="labelSizeSection" style="display: none">
|
||||
<button id="labelSizeHide" data-tip="Hide the font size section" class="icon-text-height"></button>
|
||||
<input id="labelStartOffset" data-tip="Set starting offset for the particular label" type="range" min=20 max=80 style="width:79px">
|
||||
<input id="labelStartOffset" data-tip="Set starting offset for the particular label" type="range" min=20 max=80 style="width:8em">
|
||||
<i class="icon-text-height"></i>
|
||||
<input id="labelRelativeSize" data-tip="Set relative size for the particular label" type="number" min=30 max=300 step=1 style="width:36px">
|
||||
<input id="labelRelativeSize" data-tip="Set relative size for the particular label" type="number" min=30 max=300 step=1 style="width:3.2em">
|
||||
</div>
|
||||
|
||||
<button id="labelAlign" data-tip="Turn text path into a straight line" class="icon-resize-horizontal"></button>
|
||||
|
|
@ -2017,7 +2017,7 @@
|
|||
<input id="riverAngle" data-tip="Rotate river by angle" type="range" min="-90" max=90 step=.2>
|
||||
<span id="riverAngleValue">0℉</span>
|
||||
<i id="riverScaleIcon" class="icon-s"></i>
|
||||
<input id="riverScale" data-tip="Change river scale" value="1" type="number" min=.1 max=3 step=.01>
|
||||
<input id="riverScale" data-tip="Change river scale" value="1" type="number" style="width:3.5em" min=.1 max=3 step=.01>
|
||||
<span id="riverReset" data-tip="Reset transformation to default" class="icon-cancel pointer"></span>
|
||||
</div>
|
||||
|
||||
|
|
@ -2032,8 +2032,8 @@
|
|||
<button id="routeGroupsShow" data-tip="Show the group selection" class="icon-tags"></button>
|
||||
<div id="routeGroupsSelection" style="display: none">
|
||||
<button id="routeGroupsHide" data-tip="Hide the group section" class="icon-tags"></button>
|
||||
<select id="routeGroup" data-tip="Select a group for this route" style="width:135px"></select>
|
||||
<input id="routeGroupName" placeholder="new group name" data-tip="Provide a name for the new group" style="display:none; width:131px; height:10px"/>
|
||||
<select id="routeGroup" data-tip="Select a group for this route" style="width:12em"></select>
|
||||
<input id="routeGroupName" placeholder="new group name" data-tip="Provide a name for the new group" style="display:none; width:12em"/>
|
||||
<span id="routeGroupAdd" data-tip="Create new group for this route" class="icon-plus pointer"></span>
|
||||
<span id="routeGroupRemove" data-tip="Remove all routes of this group" class="icon-trash-empty pointer"></span>
|
||||
</div>
|
||||
|
|
@ -2180,8 +2180,8 @@
|
|||
<button id="burgGroupShow" data-tip="Show group change section" class="icon-tags"></button>
|
||||
<div id="burgGroupSection" style="display: none">
|
||||
<button id="burgGroupHide" data-tip="Hide group change section" class="icon-tags"></button>
|
||||
<select id="burgSelectGroup" data-tip="Select a group for this burg" style="width: 117px;"></select>
|
||||
<input id="burgInputGroup" placeholder="new group name" data-tip="Create new Group for the Burg" style="display: none; width: 113px; height: 10px"/>
|
||||
<select id="burgSelectGroup" data-tip="Select a group for this burg" style="width: 10em;"></select>
|
||||
<input id="burgInputGroup" placeholder="new group name" data-tip="Create new Group for the Burg" style="display: none; width: 10em"/>
|
||||
<i id="burgAddGroup" data-tip="Create new group for the burg" class="icon-plus pointer"></i>
|
||||
<i id="burgRemoveGroup" data-tip="Remove selected burg group" class="icon-trash pointer"></i>
|
||||
</div>
|
||||
|
|
@ -2189,7 +2189,7 @@
|
|||
<button id="burgNameShow" data-tip="Show name change section" class="icon-pencil"></button>
|
||||
<div id="burgNameSection" style="display: none">
|
||||
<button id="burgNameHide" data-tip="Hide name change section" class="icon-pencil"></button>
|
||||
<input id="burgNameInput" data-tip="Populate to rename the burg" style="height: 12px"/>
|
||||
<input id="burgNameInput" data-tip="Populate to rename the burg"/>
|
||||
<span id="burgNameReCulture" data-tip="Generate culture-specific name for the burg" class="icon-book pointer"></span>
|
||||
<span id="burgNameReRandom" data-tip="Generate random name for the burg" class="icon-globe pointer"></span>
|
||||
</div>
|
||||
|
|
@ -2205,8 +2205,8 @@
|
|||
|
||||
<button id="markerGroup" data-tip="Change marker type" class="icon-tags"></button>
|
||||
<div id="markerGroupSection" style="display: none">
|
||||
<select id="markerSelectGroup" data-tip="Select type for the selected marker" style="width: 117px; height: 18px"></select>
|
||||
<input id="markerInputGroup" data-tip="Create new type for selected marker" placeholder="type new name" style="display: none; width: 113px; height: 12px"/>
|
||||
<select id="markerSelectGroup" data-tip="Select type for the selected marker" style="width: 10em"></select>
|
||||
<input id="markerInputGroup" data-tip="Create new type for selected marker" placeholder="type new name" style="display: none; width: 10em"/>
|
||||
<i id="markerAddGroup" data-tip="Create new markers type" class="icon-plus pointer"></i>
|
||||
<i id="markerRemoveGroup" data-tip="Remove all markers of that type" class="icon-trash pointer"></i>
|
||||
</div>
|
||||
|
|
@ -2426,12 +2426,12 @@
|
|||
</div>
|
||||
|
||||
<div id="biomesEditor" class="dialog stable" style="display: none">
|
||||
<div id="biomesHeader">
|
||||
<div style="margin-left: 12px" data-tip="Click to sort by biome name" class="sortable alphabetically" data-sortby="name">Biome </div>
|
||||
<div style="margin-left: 70px" data-tip="Click to sort by biome habitability" class="sortable hide" data-sortby="habitability">Habitability </div>
|
||||
<div style="margin-left: 8px" data-tip="Click to sort by biome cells number" class="sortable hide icon-sort-number-down" data-sortby="cells">Cells </div>
|
||||
<div style="margin-left: 24px" data-tip="Click to sort by biome area" class="sortable hide" data-sortby="area">Area </div>
|
||||
<div style="margin-left: 17px" data-tip="Click to sort by biome population" class="sortable hide" data-sortby="population">Population </div>
|
||||
<div id="biomesHeader" class="header">
|
||||
<div style="left:1.4em" data-tip="Click to sort by biome name" class="sortable alphabetically" data-sortby="name">Biome </div>
|
||||
<div style="left:12em" data-tip="Click to sort by biome habitability" class="sortable hide" data-sortby="habitability">Habitability </div>
|
||||
<div style="left:19em" data-tip="Click to sort by biome cells number" class="sortable hide icon-sort-number-down" data-sortby="cells">Cells </div>
|
||||
<div style="left:25em" data-tip="Click to sort by biome area" class="sortable hide" data-sortby="area">Area </div>
|
||||
<div style="left:30em" data-tip="Click to sort by biome population" class="sortable hide" data-sortby="population">Population </div>
|
||||
</div>
|
||||
|
||||
<div id="biomesBody" class="table" data-type="absolute"></div>
|
||||
|
|
@ -2465,17 +2465,17 @@
|
|||
</div>
|
||||
|
||||
<div id="statesEditor" class="dialog stable" style="display: none">
|
||||
<div id="statesHeader">
|
||||
<div style="margin-left: 12px" data-tip="Click to sort by state name" class="sortable alphabetically" data-sortby="name">State </div>
|
||||
<div style="margin-left: 44px" data-tip="Click to sort by state form name" class="sortable alphabetically" data-sortby="form">Form </div>
|
||||
<div style="margin-left: 41px" data-tip="Click to sort by capital name" class="sortable alphabetically hide" data-sortby="capital">Capital </div>
|
||||
<div style="margin-left: 24px" data-tip="Click to sort by state dominant culture" class="sortable alphabetically hide" data-sortby="culture">Culture </div>
|
||||
<div style="margin-left: 9px" data-tip="Click to sort by state type" class="sortable alphabetically hidden show hide" data-sortby="type">Type </div>
|
||||
<div style="margin-left: 19px" data-tip="Click to sort by state expansion value" class="sortable hidden show hide" data-sortby="expansionism">Expan. </div>
|
||||
<div style="margin-left: 12px" data-tip="Click to sort by state cells count" class="sortable hidden show hide" data-sortby="cells">Cells </div>
|
||||
<div style="margin-left: 11px" data-tip="Click to sort by state burgs count" class="sortable hide" data-sortby="burgs">Burgs </div>
|
||||
<div style="margin-left: 20px" data-tip="Click to sort by state area" class="sortable hide icon-sort-number-down" data-sortby="area">Area </div>
|
||||
<div style="margin-left: 18px" data-tip="Click to sort by state population" class="sortable hide" data-sortby="population">Population </div>
|
||||
<div id="statesHeader" class="header">
|
||||
<div style="left:1.4em" data-tip="Click to sort by state name" class="sortable alphabetically" data-sortby="name">State </div>
|
||||
<div style="left:8.7em" data-tip="Click to sort by state form name" class="sortable alphabetically" data-sortby="form">Form </div>
|
||||
<div style="left:16em" data-tip="Click to sort by capital name" class="sortable alphabetically hide" data-sortby="capital">Capital </div>
|
||||
<div style="left:22.3em" data-tip="Click to sort by state dominant culture" class="sortable alphabetically hide" data-sortby="culture">Culture </div>
|
||||
<div style="left:27em" data-tip="Click to sort by state burgs count" class="sortable hide" data-sortby="burgs">Burgs </div>
|
||||
<div style="left:32.5em" data-tip="Click to sort by state area" class="sortable hide icon-sort-number-down" data-sortby="area">Area </div>
|
||||
<div style="left:37em" data-tip="Click to sort by state population" class="sortable hide" data-sortby="population">Population </div>
|
||||
<div style="left:43.5em" data-tip="Click to sort by state type" class="sortable alphabetically hidden show hide" data-sortby="type">Type </div>
|
||||
<div style="left:47em" data-tip="Click to sort by state expansion value" class="sortable hidden show hide" data-sortby="expansionism">Expansion </div>
|
||||
<div style="left:53.5em" data-tip="Click to sort by state cells count" class="sortable hidden show hide" data-sortby="cells">Cells </div>
|
||||
</div>
|
||||
|
||||
<div id="statesBodySection" class="table" data-type="absolute"></div>
|
||||
|
|
@ -2530,12 +2530,12 @@
|
|||
|
||||
<div id="provincesEditor" class="dialog stable" style="display: none">
|
||||
<div id="provincesHeader" class="header">
|
||||
<div style="margin-left: 12px" data-tip="Click to sort by province name" class="sortable alphabetically" data-sortby="name">Province </div>
|
||||
<div style="margin-left: 27px" data-tip="Click to sort by province form name" class="sortable alphabetically hide" data-sortby="form">Form </div>
|
||||
<div style="margin-left: 41px" data-tip="Click to sort by province capital" class="sortable alphabetically hide" data-sortby="capital">Capital </div>
|
||||
<div style="margin-left: 24px" data-tip="Click to sort by province owner" class="sortable alphabetically" data-sortby="state">State </div>
|
||||
<div style="margin-left: 31px" data-tip="Click to sort by province area" class="sortable hide" data-sortby="area">Area </div>
|
||||
<div style="margin-left: 27px" data-tip="Click to sort by province population" class="sortable hide" data-sortby="population">Population </div>
|
||||
<div style="left:1.4em" data-tip="Click to sort by province name" class="sortable alphabetically" data-sortby="name">Province </div>
|
||||
<div style="left:8.5em" data-tip="Click to sort by province form name" class="sortable alphabetically hide" data-sortby="form">Form </div>
|
||||
<div style="left:15.9em" data-tip="Click to sort by province capital" class="sortable alphabetically hide" data-sortby="capital">Capital </div>
|
||||
<div style="left:22em" data-tip="Click to sort by province owner" class="sortable alphabetically" data-sortby="state">State </div>
|
||||
<div style="left:30em" data-tip="Click to sort by province area" class="sortable hide" data-sortby="area">Area </div>
|
||||
<div style="left:35.3em" data-tip="Click to sort by province population" class="sortable hide" data-sortby="population">Population </div>
|
||||
</div>
|
||||
|
||||
<div id="provincesBodySection" class="table" data-type="absolute"></div>
|
||||
|
|
@ -2571,9 +2571,9 @@
|
|||
</div>
|
||||
|
||||
<div id="diplomacyEditor" class="dialog stable" style="display: none">
|
||||
<div id="diplomacyHeader">
|
||||
<div style="margin-left: 2px" data-tip="Click to sort by state name" class="sortable alphabetically" data-sortby="name">State </div>
|
||||
<div style="margin-left: 9em" data-tip="Click to sort by diplomatical relations" class="sortable alphabetically icon-sort-name-up" data-sortby="relations">Relations </div>
|
||||
<div id="diplomacyHeader" class="header">
|
||||
<div style="left:.2em" data-tip="Click to sort by state name" class="sortable alphabetically" data-sortby="name">State </div>
|
||||
<div style="left:12.4em" data-tip="Click to sort by diplomatical relations" class="sortable alphabetically icon-sort-name-up" data-sortby="relations">Relations </div>
|
||||
</div>
|
||||
|
||||
<div id="diplomacyBodySection" class="table"></div>
|
||||
|
|
@ -2588,21 +2588,21 @@
|
|||
</div>
|
||||
|
||||
<div id="burgsEditor" class="dialog stable" style="display: none">
|
||||
<div id="burgsHeader">
|
||||
<div style="margin-left: 12px" data-tip="Click to sort by burg name" class="sortable alphabetically" data-sortby="name">Burg </div>
|
||||
<div id="burgStateHeader" style="margin-left: 35px" data-tip="Click to sort by state name" class="sortable alphabetically" data-sortby="state">State </div>
|
||||
<div style="margin-left: 33px" data-tip="Click to sort by culture name" class="sortable alphabetically" data-sortby="culture">Culture </div>
|
||||
<div style="margin-left: 3px" data-tip="Click to sort by burg population" class="sortable" data-sortby="population">Population </div>
|
||||
<div style="margin-left: 12px" data-tip="Click to sort by burg type" class="sortable alphabetically" data-sortby="type">Type </div>
|
||||
<div id="burgsHeader" class="header">
|
||||
<div style="left:1.4em" data-tip="Click to sort by burg name" class="sortable alphabetically" data-sortby="name">Burg </div>
|
||||
<div style="left:7.7em" data-tip="Click to sort by culture name" class="sortable alphabetically" data-sortby="culture">Culture </div>
|
||||
<div style="left:12em" data-tip="Click to sort by burg population" class="sortable" data-sortby="population">Population </div>
|
||||
<div style="left:18.7em" data-tip="Click to sort by burg type" class="sortable alphabetically" data-sortby="type">Type </div>
|
||||
<div style="left:22em" data-tip="Click to sort by state name" class="sortable alphabetically" data-sortby="state" id="burgStateHeader">State </div>
|
||||
</div>
|
||||
|
||||
<div id="burgsBody" class="burgs-table"></div>
|
||||
|
||||
<div id="burgsFilters" data-tip="Apply a filter">
|
||||
<span>State: </span>
|
||||
<select id="burgsFilterState" style="width:33%"></select>
|
||||
<select id="burgsFilterState" style="width:28%"></select>
|
||||
<span>Culture:</span>
|
||||
<select id="burgsFilterCulture" style="width:33%"></select>
|
||||
<select id="burgsFilterCulture" style="width:28%"></select>
|
||||
</div>
|
||||
|
||||
<div id="burgsFooter" class="totalLine">
|
||||
|
|
@ -2621,14 +2621,14 @@
|
|||
</div>
|
||||
|
||||
<div id="culturesEditor" class="dialog stable" style="display: none">
|
||||
<div id="culturesHeader">
|
||||
<div style="margin-left: 12px" data-tip="Click to sort by culture name" class="sortable alphabetically" data-sortby="name">Culture </div>
|
||||
<div style="margin-left: 15px" data-tip="Click to sort by culture cells count" class="sortable hide" data-sortby="cells">Cells </div>
|
||||
<div style="margin-left: 12px" data-tip="Click to sort by expansionism" class="sortable hide" data-sortby="expansionism">Expan. </div>
|
||||
<div style="margin-left: 14px" data-tip="Click to sort by type" class="sortable alphabetically" data-sortby="type">Type </div>
|
||||
<div style="margin-left: 31px" data-tip="Click to sort by culture area" class="sortable hide" data-sortby="area">Area </div>
|
||||
<div style="margin-left: 17px" data-tip="Click to sort by culture population" class="sortable hide icon-sort-number-down" data-sortby="population">Population </div>
|
||||
<div style="margin-left: 2px" data-tip="Click to sort by culture namesbase" class="sortable" data-sortby="base">Namesbase </div>
|
||||
<div id="culturesHeader" class="header">
|
||||
<div style="left:1.4em" data-tip="Click to sort by culture name" class="sortable alphabetically" data-sortby="name">Culture </div>
|
||||
<div style="left:6.7em" data-tip="Click to sort by culture cells count" class="sortable hide" data-sortby="cells">Cells </div>
|
||||
<div style="left:11em" data-tip="Click to sort by expansionism" class="sortable hide" data-sortby="expansionism">Expan. </div>
|
||||
<div style="left:15.8em" data-tip="Click to sort by type" class="sortable alphabetically" data-sortby="type">Type </div>
|
||||
<div style="left:22.2em" data-tip="Click to sort by culture area" class="sortable hide" data-sortby="area">Area </div>
|
||||
<div style="left:26.8em" data-tip="Click to sort by culture population" class="sortable hide icon-sort-number-down" data-sortby="population">Population </div>
|
||||
<div style="left:33.8em" data-tip="Click to sort by culture namesbase" class="sortable" data-sortby="base">Namesbase </div>
|
||||
</div>
|
||||
<div id="culturesBody" class="table" data-type="absolute"></div>
|
||||
|
||||
|
|
@ -2701,10 +2701,10 @@
|
|||
|
||||
<div id="zonesEditor" class="dialog stable" style="display: none">
|
||||
<div id="customHeader" class="header">
|
||||
<div style="margin-left: 15px" data-tip="Zone description">Description </div>
|
||||
<div style="margin-left: 51px" data-tip="Zone cells count" class="hide">Cells </div>
|
||||
<div style="margin-left: 31px" data-tip="Zone area" class="hide">Area </div>
|
||||
<div style="margin-left: 22px" data-tip="Zone population" class="hide">Population </div>
|
||||
<div style="left:1.4em" data-tip="Zone description">Description </div>
|
||||
<div style="left:13em" data-tip="Zone cells count" class="hide">Cells </div>
|
||||
<div style="left:19em" data-tip="Zone area" class="hide">Area </div>
|
||||
<div style="left:24em" data-tip="Zone population" class="hide">Population </div>
|
||||
</div>
|
||||
|
||||
<div id="zonesBodySection" class="table" data-type="absolute"></div>
|
||||
|
|
@ -2756,13 +2756,13 @@
|
|||
</div>
|
||||
|
||||
<div id="religionsEditor" class="dialog stable" style="display: none">
|
||||
<div id="religionsHeader">
|
||||
<div style="margin-left: 12px" data-tip="Click to sort by religion name" class="sortable alphabetically" data-sortby="name">Religion </div>
|
||||
<div style="margin-left: 68px" data-tip="Click to sort by religion type" class="sortable alphabetically icon-sort-name-down" data-sortby="type">Type </div>
|
||||
<div style="margin-left: 18px" data-tip="Click to sort by religion form" class="sortable alphabetically hide" data-sortby="form">Form </div>
|
||||
<div style="margin-left: 42px" data-tip="Click to sort by supreme deity" class="sortable alphabetically hide" data-sortby="deity">Supreme Deity </div>
|
||||
<div style="margin-left: 92px" data-tip="Click to sort by religion area" class="sortable hide" data-sortby="area">Area </div>
|
||||
<div style="margin-left: 17px" data-tip="Click to sort by number of believers (religion area population)" class="sortable hide" data-sortby="population">Believers </div>
|
||||
<div id="religionsHeader" class="header">
|
||||
<div style="left:1.4em" data-tip="Click to sort by religion name" class="sortable alphabetically" data-sortby="name">Religion </div>
|
||||
<div style="left:12.6em" data-tip="Click to sort by religion type" class="sortable alphabetically icon-sort-name-down" data-sortby="type">Type </div>
|
||||
<div style="left:18em" data-tip="Click to sort by religion form" class="sortable alphabetically hide" data-sortby="form">Form </div>
|
||||
<div style="left:25.1em" data-tip="Click to sort by supreme deity" class="sortable alphabetically hide" data-sortby="deity">Supreme Deity </div>
|
||||
<div style="left:42.1em" data-tip="Click to sort by religion area" class="sortable hide" data-sortby="area">Area </div>
|
||||
<div style="left:47em" data-tip="Click to sort by number of believers (religion area population)" class="sortable hide" data-sortby="population">Believers </div>
|
||||
</div>
|
||||
<div id="religionsBody" class="table" data-type="absolute"></div>
|
||||
|
||||
|
|
@ -2819,7 +2819,6 @@
|
|||
<div>1 map pixel =</div>
|
||||
<input id="distanceScaleOutput" type="range" min=.01 max=20 step=.1 value=3>
|
||||
<input id="distanceScaleInput" data-stored="distanceScale" type="number" min=.01 max=100 step=.01 value=3 data-value=3>
|
||||
<span id="distanceUnitOutput"></span>
|
||||
</div>
|
||||
|
||||
<div data-tip='Area unit name, type "square" to add ² to the distance unit'>
|
||||
|
|
|
|||
10
libs/jquery-ui.css
vendored
10
libs/jquery-ui.css
vendored
|
|
@ -335,21 +335,21 @@ body .ui-dialog {
|
|||
position: absolute;
|
||||
right: .5em;
|
||||
top: 53%;
|
||||
width: 18px;
|
||||
padding: 0;
|
||||
height: 18px;
|
||||
width: 1.8em;
|
||||
height: 1.8em;
|
||||
color: #ffffff;
|
||||
background: none;
|
||||
font-size: 10px;
|
||||
font-size: .75em;
|
||||
border: 1px solid #c5c5c5;
|
||||
}
|
||||
|
||||
.ui-dialog .ui-dialog-titlebar button.ui-dialog-titlebar-collapse {
|
||||
margin: -10px 22px 0 0;
|
||||
margin: -1em 2.2em 0 0;
|
||||
}
|
||||
|
||||
.ui-dialog .ui-dialog-titlebar button.ui-dialog-titlebar-close {
|
||||
margin: -10px 0 0 0;
|
||||
margin: -1em 0 0;
|
||||
}
|
||||
|
||||
.ui-dialog .ui-dialog-titlebar button:active {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,10 @@
|
|||
religions.push({i: c.i, name, color, culture: c.i, type:"Folk", form, deity, center: c.center, origin:0});
|
||||
});
|
||||
|
||||
if (religionsInput.value == 0 || pack.cultures.length < 2) return;
|
||||
if (religionsInput.value == 0 || pack.cultures.length < 2) {
|
||||
religions.filter(r => r.i).forEach(r => r.code = getCode(r.name));
|
||||
return;
|
||||
}
|
||||
|
||||
const sorted = cells.i.filter(i => cells.s[i] > 2).sort((a, b) => cells.s[b] - cells.s[a]); // filtered and sorted array of indexes
|
||||
const religionsTree = d3.quadtree();
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ function editBiomes() {
|
|||
|
||||
lines += `<div class="states biomes" data-id="${i}" data-name="${b.name[i]}" data-habitability="${b.habitability[i]}"
|
||||
data-cells=${b.cells[i]} data-area=${area} data-population=${population} data-color=${b.color[i]}>
|
||||
<svg data-tip="Biomes fill style. Click to change" width="9" height="9" style="margin-bottom:-1px"><rect x="0" y="0" width="9" height="9" fill="${b.color[i]}" class="zoneFill"></svg>
|
||||
<svg data-tip="Biomes fill style. Click to change" width=".9em" height=".9em" style="margin-bottom:-1px"><rect x="0" y="0" width="100%" height="100%" fill="${b.color[i]}" class="zoneFill"></svg>
|
||||
<input data-tip="Biome name. Click and type to change" class="biomeName" value="${b.name[i]}" autocorrect="off" spellcheck="false">
|
||||
<span data-tip="Biome habitability percent" class="hide">%</span>
|
||||
<input data-tip="Biome habitability percent. Click and set new value to change" type="number" min=0 max=9999 step=1 class="biomeHabitability hide" value=${b.habitability[i]}>
|
||||
|
|
@ -205,7 +205,7 @@ function editBiomes() {
|
|||
|
||||
const unit = areaUnit.value === "square" ? " " + distanceUnitInput.value + "²" : " " + areaUnit.value;
|
||||
const line = `<div class="states biomes" data-id="${i}" data-name="${b.name[i]}" data-habitability=${b.habitability[i]} data-cells=0 data-area=0 data-population=0 data-color=${b.color[i]}>
|
||||
<svg data-tip="Biomes fill style. Click to change" width="9" height="9" style="margin-bottom:-1px"><rect x="0" y="0" width="9" height="9" fill="${b.color[i]}" class="zoneFill"></svg>
|
||||
<svg data-tip="Biomes fill style. Click to change" width=".9em" height=".9em" style="margin-bottom:-1px"><rect x="0" y="0" width="100%" height="100%" fill="${b.color[i]}" class="zoneFill"></svg>
|
||||
<input data-tip="Biome name. Click and type to change" class="biomeName" value="${b.name[i]}" autocorrect="off" spellcheck="false">
|
||||
<span data-tip="Biome habitability percent" class="hide">%</span>
|
||||
<input data-tip="Biome habitability percent. Click and set new value to change" type="number" min=0 max=9999 step=1 class="biomeHabitability hide" value=${b.habitability[i]}>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ function editBurgs() {
|
|||
lines += `<div class="states" data-id=${b.i} data-name=${b.name} data-state=${state} data-culture=${culture} data-population=${population} data-type=${type}>
|
||||
<span data-tip="Click to zoom into view" class="icon-dot-circled pointer"></span>
|
||||
<input data-tip="Burg name. Click and type to change" class="burgName" value="${b.name}" autocorrect="off" spellcheck="false">
|
||||
<span data-tip="Burg state" class="burgState ${showState}">${state}</span>
|
||||
<select data-tip="Dominant culture. Click to change" class="stateCulture">${getCultureOptions(b.culture)}</select>
|
||||
<span data-tip="Burg population" class="icon-male"></span>
|
||||
<input data-tip="Burg population. Type to change" class="burgPopulation" value=${si(population)}>
|
||||
|
|
@ -83,6 +82,7 @@ function editBurgs() {
|
|||
<span data-tip="${b.capital ? ' This burg is a state capital' : 'Click to assign a capital status'}" class="icon-star-empty${b.capital ? '' : ' inactive pointer'}"></span>
|
||||
<span data-tip="Click to toggle port status" class="icon-anchor pointer${b.port ? '' : ' inactive'}" style="font-size:.9em"></span>
|
||||
</div>
|
||||
<span data-tip="Burg state" class="burgState ${showState}">${state}</span>
|
||||
<span data-tip="Remove burg" class="icon-trash-empty"></span>
|
||||
</div>`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,13 +89,13 @@ function editCultures() {
|
|||
|
||||
lines += `<div class="states cultures" data-id=${c.i} data-name="${c.name}" data-color="${c.color}" data-cells=${c.cells}
|
||||
data-area=${area} data-population=${population} data-base=${c.base} data-type=${c.type} data-expansionism=${c.expansionism}>
|
||||
<svg data-tip="Culture fill style. Click to change" width="9" height="9" style="margin-bottom:-1px"><rect x="0" y="0" width="9" height="9" fill="${c.color}" class="zoneFill"></svg>
|
||||
<svg data-tip="Culture fill style. Click to change" width=".9em" height=".9em" style="margin-bottom:-1px"><rect x="0" y="0" width="100%" height="100%" fill="${c.color}" class="zoneFill"></svg>
|
||||
<input data-tip="Culture name. Click and type to change" class="cultureName" value="${c.name}" autocorrect="off" spellcheck="false">
|
||||
<span data-tip="Cells count" class="icon-check-empty hide"></span>
|
||||
<div data-tip="Cells count" class="stateCells hide">${c.cells}</div>
|
||||
<span data-tip="Culture expansionism (defines competitive size)" class="icon-resize-full hide"></span>
|
||||
<input data-tip="Expansionism (defines competitive size)" class="statePower hide" type="number" min=0 max=99 step=.1 value=${c.expansionism}>
|
||||
<select data-tip="Culture type" class="cultureType">${getTypeOptions(c.type)}</select>
|
||||
<span data-tip="Culture expansionism. Defines competitive size" class="icon-resize-full hide"></span>
|
||||
<input data-tip="Culture expansionism. Defines competitive size. Click to change" class="statePower hide" type="number" min=0 max=99 step=.1 value=${c.expansionism}>
|
||||
<select data-tip="Culture type. Defines growth model. Click to change" class="cultureType">${getTypeOptions(c.type)}</select>
|
||||
<span data-tip="Culture area" style="padding-right: 4px" class="icon-map-o hide"></span>
|
||||
<div data-tip="Culture area" class="biomeArea hide">${si(area) + unit}</div>
|
||||
<span data-tip="${populationTip}" class="icon-male hide"></span>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ function editHeightmap() {
|
|||
|
||||
<p>Check out <a href="https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Heightmap-customization" target="_blank">wiki</a> for guidance.</p>`;
|
||||
|
||||
$("#alert").dialog({resizable: false, title: "Edit Heightmap", width: 300,
|
||||
$("#alert").dialog({resizable: false, title: "Edit Heightmap", width: "28em",
|
||||
buttons: {
|
||||
Erase: function() {enterHeightmapEditMode("erase");},
|
||||
Keep: function() {enterHeightmapEditMode("keep");},
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ function getCurrentPreset() {
|
|||
if (JSON.stringify(presets[preset]) !== JSON.stringify(layers)) continue;
|
||||
layersPreset.value = preset;
|
||||
removePresetButton.style.display = defaultPresets[preset] ? "none" : "inline-block";
|
||||
savePresetButton.style.display = "none";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -944,6 +945,9 @@ function toggleCompass() {
|
|||
const tr = `translate(80 80) scale(.25)`;
|
||||
d3.select("#rose").attr("transform", tr);
|
||||
compass.append("use").attr("xlink:href","#rose");
|
||||
// prolongate rose lines
|
||||
svg.select("g#rose > g#sL > line#sL1").attr("y1", -19000).attr("y2", 19000);
|
||||
svg.select("g#rose > g#sL > line#sL2").attr("x1", -19000).attr("x2", 19000);
|
||||
}
|
||||
} else {
|
||||
$('#compass').fadeOut();
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ function editNamesbase() {
|
|||
updateInputs();
|
||||
|
||||
$("#namesbaseEditor").dialog({
|
||||
title: "Namesbase Editor", width: 468,
|
||||
title: "Namesbase Editor", width: "42.5em",
|
||||
position: {my: "center", at: "center", of: "svg"}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -804,7 +804,7 @@ function changeBurgsNumberSlider(value) {
|
|||
function changeUIsize(value) {
|
||||
uiSizeInput.value = uiSizeOutput.value = value;
|
||||
document.getElementsByTagName("body")[0].style.fontSize = value * 11 + "px";
|
||||
document.getElementById("options").style.width = (value - 1) * 300 / 2 + 300 + "px";
|
||||
document.getElementById("options").style.width = (value - 1) * 300 + 300 + "px";
|
||||
}
|
||||
|
||||
function changeTooltipSize(value) {
|
||||
|
|
@ -856,9 +856,11 @@ function applyStoredOptions() {
|
|||
if (localStorage.getItem("winds")) winds = localStorage.getItem("winds").split(",").map(w => +w);
|
||||
|
||||
changeDialogsTransparency(localStorage.getItem("transparency") || 15);
|
||||
if (localStorage.getItem("uiSize")) changeUIsize(localStorage.getItem("uiSize"));
|
||||
if (localStorage.getItem("tooltipSize")) changeTooltipSize(localStorage.getItem("tooltipSize"));
|
||||
if (localStorage.getItem("regions")) changeStatesNumber(localStorage.getItem("regions"));
|
||||
|
||||
if (localStorage.getItem("uiSize")) changeUIsize(localStorage.getItem("uiSize"));
|
||||
else changeUIsize(Math.max(Math.min(rn(window.innerWidth / 1024, 1), 3), 1));
|
||||
}
|
||||
|
||||
// randomize options if randomization is allowed (not locked)
|
||||
|
|
@ -886,7 +888,7 @@ function randomizeOptions() {
|
|||
const US = navigator.language === "en-US";
|
||||
const UK = navigator.language === "en-GB";
|
||||
if (!locked("distanceScale")) distanceScaleOutput.value = distanceScaleInput.value = gauss(3, 1, 1, 5);
|
||||
if (!stored("distanceUnit")) distanceUnitInput.value = distanceUnitOutput.value = US || UK ? "mi" : "km";
|
||||
if (!stored("distanceUnit")) distanceUnitInput.value = US || UK ? "mi" : "km";
|
||||
if (!stored("heightUnit")) heightUnit.value = US || UK ? "ft" : "m";
|
||||
if (!stored("temperatureScale")) temperatureScale.value = US ? "°F" : "°C";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ function editProvinces() {
|
|||
const capital = p.burg ? pack.burgs[p.burg].name : '';
|
||||
const focused = defs.select("#fog #focusProvince"+p.i).size();
|
||||
lines += `<div class="states" data-id=${p.i} data-name=${p.name} data-form=${p.formName} data-color="${p.color}" data-capital="${capital}" data-state="${stateName}" data-area=${area} data-population=${population}>
|
||||
<svg data-tip="Province fill style. Click to change" width="9" height="9" style="margin-bottom:-1px"><rect x="0" y="0" width="9" height="9" fill="${p.color}" class="zoneFill"></svg>
|
||||
<svg data-tip="Province fill style. Click to change" width=".9em" height=".9em" style="margin-bottom:-1px"><rect x="0" y="0" width="100%" height="100%" fill="${p.color}" class="zoneFill"></svg>
|
||||
<input data-tip="Province name. Click and type to change" class="stateName" value="${p.name}" autocorrect="off" spellcheck="false">
|
||||
<span data-tip="Click to re-generate province name" class="icon-arrows-cw stateName hoverButton placeholder"></span>
|
||||
<span data-tip="Click to open province COA in the Iron Arachne Heraldry Generator" class="icon-fleur pointer hide"></span>
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ function editReligions() {
|
|||
if (r.i) {
|
||||
lines += `<div class="states religions" data-id=${r.i} data-name="${r.name}" data-color="${r.color}" data-area=${area}
|
||||
data-population=${population} data-type=${r.type} data-form=${r.form} data-deity="${r.deity?r.deity:''}" data-expansionism=${r.expansionism}>
|
||||
<svg data-tip="Religion fill style. Click to change" width="9" height="9" style="margin-bottom:-1px"><rect x="0" y="0" width="9" height="9" fill="${r.color}" class="zoneFill"></svg>
|
||||
<svg data-tip="Religion fill style. Click to change" width=".9em" height=".9em" style="margin-bottom:-1px"><rect x="0" y="0" width="100%" height="100%" fill="${r.color}" class="zoneFill"></svg>
|
||||
<input data-tip="Religion name. Click and type to change" class="religionName" value="${r.name}" autocorrect="off" spellcheck="false">
|
||||
<select data-tip="Religion type" class="religionType">${getTypeOptions(r.type)}</select>
|
||||
<input data-tip="Religion form" class="religionForm hide" value="${r.form}" autocorrect="off" spellcheck="false">
|
||||
|
|
@ -291,6 +291,7 @@ function editReligions() {
|
|||
|
||||
function showHierarchy() {
|
||||
// build hierarchy tree
|
||||
pack.religions[0].origin = null;
|
||||
const religions = pack.religions.filter(r => !r.removed);
|
||||
let root = d3.stratify().id(d => d.i).parentId(d => d.origin)(religions);
|
||||
const treeWidth = root.leaves().length;
|
||||
|
|
@ -360,9 +361,9 @@ function editReligions() {
|
|||
const religion = d.data.i;
|
||||
const oldOrigin = d.data.origin;
|
||||
let newOrigin = selected.datum().data.i;
|
||||
if (newOrigin == oldOrigin) return; // already child of the selected node
|
||||
if (d.descendants().some(node => node.id == newOrigin)) return; // cannot be a child of its own child
|
||||
if (newOrigin == oldOrigin) return; // already a child of the selected node
|
||||
if (newOrigin == religion) newOrigin = 0; // move to top
|
||||
if (newOrigin && d.descendants().some(node => node.id == newOrigin)) return; // cannot be a child of its own child
|
||||
pack.religions[religion].origin = d.data.origin = newOrigin; // change data
|
||||
showHierarchy() // update hierarchy
|
||||
});
|
||||
|
|
|
|||
|
|
@ -91,24 +91,24 @@ function editStates() {
|
|||
<span class="icon-star-empty placeholder hide"></span>
|
||||
<input class="stateCapital placeholder hide">
|
||||
<select class="stateCulture placeholder hide">${getCultureOptions(0)}</select>
|
||||
<select class="cultureType ${hidden} placeholder show hide">${getTypeOptions(0)}</select>
|
||||
<span class="icon-resize-full ${hidden} placeholder show hide"></span>
|
||||
<input class="statePower ${hidden} placeholder show hide" type="number" value=0>
|
||||
<span data-tip="Cells count" class="icon-check-empty ${hidden} show hide"></span>
|
||||
<div data-tip="Cells count" class="stateCells ${hidden} show hide">${s.cells}</div>
|
||||
<span data-tip="Burgs count" style="padding-right: 1px" class="icon-dot-circled hide"></span>
|
||||
<div data-tip="Burgs count" class="stateBurgs hide">${s.burgs}</div>
|
||||
<span data-tip="State area" style="padding-right: 4px" class="icon-map-o hide"></span>
|
||||
<div data-tip="State area" class="biomeArea hide">${si(area) + unit}</div>
|
||||
<span data-tip="${populationTip}" class="icon-male hide"></span>
|
||||
<div data-tip="${populationTip}" class="culturePopulation hide">${si(population)}</div>
|
||||
<select class="cultureType ${hidden} placeholder show hide">${getTypeOptions(0)}</select>
|
||||
<span class="icon-resize-full ${hidden} placeholder show hide"></span>
|
||||
<input class="statePower ${hidden} placeholder show hide" type="number" value=0>
|
||||
<span data-tip="Cells count" class="icon-check-empty ${hidden} show hide"></span>
|
||||
<div data-tip="Cells count" class="stateCells ${hidden} show hide">${s.cells}</div>
|
||||
</div>`;
|
||||
continue;
|
||||
}
|
||||
const capital = pack.burgs[s.capital].name;
|
||||
lines += `<div class="states" data-id=${s.i} data-name="${s.name}" data-form="${s.formName}" data-capital="${capital}" data-color="${s.color}" data-cells=${s.cells}
|
||||
data-area=${area} data-population=${population} data-burgs=${s.burgs} data-culture=${pack.cultures[s.culture].name} data-type=${s.type} data-expansionism=${s.expansionism}>
|
||||
<svg data-tip="State fill style. Click to change" width="9" height="9" style="margin-bottom:-1px"><rect x="0" y="0" width="9" height="9" fill="${s.color}" class="zoneFill"></svg>
|
||||
<svg data-tip="State fill style. Click to change" width=".9em" height=".9em" style="margin-bottom:-1px"><rect x="0" y="0" width="100%" height="100%" fill="${s.color}" class="zoneFill"></svg>
|
||||
<input data-tip="State name. Click and type to change" class="stateName" value="${s.name}" autocorrect="off" spellcheck="false">
|
||||
<span data-tip="Click to re-generate name" class="icon-arrows-cw stateName hoverButton placeholder"></span>
|
||||
<span data-tip="Click to open state COA in the Iron Arachne Heraldry Generator" class="icon-fleur pointer hide"></span>
|
||||
|
|
@ -117,17 +117,17 @@ function editStates() {
|
|||
<span data-tip="State capital. Click to zoom into view" class="icon-star-empty pointer hide"></span>
|
||||
<input data-tip="Capital name. Click and type to rename" class="stateCapital hide" value="${capital}" autocorrect="off" spellcheck="false"/>
|
||||
<select data-tip="Dominant culture. Click to change" class="stateCulture hide">${getCultureOptions(s.culture)}</select>
|
||||
<select data-tip="State type. Click to change" class="cultureType ${hidden} show hide">${getTypeOptions(s.type)}</select>
|
||||
<span data-tip="State expansionism" class="icon-resize-full ${hidden} show hide"></span>
|
||||
<input data-tip="Expansionism (defines competitive size). Change to re-calculate states based on new value" class="statePower ${hidden} show hide" type="number" min=0 max=99 step=.1 value=${s.expansionism}>
|
||||
<span data-tip="Cells count" class="icon-check-empty ${hidden} show hide"></span>
|
||||
<div data-tip="Cells count" class="stateCells ${hidden} show hide">${s.cells}</div>
|
||||
<span data-tip="Burgs count" style="padding-right: 1px" class="icon-dot-circled hide"></span>
|
||||
<div data-tip="Burgs count" class="stateBurgs hide">${s.burgs}</div>
|
||||
<span data-tip="State area" style="padding-right: 4px" class="icon-map-o hide"></span>
|
||||
<div data-tip="State area" class="biomeArea hide">${si(area) + unit}</div>
|
||||
<span data-tip="${populationTip}" class="icon-male hide"></span>
|
||||
<div data-tip="${populationTip}" class="culturePopulation hide">${si(population)}</div>
|
||||
<select data-tip="State type. Defines growth model. Click to change" class="cultureType ${hidden} show hide">${getTypeOptions(s.type)}</select>
|
||||
<span data-tip="State expansionism" class="icon-resize-full ${hidden} show hide"></span>
|
||||
<input data-tip="Expansionism (defines competitive size). Change to re-calculate states based on new value" class="statePower ${hidden} show hide" type="number" min=0 max=99 step=.1 value=${s.expansionism}>
|
||||
<span data-tip="Cells count" class="icon-check-empty ${hidden} show hide"></span>
|
||||
<div data-tip="Cells count" class="stateCells ${hidden} show hide">${s.cells}</div>
|
||||
<span data-tip="Toggle state focus" class="icon-pin ${focused?'':' inactive'} hide"></span>
|
||||
<span data-tip="Remove the state" class="icon-trash-empty hide"></span>
|
||||
</div>`;
|
||||
|
|
@ -433,6 +433,7 @@ function editStates() {
|
|||
document.getElementById("statesHalo").style.display = "none";
|
||||
|
||||
statesEditor.querySelectorAll(".hide").forEach(el => el.classList.add("hidden"));
|
||||
statesBodySection.querySelectorAll("input.stateName").forEach(el => el.style.width = "7em");
|
||||
statesFooter.style.display = "none";
|
||||
body.querySelectorAll("div > input, select, span, svg").forEach(e => e.style.pointerEvents = "none");
|
||||
$("#statesEditor").dialog({position: {my: "right top", at: "right-10 top+10", of: "svg", collision: "fit"}});
|
||||
|
|
@ -597,6 +598,7 @@ function editStates() {
|
|||
document.getElementById("statesHalo").style.display = "block";
|
||||
|
||||
statesEditor.querySelectorAll(".hide:not(.show)").forEach(el => el.classList.remove("hidden"));
|
||||
statesBodySection.querySelectorAll("input.stateName").forEach(el => el.style.width = "");
|
||||
statesFooter.style.display = "block";
|
||||
body.querySelectorAll("div > input, select, span, svg").forEach(e => e.style.pointerEvents = "all");
|
||||
if(!close) $("#statesEditor").dialog({position: {my: "right top", at: "right-10 top+10", of: "svg", collision: "fit"}});
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ function editUnits() {
|
|||
document.getElementById("distanceUnitInput").addEventListener("change", changeDistanceUnit);
|
||||
document.getElementById("distanceScaleOutput").addEventListener("input", changeDistanceScale);
|
||||
document.getElementById("distanceScaleInput").addEventListener("change", changeDistanceScale);
|
||||
document.getElementById("distanceScaleInput").addEventListener("mouseenter", hideDistanceUnitOutput);
|
||||
document.getElementById("distanceScaleInput").addEventListener("mouseleave", showDistanceUnitOutput);
|
||||
document.getElementById("areaUnit").addEventListener("change", () => lock("areaUnit"));
|
||||
document.getElementById("heightUnit").addEventListener("change", changeHeightUnit);
|
||||
document.getElementById("heightExponentInput").addEventListener("input", changeHeightExponent);
|
||||
|
|
@ -45,10 +43,8 @@ function editUnits() {
|
|||
if (this.value === "custom_name") {
|
||||
const custom = prompt("Provide a custom name for distance unit");
|
||||
if (custom) this.options.add(new Option(custom, custom, false, true));
|
||||
else {this.value = document.getElementById("distanceUnitOutput").innerHTML; return;};
|
||||
}
|
||||
|
||||
document.getElementById("distanceUnitOutput").innerHTML = this.value;
|
||||
lock("distanceUnit");
|
||||
drawScaleBar();
|
||||
calculateFriendlyGridSize();
|
||||
|
|
@ -71,9 +67,6 @@ function editUnits() {
|
|||
calculateFriendlyGridSize();
|
||||
}
|
||||
|
||||
function hideDistanceUnitOutput() {document.getElementById("distanceUnitOutput").style.opacity = .2;}
|
||||
function showDistanceUnitOutput() {document.getElementById("distanceUnitOutput").style.opacity = 1;}
|
||||
|
||||
function changeHeightUnit() {
|
||||
if (this.value === "custom_name") {
|
||||
const custom = prompt("Provide a custom name for height unit");
|
||||
|
|
@ -163,7 +156,7 @@ function editUnits() {
|
|||
// units
|
||||
const US = navigator.language === "en-US";
|
||||
const UK = navigator.language === "en-GB";
|
||||
distanceUnitInput.value = distanceUnitOutput.value = US || UK ? "mi" : "km";
|
||||
distanceUnitInput.value = US || UK ? "mi" : "km";
|
||||
heightUnit.value = US || UK ? "ft" : "m";
|
||||
temperatureScale.value = US ? "°F" : "°C";
|
||||
areaUnit.value = "square";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
function editWorld() {
|
||||
if (customization) return;
|
||||
$("#worldConfigurator").dialog({title: "Configure World", resizable: false, width: 460,
|
||||
$("#worldConfigurator").dialog({title: "Configure World", resizable: false, width: "42em",
|
||||
buttons: {
|
||||
"Whole World": () => applyPreset(100, 50),
|
||||
"Northern": () => applyPreset(33, 25),
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function editZones() {
|
|||
const focused = defs.select("#fog #focus"+this.id).size();
|
||||
|
||||
lines += `<div class="states" data-id="${this.id}" data-fill="${fill}" data-description="${description}" data-cells=${c.length} data-area=${area} data-population=${population}>
|
||||
<svg data-tip="Zone fill style. Click to change" width="9" height="9" style="margin-bottom:-1px"><rect x="0" y="0" width="9" height="9" fill="${fill}" class="zoneFill"></svg>
|
||||
<svg data-tip="Zone fill style. Click to change" width=".9em" height=".9em" style="margin-bottom:-1px"><rect x="0" y="0" width="100%" height="100%" fill="${fill}" class="zoneFill"></svg>
|
||||
<input data-tip="Zone description. Click and type to change" class="religionName" value="${description}" autocorrect="off" spellcheck="false">
|
||||
<span data-tip="Cells count" class="icon-check-empty hide"></span>
|
||||
<div data-tip="Cells count" class="stateCells hide">${c.length}</div>
|
||||
|
|
@ -310,7 +310,7 @@ function editZones() {
|
|||
const unit = areaUnit.value === "square" ? " " + distanceUnitInput.value + "²" : " " + areaUnit.value;
|
||||
|
||||
const line = `<div class="states" data-id="${id}" data-fill="${fill}" data-description="${description}" data-cells=0 data-area=0 data-population=0>
|
||||
<svg data-tip="Zone fill style. Click to change" width="9" height="9" style="margin-bottom:-1px"><rect x="0" y="0" width="9" height="9" fill="${fill}" class="zoneFill"></svg>
|
||||
<svg data-tip="Zone fill style. Click to change" width=".9em" height=".9em" style="margin-bottom:-1px"><rect x="0" y="0" width="100%" height="100%" fill="${fill}" class="zoneFill"></svg>
|
||||
<input data-tip="Zone description. Click and type to change" class="religionName" value="${description}" autocorrect="off" spellcheck="false">
|
||||
<span data-tip="Cells count" class="icon-check-empty hide"></span>
|
||||
<div data-tip="Cells count" class="stateCells hide">0</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue