From f4a84fc6d68e9800c1b09db1ee0933b0ef9aa591 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 15 Mar 2020 17:35:07 +0300 Subject: [PATCH 01/20] v1.3a --- icons.css | 4 +- index.css | 148 +++++---- index.html | 191 ++++++++---- lang/lang-en.js | 511 +++++++++++++++++++++++++++++++ lang/lang-ru.js | 23 ++ libs/translate.js | 55 ++++ main.js | 129 +++----- modules/burgs-and-states.js | 45 ++- modules/military-generator.js | 241 +++++++++++++++ modules/river-generator.js | 6 +- modules/save-and-load.js | 60 ++-- modules/ui/editors.js | 5 +- modules/ui/general.js | 42 ++- modules/ui/heightmap-editor.js | 9 +- modules/ui/layers.js | 2 +- modules/ui/military-overview.js | 195 +++++++++--- modules/ui/options.js | 19 +- modules/ui/provinces-editor.js | 4 +- modules/ui/regiment-editor.js | 277 +++++++++++++++++ modules/ui/states-editor.js | 6 +- modules/ui/world-configurator.js | 19 +- modules/utils.js | 12 + 22 files changed, 1678 insertions(+), 325 deletions(-) create mode 100644 lang/lang-en.js create mode 100644 lang/lang-ru.js create mode 100644 libs/translate.js create mode 100644 modules/military-generator.js create mode 100644 modules/ui/regiment-editor.js diff --git a/icons.css b/icons.css index 01b6a6caf..8592ca9fe 100644 --- a/icons.css +++ b/icons.css @@ -250,7 +250,9 @@ .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: 1.1em; margin: -2px;} +/* .icon-coa:before {content: '⚜'; font-size: 1.1em; margin: -2px;} */ +.icon-coa:before {content:'\f3ed'; font-size: .9em; color: #999;} /* '' */ +.icon-half:before {font-weight: bold;content:'½';} .icon-curve:before {content: 'C';} .icon-area:before {content: 'O';} .icon-curve:before, diff --git a/index.css b/index.css index bb6a88789..c327c8b78 100644 --- a/index.css +++ b/index.css @@ -10,16 +10,36 @@ body { height: 100%; } +t { + pointer-events: none; +} + input, select, button { font-size: 1em; } +input, select, textarea { + border: 0.5px solid #DBDFE6; + border-radius: .5px; + box-sizing: border-box; +} + select { height: 1.6em; + border-top-color: #abadb3; + padding: 0; + text-indent: 0px; } input { - height: 1.1em; + border-top-color: #abadb3; + padding: 2px; + text-indent: 1px; +} + +textarea { + padding: 2px; + text-indent: 1px; } #map { @@ -50,11 +70,7 @@ input, button, select, a, textarea { outline: none; } -button, select, a { - cursor: pointer; -} - -.pointer { +button, select, a, .pointer { cursor: pointer; } @@ -79,7 +95,7 @@ button, select, a { fill-rule: evenodd; } -#lakes, #coastline { +#lakes, #coastline, #armies { cursor: pointer; } @@ -101,7 +117,7 @@ button, select, a { stroke-linejoin: round; } -#regions, #provs, #terrs, #biomes, #tooltip, #temperature, #texture, #landmass { +#regions, #cults, #relig, #biomes, #provs, #terrs, #biomes, #tooltip, #temperature, #texture, #landmass { pointer-events: none; } @@ -193,6 +209,29 @@ i.icon-lock { cursor: pointer; } +#armies rect { + stroke-width: .3; + stroke: #000; +} + +#armies text { + pointer-events: none; + user-select: none; + stroke: none; + fill: #fff; + text-shadow: 0 0 4px #000; + font-size: 6px; + dominant-baseline: central; + text-anchor: middle; + font-family: Helvetica; +} + +#regimentBase { + stroke-width: .3; + stroke: #000; + cursor: move; +} + .chartInfo { text-align: center; font-family: sans-serif; @@ -231,8 +270,8 @@ i.icon-lock { marker-end: url(#end-arrow); stroke: #333333; stroke-dasharray: 5; - stroke-dashoffset: 100; - animation: dash 8s linear backwards; + stroke-dashoffset: 1000; + animation: dash 80s linear backwards; } @keyframes dash { @@ -375,6 +414,8 @@ input[type="color"]::-webkit-color-swatch-wrapper { -moz-appearance: none; -webkit-appearance: none; margin-left: 0; + border: 0; + padding: 0; } #options input[type="range"]::-webkit-slider-thumb { @@ -412,17 +453,12 @@ input[type="color"]::-webkit-color-swatch-wrapper { } #options input[type="number"] { - height: 1.3em; - line-height: 1.2em; font-size: .8em; } #options input[type="text"] { border: 0px; - padding-left: 3px; width: 62%; - height: 1.1em; - line-height: 1.3em; font-size: smaller; } @@ -441,8 +477,8 @@ input[type="color"]::-webkit-color-swatch-wrapper { #optionsContent input[type=number]::-webkit-inner-spin-button, #optionsContent input[type=number]::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; + -webkit-appearance: none; + margin: 0; } #optionsContent input[type="number"]:hover { @@ -450,8 +486,6 @@ input[type="color"]::-webkit-color-swatch-wrapper { } #optionsContent input.paired { - width: 2.5em; - margin-left: -.3em; text-align: center; background-color: white; } @@ -460,8 +494,6 @@ input[type="color"]::-webkit-color-swatch-wrapper { width: 100%; background-color: white; text-align: left; - padding-left: 0.4em; - box-sizing: border-box; height: 1.5em; } @@ -509,7 +541,7 @@ input[type="color"]::-webkit-color-swatch-wrapper { #styleElements input[type="number"] { width: 52px; border: 0; - padding-left: 2.5px; + padding-left: 2.5px; } #sticked button { @@ -1006,6 +1038,7 @@ i.resetButton:active { } .ui-dialog input[type="range"] { + padding: 0; height: 2px; background: #d4d4d4; top: -.35em; @@ -1035,8 +1068,7 @@ i.resetButton:active { } .ui-dialog input[type="number"] { - width: 2.5em; - height: 1.1em; + width: 3.5em; } .ui-dialog .disabled { @@ -1136,6 +1168,9 @@ div.header > div { font-size: .9em; display: inline-block; position: sticky; + white-space: nowrap; + overflow-x: hidden; + vertical-align: bottom; } .sortable { @@ -1182,15 +1217,8 @@ div.states div { width: 3.2em; } -div.states .statePower { - width: 3.2em; - line-height: 1.4em; - -moz-appearance: textfield; -} - -div.states .biomeHabitability { - width: 3.6em; - line-height: 1.4em; +div.states .statePower, div.states .biomeHabitability { + width: 4em; -moz-appearance: textfield; } @@ -1209,13 +1237,9 @@ div.states>.statePopulation { div.states .icon-pencil, div.states .icon-trash-empty, div.states .icon-eye, -div.states .icon-pin { - cursor: pointer; -} - +div.states .icon-pin, div.states .icon-flag-empty { cursor: pointer; - font-size: .9em; } div.states .icon-resize-vertical { @@ -1332,18 +1356,22 @@ div.states>input.riverType { line-height: 1.4em; } -#stateNameEditor input, -#provinceNameEditor input { - padding-left: .3em; -} - #stateNameEditor div.label, #provinceNameEditor div.label, -#burgBody div.label { +#burgBody div.label, +#regimentBody div.label { display: inline-block; width: 5.5em; } +#regimentBody div { + margin: .1em 0; +} + +#regimentBody input[type="number"] { + width: 5em; +} + .burgFeature { font-size: 1.2em; padding: 1px 2px; @@ -1423,16 +1451,17 @@ rect.fillRect { stroke-width: 2; } -#militaryBody div.states > div { - width: 4em; +#militaryHeader > div { + width: 5.2em; } -#militaryBody div.states > input.militaryArmy { - width: 5em; +#militaryBody div.states > input { + -moz-appearance: textfield; } -#militaryBody div.states > input.militaryFleet { - width: 3.3em; +#militaryBody div.states > input, +#militaryBody div.states > div { + width: 5em; } #picker text { @@ -1522,6 +1551,7 @@ rect.fillRect { #unitsBody>div>* { display: inline-block; + margin-bottom: .2em; } .unitsHeader { @@ -1550,7 +1580,6 @@ rect.fillRect { width: 11.32em; } - #unitsBody>div>input[type="number"] { width: 3.4em; } @@ -1570,8 +1599,9 @@ rect.fillRect { } #barBackColor { - width: 3.45em; + width: 3.5em; padding: 0px; + height: 1.2em; } #ruler { @@ -1627,6 +1657,20 @@ rect.fillRect { font-family: Georgia; } +#militaryOptionsTable select { + border: 1px solid #d4d4d4; +} + +#militaryOptionsTable input { + width: 9em; + padding-left: 3px; + border: 1px solid #d4d4d4; +} + +#militaryOptionsTable input[type="number"] { + width: 4em; +} + #gridOverlay { fill: none; } diff --git a/index.html b/index.html index c698a03b8..175ee49e1 100644 --- a/index.html +++ b/index.html @@ -25,7 +25,7 @@ @keyframes spin {0% {transform: rotate(0deg);} 100% {transform: rotate(359deg);}} #loading {opacity:1; font-size: 11px; color:#fff5da; text-align:center; text-shadow:0px 1px 4px #4c3a35; width:80%; max-width:600px; position:fixed; top:50%; left:50%; transform:translate(-50%, -50%); pointer-events:none;} #loading-text {font-size: 1.8em; margin: 0.2em 0 0 1em;} - #title_name {text-align: left;font-size: 3em;margin-left: 5%;} + #titleName {text-align: left;font-size: 3em;margin-left: 5%;} #title {font-size: 7em;margin: -12px 0 -6px 0;} #version {text-align: right;font-size: 2em;margin-right: 3%;} #loading-text > span {font-size: 1.3em; padding-left: 1px; line-height: 0px;} @@ -897,29 +897,29 @@
-
Azgaar's
-
Fantasy Map Generator
-
v. 1.2
-

LOADING...

+
Azgaar's
+
Fantasy Map Generator
+
v. 1.2
+

LOADING...

- - + +
- + @@ -2367,6 +2379,28 @@
+ + @@ -2548,7 +2583,7 @@