diff --git a/assets/commons/content-copy-custom.png b/assets/commons/content-copy-custom.png new file mode 100644 index 00000000..eb8f4330 Binary files /dev/null and b/assets/commons/content-copy-custom.png differ diff --git a/css/simulator-ui/main.css b/css/simulator-ui/main.css index 5605b997..6de861d9 100644 --- a/css/simulator-ui/main.css +++ b/css/simulator-ui/main.css @@ -64,7 +64,14 @@ div.fleet div.iconForm { div.fleet div.iconForm img { height: 40px; } +img.copyIcons { + cursor: pointer; +} +#divMain { + width: 1086px; + margin: auto; +} #divBattles { width: fit-content; } @@ -193,6 +200,9 @@ div.fleetCompAdd > div { input.changed { background-color: yellow; } +input[type="button"] { + cursor: pointer; +} #divSimStatsButtons { margin-top: 10px; @@ -238,6 +248,8 @@ div.progressBarInner { display: flex; } #divResultColsWrap div.resultCol { + padding-left: 5px; + border-left: 1px solid #e3e3e3; margin-right: 20px; } #divResultColsWrap div.resultCol > div { @@ -302,6 +314,8 @@ div.progressBarInner { } #divChangeLog { + width: 1086px; + margin: auto; margin-top: 20px; font-size: 14px; } @@ -309,6 +323,8 @@ div.progressBarInner { font-weight: bold; } #divFooter { + width: 1086px; + margin: auto; margin-top: 20px; font-size: 14px; } @@ -467,6 +483,23 @@ span.tooltip { #divAutoBonus div.autoBonusMainFoot > div:last-child { margin-left: auto; } +#notice { + position: fixed; + bottom: 30px; + right: 0; + display: flex; + align-items: center; + justify-content: center; + width: 190px; + height: 65px; + border: 2px solid #6ae3ff; + border-right: none; + font-size: 15px; + font-weight: 600; + color: #ffffff; + background-color: #4EABF5; + opacity: 0; +} span.autoBonusStatus { font-weight: bold; } @@ -475,4 +508,4 @@ span.autoBonusStatus.good { } .invisible { visibility: hidden; -} \ No newline at end of file +} diff --git a/css/simulator-ui/selector.css b/css/simulator-ui/selector.css index da67bfda..4510a5c9 100644 --- a/css/simulator-ui/selector.css +++ b/css/simulator-ui/selector.css @@ -1,15 +1,19 @@ #divShipSelMain, #divEquipSelMain { background-color: #EDE6D8; width: 720px; - height: 560px; + height: 760px; border: 1px solid transparent; box-shadow: 0 0 5px black; } +#divEquipSelMain { + width: 1200px; +} #divShipSelSearch, #divEquipSelSearch { margin-left: 30px; margin-top: 15px; } #divShipSelResults, #divEquipSelResults { + overscroll-behavior: none; overflow-y: scroll; height: 504px; } @@ -75,7 +79,8 @@ div.selButtonBack > :last-child { } #divShipSelButtonsShip { - max-height: 500px; + max-height: 700px; + overscroll-behavior: none; overflow-y: scroll; margin-left: 30px; margin-top: 15px; @@ -83,7 +88,7 @@ div.selButtonBack > :last-child { flex-basis: 0; flex-wrap: wrap; font-family: Verdana,Arial,sans-serif; - font-size: 1.1em; + font-size: 1.1em; } #divShipSelButtonsShip div.remodelButtonWrap { display: flex; @@ -102,25 +107,34 @@ div.selButtonBack > :last-child { } #divEquipSelButtonsEquip { - max-height: 500px; + overscroll-behavior: none; + max-height: 700px; overflow-y: scroll; margin: 15px 30px; font-family: Verdana,Arial,sans-serif; - font-size: 1.1em; + font-size: 1.1em; } #divEquipSelButtonsEquip div.equipButtonWrap { display: flex; - flex-direction: column; + flex-direction: row; + flex-wrap: wrap; flex-basis: 0; margin-bottom: 30px; font-size: 14px; } #divEquipSelButtonsEquip div.equipButton { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + width: calc(25% - 20px); display: flex; border: 1px solid black; - margin: 1px; + margin: 2px; padding-bottom: 2px; background-color: white; + border-right: none; + border-bottom: none; + font-size: 13px; } #divEquipSelButtonsEquip div.equipButton:hover { background-color: #78BEB5; @@ -128,10 +142,9 @@ div.selButtonBack > :last-child { } #divEquipSelButtonsEquip div.equipButton img { vertical-align: middle; - margin-left: 12px; + margin-left: 2px; margin-right: 2px; } #divEquipSelButtonsEquip div.equipButton span { vertical-align: middle; } - diff --git a/js/simulator-ui/cmp.js b/js/simulator-ui/cmp.js index 765f1e8a..daa69559 100644 --- a/js/simulator-ui/cmp.js +++ b/js/simulator-ui/cmp.js @@ -190,4 +190,4 @@ COMMON.i18n = VueI18n.createI18n({ messages, }); -})(); \ No newline at end of file +})(); diff --git a/js/simulator-ui/fleet-editor.js b/js/simulator-ui/fleet-editor.js index b3dbbd7e..c488dc6d 100644 --- a/js/simulator-ui/fleet-editor.js +++ b/js/simulator-ui/fleet-editor.js @@ -789,6 +789,10 @@ var UI_FLEETEDITOR = Vue.createApp({ receiveCloseEquip: function() { UI_FLEETEDITOR.refocusEquip(); }, + // c.One click on the text area for importing deck builder data will select all the data. + onclickSelectAll: function(event) { + event.target.select(); + } }, }).component('vmodal',COMMON.CMP_MODAL).use(COMMON.i18n).mount('#divFleetEditor'); @@ -1141,4 +1145,4 @@ COMMON.global.fleetEditorMoveTemp = function(elFrom) { } } -})(); \ No newline at end of file +})(); diff --git a/js/simulator-ui/selector.js b/js/simulator-ui/selector.js index 2a57df3f..10f57328 100644 --- a/js/simulator-ui/selector.js +++ b/js/simulator-ui/selector.js @@ -473,4 +473,4 @@ COMMON.global.equipSelectorClose = function() { } -})(); \ No newline at end of file +})(); diff --git a/js/simulator-ui/sim-interface.js b/js/simulator-ui/sim-interface.js index 9fb9022f..bd346067 100644 --- a/js/simulator-ui/sim-interface.js +++ b/js/simulator-ui/sim-interface.js @@ -943,4 +943,4 @@ var SIM = { window.SIM = SIM; -})() \ No newline at end of file +})() diff --git a/js/simulator-ui/ui-main.js b/js/simulator-ui/ui-main.js index ef0cdd3f..f94f4961 100644 --- a/js/simulator-ui/ui-main.js +++ b/js/simulator-ui/ui-main.js @@ -547,6 +547,49 @@ var UI_MAIN = Vue.createApp({ onclickSetFCF: function() { UI_FCFSETTINGS.doOpen(this.settingsFCF); }, + + // a. Clipboard copy function on results screen (a'. and simple notification function) + onclickCopyResults: function(typeString) { + let isJP = document.querySelector('#divMain input[value="ja"]').checked; + let text = ''; + + const results = this.results; + const retreat_rate = Math.floor(results.retreat * 1000) / 10; + const s_rate = Math.floor(results.rankS * 1000) / 10; + const flagSunk_rate = Math.floor(results.flagSunk * 1000) / 10; + if(typeString === 'S') { + if(isJP) { + text = `撤退率: ${retreat_rate}%, S率: ${s_rate}%\nS勝利あたり\n燃料: ${results.fuelS}\n弾薬: ${results.ammoS}\n鋼材: ${results.steelS}\nボーキ: ${results.bauxS}\nバケツ: ${results.bucketS}`; + } else { + text = `retreat: ${retreat_rate}%, S rate: ${s_rate}%\nAvg Resource Per S\nfuel: ${results.fuelS}\nammo: ${results.ammoS}\nsteel: ${results.steelS}\nbauX: ${results.bauxS}\nbucket: ${results.bucketS}`; + } + } else if(typeString === 'Flag') { + if(isJP) { + text = `撤退率: ${retreat_rate}%, 旗艦撃沈率: ${flagSunk_rate}%\n旗艦撃沈あたり\n燃料: ${results.fuelSunk}\n弾薬: ${results.ammoSunk}\n鋼材: ${results.steelSunk}\nボーキ: ${results.bauxSunk}\nバケツ: ${results.bucketSunk}`; + } else { + text = `retreat: ${retreat_rate}%, Flagship Sunk rate: ${flagSunk_rate}%\nAvg Resource Per Flagship Sunk\nfuel: ${results.fuelSunk}\nammo: ${results.ammoSunk}\nsteel: ${results.steelSunk}\nbauX: ${results.bauxSunk}\nbucket: ${results.bucketSunk}`; + } + } + let textarea = document.createElement('textarea'); + textarea.style.position = 'fixed'; + textarea.style.opacity = 0; + textarea.value = text; + document.body.appendChild(textarea); + textarea.select(); + document.execCommand('Copy'); + document.body.removeChild(textarea); + this.displayNotice('copied'); + }, + + // a'. and simple notification function + displayNotice: function(text) { + const notice = document.getElementById('notice'); + notice.textContent = text; + notice.style.opacity = '1'; + setTimeout(function() { + notice.style.opacity = '0'; + }, 1000); + } }, }).component('vbattle',{ props: ['battle','candelete','isboss'], @@ -1672,7 +1715,19 @@ var UI_AUTOBONUS = Vue.createApp({ }, }).component('vmodal',COMMON.CMP_MODAL).component('vloading',COMMON.CMP_LOADING).mount('#divAutoBonus'); - +// b.Keyboard shortcuts (for now, for the start of calculation) +window.addEventListener('keydown', function(event) { + const key = event.key.toLowerCase(); + switch(key) { + case 'enter': + const focusedElement = document.activeElement; + if(focusedElement.tagName !== 'INPUT' && !focusedElement.tagName !== 'TEXTAREA') { + UI_MAIN.onclickGo(); + scrollTo(0, document.querySelector('#divSimStatsButtons input[value="Go"]').getBoundingClientRect().top + window.pageYOffset); + } + break; + } +}); document.body.onunload = function() { if (UI_MAIN.canSave) { @@ -1682,4 +1737,4 @@ document.body.onunload = function() { COMMON.UI_MAIN = UI_MAIN; //debug -})(); \ No newline at end of file +})(); diff --git a/simulator.html b/simulator.html index f83194b3..1decb3ed 100644 --- a/simulator.html +++ b/simulator.html @@ -1,8 +1,9 @@ - + KanColle Sortie Simulator + @@ -400,7 +401,7 @@

Statistics

-
Avg Resource Per S:
+
Avg Resource Per S:
@@ -411,7 +412,7 @@

Statistics

Fuel{{results.fuelS}}
Ammo{{results.ammoS}}
-
Avg Resource Per Flagship Sunk:
+
Avg Resource Per Flagship Sunk:
@@ -474,6 +475,9 @@

Statistics

2017-03-23 - Fifth slot, separate plane improvement and proficiency, changed save/load code, day soft-cap option
2016-10-25 - Major reworking and improving of calculations. Added calculations explanations.
+
+ テスト +
Bug reports/feature requests: Github
@@ -623,7 +627,7 @@

Statistics

Load options:
From text:
-
+
Fleet:
+
@@ -1087,7 +1091,7 @@

Statistics

-
+
@@ -1394,4 +1398,4 @@

Statistics

- \ No newline at end of file +
Fuel{{results.fuelSunk}}
Ammo{{results.ammoSunk}}