diff --git a/noname/library/configuration-menu.js b/noname/library/configuration-menu.js index 650171cc5..5f5bcc431 100644 --- a/noname/library/configuration-menu.js +++ b/noname/library/configuration-menu.js @@ -1,9 +1,15 @@ import { APPEARANCE } from "./configuration-menu/appearance.js"; +import { AUDIO } from "./configuration-menu/audio.js"; import { GENERAL } from "./configuration-menu/general.js"; +import { OTHERS } from "./configuration-menu/others.js"; +import { SKILL } from "./configuration-menu/skill.js"; import { VIEW } from "./configuration-menu/view.js"; export const CONFIGURATION_MENU = { general: GENERAL, appearence: APPEARANCE, - view: VIEW + view: VIEW, + audio: AUDIO, + skill: SKILL, + others: OTHERS }; diff --git a/noname/library/configuration-menu/appearance/configuration/automatic-border-count.js b/noname/library/configuration-menu/appearance/configuration/automatic-border-count.js index 9ff63d87e..f4d1bbcac 100644 --- a/noname/library/configuration-menu/appearance/configuration/automatic-border-count.js +++ b/noname/library/configuration-menu/appearance/configuration/automatic-border-count.js @@ -2,13 +2,13 @@ import { ITEM } from "./automatic-border-count/item.js"; const introduction = document.createElement("body"); const kill = document.createElement("strong"); -kill.textContent = "击杀"; +kill.append("击杀"); introduction.append(kill, " 每击杀一人,边框提升两级", document.createElement("br")); const damage = document.createElement("strong"); -damage.textContent = "伤害"; +damage.append("伤害"); introduction.append(damage, " 每造成两点伤害,边框提升一级", document.createElement("br")); const mix = document.createElement("strong"); -mix.textContent = "混合"; +mix.append("混合"); introduction.append(mix, " 击杀量决定边框颜色,伤害量决定边框装饰"); export const AUTOMATIC_BORDER_COUNT = { diff --git a/noname/library/configuration-menu/audio.js b/noname/library/configuration-menu/audio.js new file mode 100644 index 000000000..c799d0a27 --- /dev/null +++ b/noname/library/configuration-menu/audio.js @@ -0,0 +1,6 @@ +import { CONFIGURATION } from "./audio/configuration.js"; + +export const AUDIO = { + name: "音效", + config: CONFIGURATION +}; diff --git a/noname/library/configuration-menu/audio/configuration.js b/noname/library/configuration-menu/audio/configuration.js new file mode 100644 index 000000000..1885f4ecc --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration.js @@ -0,0 +1,32 @@ +import { BACKGROUND_AUDIO } from "./configuration/background-audio.js"; +import { BACKGROUND_MUSIC } from "./configuration/background-music.js"; +import { BACKGROUND_SPEAK } from "./configuration/background-speak.js"; +import { CLEAR_BACKGROUND_MUSIC } from "./configuration/clear-background-music.js"; +import { EQUIP_AUDIO } from "./configuration/equip-audio.js"; +import { IMPORT_MUSIC } from "./configuration/import-music.js"; +import { REPEAT_AUDIO } from "./configuration/repeat-audio.js"; +import { VOLUME_AUDIO } from "./configuration/volume-audio.js"; +import { VOLUME_BACKGROUND } from "./configuration/volume-background.js"; + +export const CONFIGURATION = { + update(config, map) { + if (config.background_music == "music_custom" && (lib.device || lib.node)) { + map.import_music.show(); + } + else { + map.import_music.hide(); + } + map.clear_background_music[get.is.object(config.customBackgroundMusic) ? "show" : "hide"](); + ui.background_music_setting = map.background_music; + map.background_music._link.config.updatex.call(map.background_music, []); + }, + background_music: BACKGROUND_MUSIC, + import_music: IMPORT_MUSIC, + background_audio: BACKGROUND_AUDIO, + background_speak: BACKGROUND_SPEAK, + equip_audio: EQUIP_AUDIO, + repeat_audio: REPEAT_AUDIO, + volumn_audio: VOLUME_AUDIO, + volumn_background: VOLUME_BACKGROUND, + clear_background_music: CLEAR_BACKGROUND_MUSIC +}; diff --git a/noname/library/configuration-menu/audio/configuration/background-audio.js b/noname/library/configuration-menu/audio/configuration/background-audio.js new file mode 100644 index 000000000..f627a8219 --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/background-audio.js @@ -0,0 +1,4 @@ +export const BACKGROUND_AUDIO = { + name: "游戏音效", + init: true +}; diff --git a/noname/library/configuration-menu/audio/configuration/background-music.js b/noname/library/configuration-menu/audio/configuration/background-music.js new file mode 100644 index 000000000..4be23a96c --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/background-music.js @@ -0,0 +1,18 @@ +import { ITEM } from "./background-music/item.js"; + +export const BACKGROUND_MUSIC = { + updatex() { + this.lastChild.innerHTML = this._link.config.item[lib.config.background_music]; + var menu = this._link.menu; + for (var i = 0; i < menu.childElementCount; i++) { + if (!["music_off", "music_custom", "music_random"].concat(lib.config.all.background_music).includes(menu.childNodes[i]._link)) menu.childNodes[i].delete(); + } + }, + name: "背景音乐", + init: true, + item: ITEM, + onclick(item) { + game.saveConfig("background_music", item); + game.playBackgroundMusic(); + } +}; diff --git a/noname/library/configuration-menu/audio/configuration/background-music/item.js b/noname/library/configuration-menu/audio/configuration/background-music/item.js new file mode 100644 index 000000000..fd62bea33 --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/background-music/item.js @@ -0,0 +1,3 @@ +export const ITEM = { + music_default: "默认" +}; diff --git a/noname/library/configuration-menu/audio/configuration/background-speak.js b/noname/library/configuration-menu/audio/configuration/background-speak.js new file mode 100644 index 000000000..434cb80e7 --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/background-speak.js @@ -0,0 +1,4 @@ +export const BACKGROUND_SPEAK = { + name: "人物配音", + init: true +}; diff --git a/noname/library/configuration-menu/audio/configuration/clear-background-music.js b/noname/library/configuration-menu/audio/configuration/clear-background-music.js new file mode 100644 index 000000000..77344c6bf --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/clear-background-music.js @@ -0,0 +1,21 @@ +export const CLEAR_BACKGROUND_MUSIC = { + name: "清除自定义背景音乐", + clear: true, + onclick() { + if (confirm("是否清除已导入的所有自定义背景音乐?(该操作不可撤销!)")) { + for (var i in lib.config.customBackgroundMusic) { + lib.config.all.background_music.remove(i); + if (i.startsWith("cdv_")) { + game.removeFile("audio/background/" + i + ".mp3"); + } + else { + game.deleteDB("audio", i); + } + } + lib.config.customBackgroundMusic = null; + game.saveConfig("customBackgroundMusic", null); + game.saveConfig("background_music", "music_off"); + if (!_status._aozhan) game.playBackgroundMusic(); + } + } +}; diff --git a/noname/library/configuration-menu/audio/configuration/equip-audio.js b/noname/library/configuration-menu/audio/configuration/equip-audio.js new file mode 100644 index 000000000..8601de4f7 --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/equip-audio.js @@ -0,0 +1,4 @@ +export const EQUIP_AUDIO = { + name: "装备配音", + init: false +}; diff --git a/noname/library/configuration-menu/audio/configuration/import-music.js b/noname/library/configuration-menu/audio/configuration/import-music.js new file mode 100644 index 000000000..77e806ea9 --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/import-music.js @@ -0,0 +1,18 @@ +const div = document.createElement("div"); +const style = div.style; +style.whiteSpace = "nowrap"; +style.width = "calc(100% - 5px)"; +const input = document.createElement("input"); +input.accept = "audio/*"; +input.style.width = "calc(100% - 40px)"; +input.type = "file"; +div.append(input); +const button = document.createElement("button"); +button.style.width = "40px"; +button.append("确定"); +div.append(button); + +export const IMPORT_MUSIC = { + name: div.outerHTML, + clear: true +} diff --git a/noname/library/configuration-menu/audio/configuration/repeat-audio.js b/noname/library/configuration-menu/audio/configuration/repeat-audio.js new file mode 100644 index 000000000..84bbaf69b --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/repeat-audio.js @@ -0,0 +1,4 @@ +export const REPEAT_AUDIO = { + name: "播放重复语音", + init: false +}; diff --git a/noname/library/configuration-menu/audio/configuration/volume-audio.js b/noname/library/configuration-menu/audio/configuration/volume-audio.js new file mode 100644 index 000000000..e18726bab --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/volume-audio.js @@ -0,0 +1,10 @@ +import { VOLUME_ITEM } from "./volume-item.js"; + +export const VOLUME_AUDIO = { + name: "音效音量", + init: 8, + item: VOLUME_ITEM, + onclick(volume) { + game.saveConfig("volumn_audio", parseInt(volume)); + } +}; diff --git a/noname/library/configuration-menu/audio/configuration/volume-background.js b/noname/library/configuration-menu/audio/configuration/volume-background.js new file mode 100644 index 000000000..ef52f0a34 --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/volume-background.js @@ -0,0 +1,11 @@ +import { VOLUME_ITEM } from "./volume-item.js"; + +export const VOLUME_BACKGROUND = { + name: "音乐音量", + init: 8, + item: VOLUME_ITEM, + onclick(volume) { + game.saveConfig("volumn_background", parseInt(volume)); + ui.backgroundMusic.volume = volume / 8; + } +}; diff --git a/noname/library/configuration-menu/audio/configuration/volume-item.js b/noname/library/configuration-menu/audio/configuration/volume-item.js new file mode 100644 index 000000000..99f1fb27d --- /dev/null +++ b/noname/library/configuration-menu/audio/configuration/volume-item.js @@ -0,0 +1,11 @@ +export const VOLUME_ITEM = { + "0": "〇", + "1": "一", + "2": "二", + "3": "三", + "4": "四", + "5": "五", + "6": "六", + "7": "七", + "8": "八" +}; diff --git a/noname/library/configuration-menu/others.js b/noname/library/configuration-menu/others.js new file mode 100644 index 000000000..ffc19f967 --- /dev/null +++ b/noname/library/configuration-menu/others.js @@ -0,0 +1,6 @@ +import { CONFIGURATION } from "./others/configuration.js"; + +export const OTHERS = { + name: "其它", + config: CONFIGURATION +}; diff --git a/noname/library/configuration-menu/others/configuration.js b/noname/library/configuration-menu/others/configuration.js new file mode 100644 index 000000000..491a070c2 --- /dev/null +++ b/noname/library/configuration-menu/others/configuration.js @@ -0,0 +1,25 @@ +import { EXPORT_DATA } from "./configuration/export-data.js"; +import { IMPORT_DATA_BUTTON } from "./configuration/import-data-button.js"; +import { IMPORT_DATA } from "./configuration/import-data.js"; +import { REDOWNLOAD_GAME } from "./configuration/redownload-game.js"; +import { RESET_GAME } from "./configuration/reset-game.js"; +import { RESET_HIDDEN_PACK } from "./configuration/reset-hidden-pack.js"; +import { RESET_TUTORIAL } from "./configuration/reset-tutorial.js"; + +export const CONFIGURATION = { + reset_game: RESET_GAME, + reset_hiddenpack: RESET_HIDDEN_PACK, + reset_tutorial: RESET_TUTORIAL, + import_data: IMPORT_DATA, + import_data_button: IMPORT_DATA_BUTTON, + export_data: EXPORT_DATA, + redownload_game: REDOWNLOAD_GAME, + update(config, map) { + if (lib.device || lib.node) { + map.redownload_game.show(); + } + else { + map.redownload_game.hide(); + } + } +}; diff --git a/noname/library/configuration-menu/others/configuration/export-data.js b/noname/library/configuration-menu/others/configuration/export-data.js new file mode 100644 index 000000000..ecf0522e9 --- /dev/null +++ b/noname/library/configuration-menu/others/configuration/export-data.js @@ -0,0 +1,30 @@ +export const EXPORT_DATA = { + name: "导出游戏设置", + onclick() { + var data; + var export_data = function (data) { + game.export(lib.init.encode(JSON.stringify(data)), "无名杀 - 数据 - " + (new Date()).toLocaleString()); + } + if (!lib.db) { + data = {}; + for (var i in localStorage) { + if (i.startsWith(lib.configprefix)) { + data[i] = localStorage[i]; + } + } + export_data(data); + } + else { + game.getDB("config", null, function (data1) { + game.getDB("data", null, function (data2) { + export_data({ + config: data1, + data: data2 + }); + }); + }); + } + + }, + clear: true +}; diff --git a/noname/library/configuration-menu/others/configuration/import-data-button.js b/noname/library/configuration-menu/others/configuration/import-data-button.js new file mode 100644 index 000000000..e310cc600 --- /dev/null +++ b/noname/library/configuration-menu/others/configuration/import-data-button.js @@ -0,0 +1,18 @@ +const div = document.createElement("div"); +const style = div.style; +style.whiteSpace = "nowrap"; +style.width = "calc(100% - 10px)"; +const input = document.createElement("input"); +input.accept = "*/*"; +input.style.width = "calc(100% - 40px)"; +input.type = "file"; +div.append(input); +const button = document.createElement("button"); +button.style.width = "40px"; +button.append("确定"); +div.append(button); + +export const IMPORT_DATA_BUTTON = { + name: div.outerHTML, + clear: true +}; diff --git a/noname/library/configuration-menu/others/configuration/import-data.js b/noname/library/configuration-menu/others/configuration/import-data.js new file mode 100644 index 000000000..0db98e92d --- /dev/null +++ b/noname/library/configuration-menu/others/configuration/import-data.js @@ -0,0 +1,7 @@ +export const IMPORT_DATA = { + name: "导入游戏设置", + onclick() { + ui.import_data_button.classList.toggle("hidden"); + }, + clear: true +}; diff --git a/noname/library/configuration-menu/others/configuration/redownload-game.js b/noname/library/configuration-menu/others/configuration/redownload-game.js new file mode 100644 index 000000000..61de58616 --- /dev/null +++ b/noname/library/configuration-menu/others/configuration/redownload-game.js @@ -0,0 +1,24 @@ +export const REDOWNLOAD_GAME = { + name: "重新下载游戏", + onclick() { + var node = this; + if (node._clearing) { + localStorage.removeItem("noname_inited"); + game.reload(); + return; + } + node._clearing = true; + node.firstChild.innerHTML = "单击以确认 (3)"; + setTimeout(function () { + node.firstChild.innerHTML = "单击以确认 (2)"; + setTimeout(function () { + node.firstChild.innerHTML = "单击以确认 (1)"; + setTimeout(function () { + node.firstChild.innerHTML = "重新下载游戏"; + delete node._clearing; + }, 1000); + }, 1000); + }, 1000); + }, + clear: true +}; diff --git a/noname/library/configuration-menu/others/configuration/reset-game.js b/noname/library/configuration-menu/others/configuration/reset-game.js new file mode 100644 index 000000000..ec6b047be --- /dev/null +++ b/noname/library/configuration-menu/others/configuration/reset-game.js @@ -0,0 +1,34 @@ +export const RESET_GAME = { + name: "重置游戏设置", + onclick() { + var node = this; + if (node._clearing) { + var noname_inited = localStorage.getItem("noname_inited"); + var onlineKey = localStorage.getItem(lib.configprefix + "key"); + localStorage.clear(); + if (noname_inited) { + localStorage.setItem("noname_inited", noname_inited); + } + if (onlineKey) { + localStorage.setItem(lib.configprefix + "key", onlineKey); + } + game.deleteDB("config"); + game.deleteDB("data"); + game.reload(); + return; + } + node._clearing = true; + node.firstChild.innerHTML = "单击以确认 (3)"; + setTimeout(function () { + node.firstChild.innerHTML = "单击以确认 (2)"; + setTimeout(function () { + node.firstChild.innerHTML = "单击以确认 (1)"; + setTimeout(function () { + node.firstChild.innerHTML = "重置游戏设置"; + delete node._clearing; + }, 1000); + }, 1000); + }, 1000); + }, + clear: true +}; diff --git a/noname/library/configuration-menu/others/configuration/reset-hidden-pack.js b/noname/library/configuration-menu/others/configuration/reset-hidden-pack.js new file mode 100644 index 000000000..005e33471 --- /dev/null +++ b/noname/library/configuration-menu/others/configuration/reset-hidden-pack.js @@ -0,0 +1,23 @@ +export const RESET_HIDDEN_PACK = { + name: "重置隐藏内容", + onclick() { + if (this.firstChild.innerHTML != "已重置") { + this.firstChild.innerHTML = "已重置" + game.saveConfig("hiddenModePack", []); + game.saveConfig("hiddenCharacterPack", []); + game.saveConfig("hiddenCardPack", []); + game.saveConfig("hiddenPlayPack", []); + game.saveConfig("hiddenBackgroundPack", []); + var that = this; + setTimeout(function () { + that.firstChild.innerHTML = "重置隐藏内容"; + setTimeout(function () { + if (confirm("是否重新启动使改变生效?")) { + game.reload(); + } + }); + }, 500); + } + }, + clear: true +}; diff --git a/noname/library/configuration-menu/others/configuration/reset-tutorial.js b/noname/library/configuration-menu/others/configuration/reset-tutorial.js new file mode 100644 index 000000000..58ffa1907 --- /dev/null +++ b/noname/library/configuration-menu/others/configuration/reset-tutorial.js @@ -0,0 +1,16 @@ +export const RESET_TUTORIAL = { + name: "重置新手向导", + onclick() { + if (this.firstChild.innerHTML != "已重置") { + this.firstChild.innerHTML = "已重置" + game.saveConfig("new_tutorial", false); + game.saveConfig("prompt_hidebg"); + game.saveConfig("prompt_hidepack"); + var that = this; + setTimeout(function () { + that.firstChild.innerHTML = "重置新手向导"; + }, 500); + } + }, + clear: true +}; diff --git a/noname/library/configuration-menu/skill.js b/noname/library/configuration-menu/skill.js new file mode 100644 index 000000000..03ffa67c6 --- /dev/null +++ b/noname/library/configuration-menu/skill.js @@ -0,0 +1,6 @@ +import { CONFIGURATION } from "./skill/configuration.js"; + +export const SKILL = { + name: "技能", + config: CONFIGURATION +}; diff --git a/noname/library/configuration-menu/skill/configuration.js b/noname/library/configuration-menu/skill/configuration.js new file mode 100644 index 000000000..c57a0eac5 --- /dev/null +++ b/noname/library/configuration-menu/skill/configuration.js @@ -0,0 +1,22 @@ +export const CONFIGURATION = { + update(config, map) { + for (var i in map) { + if (map[i]._link.config.type == "autoskill") { + if (!config.autoskilllist.contains(i)) { + map[i].classList.add("on"); + } + else { + map[i].classList.remove("on"); + } + } + else if (map[i]._link.config.type == "banskill") { + if (!config.forbidlist.contains(i)) { + map[i].classList.add("on"); + } + else { + map[i].classList.remove("on"); + } + } + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration.js b/noname/library/configuration-menu/view/configuration.js index 7a8c69df1..372fdca52 100644 --- a/noname/library/configuration-menu/view/configuration.js +++ b/noname/library/configuration-menu/view/configuration.js @@ -1,5 +1,57 @@ +import { AUTOMATICALLY_POPPED_CONFIGURATION } from "./configuration/automatically-popped-configuration.js"; +import { AUTOMATICALLY_POPPED_HISTORY } from "./configuration/automatically-popped-history.js"; +import { CHARACTER_DIALOG_TOOL } from "./configuration/character-dialog-tool.js"; +import { CLEAR_LOG } from "./configuration/clear-log.js"; +import { HIDE_CARD_IMAGE } from "./configuration/hide-card-image.js"; +import { HIDE_CARD_PROMPT_BASIC } from "./configuration/hide-card-prompt-basic.js"; +import { HIDE_CARD_PROMPT_EQUIP } from "./configuration/hide-card-prompt-equip.js"; +import { LOG_HIGHLIGHT } from "./configuration/log-highlight.js"; +import { MARK_IDENTITY_STYLE } from "./configuration/mark-identity-style.js"; +import { POP_EQUIP } from "./configuration/pop-equip.js"; import { POP_LOGV } from "./configuration/pop-logv.js"; +import { RECENT_CHARACTER_NUMBER } from "./configuration/recent-character-number.js"; +import { REMEMBER_DIALOG } from "./configuration/remember-dialog.js"; +import { REMEMBER_ROUND_BUTTON } from "./configuration/remember-round-button.js"; +import { RIGHT_RANGE } from "./configuration/right-range.js"; +import { SHOW_AUTOMATIC } from "./configuration/show-automatic.js"; +import { SHOW_BAN_MENU } from "./configuration/show-ban-menu.js"; +import { SHOW_CARD_PILE_NUMBER } from "./configuration/show-card-pile-number.js"; +import { SHOW_CARD_PILE } from "./configuration/show-card-pile.js"; +import { SHOW_CARD_PROMPT } from "./configuration/show-card-prompt.js"; +import { SHOW_CHARACTER_CARD } from "./configuration/show-character-card.js"; +import { SHOW_CHARACTER_NAME_PINYIN } from "./configuration/show-character-name-pinyin.js"; +import { SHOW_DISCARD_PILE } from "./configuration/show-discard-pile.js"; +import { SHOW_EXTENSION_MAKER } from "./configuration/show-extension-maker.js"; +import { SHOW_EXTENSION_SHARE } from "./configuration/show-extension-share.js"; +import { SHOW_FAVORITE_MENU } from "./configuration/show-favorite-menu.js"; +import { SHOW_FAVORITE_MODE } from "./configuration/show-favorite-mode.js"; +import { SHOW_FAVORITE } from "./configuration/show-favorite.js"; +import { SHOW_GIVE_UP } from "./configuration/show-give-up.js"; +import { SHOW_GROUP } from "./configuration/show-group.js"; +import { SHOW_HAND_CARD_BUTTON } from "./configuration/show-hand-card-button.js"; import { SHOW_HISTORY } from "./configuration/show-history.js"; +import { SHOW_LOG } from "./configuration/show-log.js"; +import { SHOW_NAME } from "./configuration/show-name.js"; +import { SHOW_PAUSE } from "./configuration/show-pause.js"; +import { SHOW_PHASE_PROMPT } from "./configuration/show-phase-prompt.js"; +import { SHOW_PHASE_USE_PROMPT } from "./configuration/show-phase-use-prompt.js"; +import { SHOW_PLAYER_IDS } from "./configuration/show-player-ids.js"; +import { SHOW_RARITY } from "./configuration/show-rarity.js"; +import { SHOW_REPLAY } from "./configuration/show-replay.js"; +import { SHOW_ROUND_MENU } from "./configuration/show-round-menu.js"; +import { SHOW_SEX } from "./configuration/show-sex.js"; +import { SHOW_SKILL_NAME_PINYIN } from "./configuration/show-skill-name-pinyin.js"; +import { SHOW_SORT_CARD } from "./configuration/show-sort-card.js"; +import { SHOW_STATUS_BAR_ANDROID } from "./configuration/show-status-bar-android.js"; +import { SHOW_STATUS_BAR_IOS } from "./configuration/show-status-bar-ios.js"; +import { SHOW_TIME_2 } from "./configuration/show-time-2.js"; +import { SHOW_TIME_3 } from "./configuration/show-time-3.js"; +import { SHOW_TIME } from "./configuration/show-time.js"; +import { SHOW_VOLUME } from "./configuration/show-volume.js"; +import { SHOW_WUXIE } from "./configuration/show-wuxie.js"; +import { TRANSPARENT_DIALOG } from "./configuration/transparent-dialog.js"; +import { WATCH_FACE } from "./configuration/watch-face.js"; +import { WUXIE_RIGHT } from "./configuration/wuxie-right.js"; export const CONFIGURATION = { update(config, map) { @@ -91,5 +143,57 @@ export const CONFIGURATION = { } }, show_history: SHOW_HISTORY, - pop_logv: POP_LOGV -}; \ No newline at end of file + pop_logv: POP_LOGV, + show_log: SHOW_LOG, + clear_log: CLEAR_LOG, + log_highlight: LOG_HIGHLIGHT, + show_time: SHOW_TIME, + show_time2: SHOW_TIME_2, + watchface: WATCH_FACE, + show_time3: SHOW_TIME_3, + show_statusbar_android: SHOW_STATUS_BAR_ANDROID, + show_statusbar_ios: SHOW_STATUS_BAR_IOS, + show_card_prompt: SHOW_CARD_PROMPT, + hide_card_prompt_basic: HIDE_CARD_PROMPT_BASIC, + hide_card_prompt_equip: HIDE_CARD_PROMPT_EQUIP, + show_phase_prompt: SHOW_PHASE_PROMPT, + show_phaseuse_prompt: SHOW_PHASE_USE_PROMPT, + auto_popped_config: AUTOMATICALLY_POPPED_CONFIGURATION, + auto_popped_history: AUTOMATICALLY_POPPED_HISTORY, + show_round_menu: SHOW_ROUND_MENU, + remember_round_button: REMEMBER_ROUND_BUTTON, + remember_dialog: REMEMBER_DIALOG, + transparent_dialog: TRANSPARENT_DIALOG, + show_rarity: SHOW_RARITY, + mark_identity_style: MARK_IDENTITY_STYLE, + character_dialog_tool: CHARACTER_DIALOG_TOOL, + recent_character_number: RECENT_CHARACTER_NUMBER, + popequip: POP_EQUIP, + show_charactercard: SHOW_CHARACTER_CARD, + show_favourite: SHOW_FAVORITE, + show_favmode: SHOW_FAVORITE_MODE, + show_favourite_menu: SHOW_FAVORITE_MENU, + show_ban_menu: SHOW_BAN_MENU, + right_range: RIGHT_RANGE, + hide_card_image: HIDE_CARD_IMAGE, + show_name: SHOW_NAME, + show_sex: SHOW_SEX, + show_group: SHOW_GROUP, + show_replay: SHOW_REPLAY, + show_playerids: SHOW_PLAYER_IDS, + show_sortcard: SHOW_SORT_CARD, + show_pause: SHOW_PAUSE, + show_auto: SHOW_AUTOMATIC, + show_volumn: SHOW_VOLUME, + show_cardpile: SHOW_CARD_PILE, + show_cardpile_number: SHOW_CARD_PILE_NUMBER, + show_handcardbutton: SHOW_HAND_CARD_BUTTON, + show_giveup: SHOW_GIVE_UP, + show_wuxie: SHOW_WUXIE, + wuxie_right: WUXIE_RIGHT, + show_discardpile: SHOW_DISCARD_PILE, + show_extensionmaker: SHOW_EXTENSION_MAKER, + show_extensionshare: SHOW_EXTENSION_SHARE, + show_characternamepinyin: SHOW_CHARACTER_NAME_PINYIN, + show_skillnamepinyin: SHOW_SKILL_NAME_PINYIN +}; diff --git a/noname/library/configuration-menu/view/configuration/automatically-popped-configuration.js b/noname/library/configuration-menu/view/configuration/automatically-popped-configuration.js new file mode 100644 index 000000000..c75e38a03 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/automatically-popped-configuration.js @@ -0,0 +1,6 @@ +export const AUTOMATICALLY_POPPED_CONFIGURATION = { + name: "自动弹出选项", + intro: "鼠标移至选项按钮时弹出模式选择菜单", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/automatically-popped-history.js b/noname/library/configuration-menu/view/configuration/automatically-popped-history.js new file mode 100644 index 000000000..c0e863c32 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/automatically-popped-history.js @@ -0,0 +1,6 @@ +export const AUTOMATICALLY_POPPED_HISTORY = { + name: "自动弹出历史", + intro: "鼠标移至暂停按钮时弹出历史记录菜单", + init: false, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/character-dialog-tool.js b/noname/library/configuration-menu/view/configuration/character-dialog-tool.js new file mode 100644 index 000000000..bc1eeb0f8 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/character-dialog-tool.js @@ -0,0 +1,9 @@ +import { ITEM } from "./character-dialog-tool/item.js"; + +export const CHARACTER_DIALOG_TOOL = { + name: "自由选将显示", + intro: "点击自由选将时默认显示的条目", + init: "最近", + item: ITEM, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/character-dialog-tool/item.js b/noname/library/configuration-menu/view/configuration/character-dialog-tool/item.js new file mode 100644 index 000000000..27b23013b --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/character-dialog-tool/item.js @@ -0,0 +1,5 @@ +export const ITEM = { + 收藏: "收藏", + 最近: "最近", + all: "全部" +}; diff --git a/noname/library/configuration-menu/view/configuration/clear-log.js b/noname/library/configuration-menu/view/configuration/clear-log.js new file mode 100644 index 000000000..739d65577 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/clear-log.js @@ -0,0 +1,6 @@ +export const CLEAR_LOG = { + name: "自动清除历史记录", + init: false, + unfrequent: true, + intro: "开启后将定时清除历史记录栏的条目(而不是等记录栏满后再清除)" +}; diff --git a/noname/library/configuration-menu/view/configuration/hide-card-image.js b/noname/library/configuration-menu/view/configuration/hide-card-image.js new file mode 100644 index 000000000..d4554a9ec --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/hide-card-image.js @@ -0,0 +1,7 @@ +export const HIDE_CARD_IMAGE = { + name: "隐藏卡牌背景", + intro: "所有卡牌将使用文字作为背景", + init: false, + unfrequent: true, + restart: true +}; diff --git a/noname/library/configuration-menu/view/configuration/hide-card-prompt-basic.js b/noname/library/configuration-menu/view/configuration/hide-card-prompt-basic.js new file mode 100644 index 000000000..f91980fe9 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/hide-card-prompt-basic.js @@ -0,0 +1,6 @@ +export const HIDE_CARD_PROMPT_BASIC = { + name: "隐藏基本牌信息", + intro: "不显示基本牌名称", + init: false, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/hide-card-prompt-equip.js b/noname/library/configuration-menu/view/configuration/hide-card-prompt-equip.js new file mode 100644 index 000000000..3a2deba6c --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/hide-card-prompt-equip.js @@ -0,0 +1,6 @@ +export const HIDE_CARD_PROMPT_EQUIP = { + name: "隐藏装备牌信息", + intro: "不显示装备牌名称", + init: false, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/log-highlight.js b/noname/library/configuration-menu/view/configuration/log-highlight.js new file mode 100644 index 000000000..a5ed3b301 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/log-highlight.js @@ -0,0 +1,6 @@ +export const LOG_HIGHLIGHT = { + name: "历史记录高亮", + init: true, + unfrequent: true, + intro: "开启后历史记录不同类别的信息将以不同颜色显示" +}; diff --git a/noname/library/configuration-menu/view/configuration/mark-identity-style.js b/noname/library/configuration-menu/view/configuration/mark-identity-style.js new file mode 100644 index 000000000..7dfff2d09 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/mark-identity-style.js @@ -0,0 +1,9 @@ +import { ITEM } from "./mark-identity-style/item.js"; + +export const MARK_IDENTITY_STYLE = { + name: "标记身份操作", + intro: "设置单击身份按钮时的操作", + unfrequent: true, + init: "menu", + item: ITEM +}; diff --git a/noname/library/configuration-menu/view/configuration/mark-identity-style/item.js b/noname/library/configuration-menu/view/configuration/mark-identity-style/item.js new file mode 100644 index 000000000..e91a17cf0 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/mark-identity-style/item.js @@ -0,0 +1,4 @@ +export const ITEM = { + menu: "菜单", + click: "单击" +}; diff --git a/noname/library/configuration-menu/view/configuration/pop-equip.js b/noname/library/configuration-menu/view/configuration/pop-equip.js new file mode 100644 index 000000000..333fe2cb4 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/pop-equip.js @@ -0,0 +1,6 @@ +export const POP_EQUIP = { + name: "触屏装备选择", + intro: "设置触屏布局中选择装备的方式", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/recent-character-number.js b/noname/library/configuration-menu/view/configuration/recent-character-number.js new file mode 100644 index 000000000..b7fbb19b0 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/recent-character-number.js @@ -0,0 +1,9 @@ +import { ITEM } from "./recent-character-number/item.js"; + +export const RECENT_CHARACTER_NUMBER = { + name: "最近使用武将", + intro: "自由选将对话框中最近使用武将的数量", + init: "12", + item: ITEM, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/recent-character-number/item.js b/noname/library/configuration-menu/view/configuration/recent-character-number/item.js new file mode 100644 index 000000000..e4206404a --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/recent-character-number/item.js @@ -0,0 +1,6 @@ +export const ITEM = { + "6": "6", + "12": "12", + "20": "24", + "30": "36", +}; diff --git a/noname/library/configuration-menu/view/configuration/remember-dialog.js b/noname/library/configuration-menu/view/configuration/remember-dialog.js new file mode 100644 index 000000000..83ff5d6f1 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/remember-dialog.js @@ -0,0 +1,24 @@ +export const REMEMBER_DIALOG = { + name: "记住对话框位置", + intro: "移动对话框后新的对话框也将在移动后的位置显示", + init: false, + unfrequent: true, + onclick(bool) { + game.saveConfig("remember_dialog", bool); + if (!bool) { + if (ui.dialog) { + var dialog = ui.dialog; + dialog.style.transform = ""; + dialog._dragtransform = [0, 0]; + dialog.style.transition = "all 0.3s"; + dialog._dragtouches; + dialog._dragorigin; + dialog._dragorigintransform; + setTimeout(function () { + dialog.style.transition = ""; + }, 500); + } + game.saveConfig("dialog_transform", [0, 0]); + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/remember-round-button.js b/noname/library/configuration-menu/view/configuration/remember-round-button.js new file mode 100644 index 000000000..a80d04dd4 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/remember-round-button.js @@ -0,0 +1,12 @@ +export const REMEMBER_ROUND_BUTTON = { + name: "记住按钮位置", + intro: "重新开始后触屏按钮将保存的上一局的位置", + init: false, + unfrequent: true, + onclick(bool) { + game.saveConfig("remember_round_button", bool); + if (!bool) { + ui.click.resetround(); + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/right-range.js b/noname/library/configuration-menu/view/configuration/right-range.js new file mode 100644 index 000000000..606bcc138 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/right-range.js @@ -0,0 +1,6 @@ +export const RIGHT_RANGE = { + name: "显示距离信息", + intro: "在角色的右键菜单中显示距离等信息", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-automatic.js b/noname/library/configuration-menu/view/configuration/show-automatic.js new file mode 100644 index 000000000..f331465f8 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-automatic.js @@ -0,0 +1,14 @@ +export const SHOW_AUTOMATIC = { + name: "显示托管按钮", + init: true, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_auto", bool); + if (lib.config.show_auto) { + ui.auto.style.display = ""; + } + else { + ui.auto.style.display = "none"; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-ban-menu.js b/noname/library/configuration-menu/view/configuration/show-ban-menu.js new file mode 100644 index 000000000..b1bb00afd --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-ban-menu.js @@ -0,0 +1,6 @@ +export const SHOW_BAN_MENU = { + name: "显示禁将菜单", + intro: "在选项-武将中显示禁将一栏", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-card-pile-number.js b/noname/library/configuration-menu/view/configuration/show-card-pile-number.js new file mode 100644 index 000000000..9398b0c2d --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-card-pile-number.js @@ -0,0 +1,14 @@ +export const SHOW_CARD_PILE_NUMBER = { + name: "显示剩余牌数", + init: false, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_cardpile_number", bool); + if (bool) { + ui.cardPileNumber.style.display = ""; + } + else { + ui.cardPileNumber.style.display = "none"; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-card-pile.js b/noname/library/configuration-menu/view/configuration/show-card-pile.js new file mode 100644 index 000000000..9551e4201 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-card-pile.js @@ -0,0 +1,14 @@ +export const SHOW_CARD_PILE = { + name: "显示牌堆按钮", + init: true, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_cardpile", bool); + if (bool) { + ui.cardPileButton.style.display = ""; + } + else { + ui.cardPileButton.style.display = "none"; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-card-prompt.js b/noname/library/configuration-menu/view/configuration/show-card-prompt.js new file mode 100644 index 000000000..d4c002b0f --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-card-prompt.js @@ -0,0 +1,6 @@ +export const SHOW_CARD_PROMPT = { + name: "显示出牌信息", + intro: "出牌时在使用者上显示卡牌名称", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-character-card.js b/noname/library/configuration-menu/view/configuration/show-character-card.js new file mode 100644 index 000000000..b86346998 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-character-card.js @@ -0,0 +1,6 @@ +export const SHOW_CHARACTER_CARD = { + name: "显示武将资料", + intro: "在武将界面单击时弹出武将资料卡", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-character-name-pinyin.js b/noname/library/configuration-menu/view/configuration/show-character-name-pinyin.js new file mode 100644 index 000000000..b2b41c931 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-character-name-pinyin.js @@ -0,0 +1,43 @@ +import { ITEM } from "./show-character-name-pinyin/item.js"; + +export const SHOW_CHARACTER_NAME_PINYIN = { + name: "显示武将名注解", + intro: "在武将资料卡显示武将名及其注解、性别、势力、体力等信息", + init: "showPinyin", + unfrequent: true, + item: ITEM, + visualMenu(node, link, name) { + node.classList.add("button", "character"); + const style = node.style; + style.alignItems = "center"; + style.animation = "background-position-left-center-right-center-left-center 15s ease infinite"; + style.background = "linear-gradient(-45deg, #EE7752, #E73C7E, #23A6D5, #23D5AB)"; + style.backgroundSize = "400% 400%"; + style.display = "flex"; + style.height = "60px"; + style.justifyContent = "center"; + style.width = "180px"; + const firstChild = node.firstChild; + firstChild.removeAttribute("class"); + firstChild.style.position = "initial"; + if (link == "doNotShow") return; + const ruby = document.createElement("ruby"); + ruby.textContent = name; + const rt = document.createElement("rt"); + rt.style.fontSize = "smaller"; + if (link == "showPinyin2" || link == "showCodeIdentifier2") { + rt.textContent = link == "showCodeIdentifier2" ? "[" + link + "]" : "[" + get.pinyin(name) + "]"; + ruby.appendChild(rt); + } else { + const leftParenthesisRP = document.createElement("rp"); + leftParenthesisRP.textContent = "("; + ruby.appendChild(leftParenthesisRP); + rt.textContent = link == "showCodeIdentifier" ? link : get.pinyin(name).join(" "); + ruby.appendChild(rt); + const rightParenthesisRP = document.createElement("rp"); + rightParenthesisRP.textContent = ")"; + ruby.appendChild(rightParenthesisRP); + } + firstChild.innerHTML = ruby.outerHTML; + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-character-name-pinyin/item.js b/noname/library/configuration-menu/view/configuration/show-character-name-pinyin/item.js new file mode 100644 index 000000000..2b32bfc28 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-character-name-pinyin/item.js @@ -0,0 +1,7 @@ +export const ITEM = { + doNotShow: "不显示", + showPinyin: "拼音(样式一)", + showCodeIdentifier: "代码ID(样式一)", + showPinyin2: "拼音(样式二)", + showCodeIdentifier2: "代码ID(样式二)" +}; diff --git a/noname/library/configuration-menu/view/configuration/show-discard-pile.js b/noname/library/configuration-menu/view/configuration/show-discard-pile.js new file mode 100644 index 000000000..9cbd388ff --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-discard-pile.js @@ -0,0 +1,5 @@ +export const SHOW_DISCARD_PILE = { + name: "暂停时显示弃牌堆", + init: false, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-extension-maker.js b/noname/library/configuration-menu/view/configuration/show-extension-maker.js new file mode 100644 index 000000000..bca3a3c9d --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-extension-maker.js @@ -0,0 +1,5 @@ +export const SHOW_EXTENSION_MAKER = { + name: "显示制作扩展", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-extension-share.js b/noname/library/configuration-menu/view/configuration/show-extension-share.js new file mode 100644 index 000000000..47010482f --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-extension-share.js @@ -0,0 +1,5 @@ +export const SHOW_EXTENSION_SHARE = { + name: "显示分享扩展", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-favorite-menu.js b/noname/library/configuration-menu/view/configuration/show-favorite-menu.js new file mode 100644 index 000000000..dab7508a6 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-favorite-menu.js @@ -0,0 +1,6 @@ +export const SHOW_FAVORITE_MENU = { + name: "显示收藏菜单", + intro: "在选项-武将中显示收藏一栏", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-favorite-mode.js b/noname/library/configuration-menu/view/configuration/show-favorite-mode.js new file mode 100644 index 000000000..20ddfb310 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-favorite-mode.js @@ -0,0 +1,6 @@ +export const SHOW_FAVORITE_MODE = { + name: "显示模式收藏", + intro: "快捷菜单中显示收藏模式", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-favorite.js b/noname/library/configuration-menu/view/configuration/show-favorite.js new file mode 100644 index 000000000..bd0d85b0d --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-favorite.js @@ -0,0 +1,6 @@ +export const SHOW_FAVORITE = { + name: "显示添加收藏", + intro: "在角色的右键菜单中显示添加收藏", + init: false, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-give-up.js b/noname/library/configuration-menu/view/configuration/show-give-up.js new file mode 100644 index 000000000..b2ce71cc7 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-give-up.js @@ -0,0 +1,8 @@ +export const SHOW_GIVE_UP = { + name: "显示投降按钮", + init: true, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_giveup", bool); + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-group.js b/noname/library/configuration-menu/view/configuration/show-group.js new file mode 100644 index 000000000..348a09feb --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-group.js @@ -0,0 +1,6 @@ +export const SHOW_GROUP = { + name: "显示角色势力", + intro: "在角色的右键菜单中显示角色势力", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-hand-card-button.js b/noname/library/configuration-menu/view/configuration/show-hand-card-button.js new file mode 100644 index 000000000..bdc71d71d --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-hand-card-button.js @@ -0,0 +1,8 @@ +export const SHOW_HAND_CARD_BUTTON = { + name: '显示手牌按钮', + init: true, + unfrequent: true, + onclick(bool) { + game.saveConfig('show_handcardbutton', bool); + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-log.js b/noname/library/configuration-menu/view/configuration/show-log.js new file mode 100644 index 000000000..7f8abd10d --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-log.js @@ -0,0 +1,20 @@ +import { ITEM } from "./show-log/item.js"; + +export const SHOW_LOG = { + name: "历史记录栏", + init: "off", + intro: "在屏幕中部显示出牌文字记录", + unfrequent: true, + item: ITEM, + onclick(bool) { + game.saveConfig("show_log", bool); + if (lib.config.show_log != "off") { + ui.arenalog.style.display = ""; + ui.arenalog.dataset.position = bool; + } + else { + ui.arenalog.style.display = "none"; + ui.arenalog.innerHTML = ""; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-log/item.js b/noname/library/configuration-menu/view/configuration/show-log/item.js new file mode 100644 index 000000000..a894c1df3 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-log/item.js @@ -0,0 +1,6 @@ +export const ITEM = { + off: "关闭", + left: "靠左", + center: "居中", + right: "靠右" +}; diff --git a/noname/library/configuration-menu/view/configuration/show-name.js b/noname/library/configuration-menu/view/configuration/show-name.js new file mode 100644 index 000000000..093da972b --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-name.js @@ -0,0 +1,14 @@ +export const SHOW_NAME = { + name: "显示角色名称", + init: false, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_name", bool); + if (bool) { + ui.arena.classList.remove("hide_name"); + } + else { + ui.arena.classList.add("hide_name"); + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-pause.js b/noname/library/configuration-menu/view/configuration/show-pause.js new file mode 100644 index 000000000..9d89516a1 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-pause.js @@ -0,0 +1,14 @@ +export const SHOW_PAUSE = { + name: "显示暂停按钮", + init: true, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_pause", bool); + if (lib.config.show_pause) { + ui.pause.style.display = ""; + } + else { + ui.pause.style.display = "none"; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-phase-prompt.js b/noname/library/configuration-menu/view/configuration/show-phase-prompt.js new file mode 100644 index 000000000..b15d399af --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-phase-prompt.js @@ -0,0 +1,6 @@ +export const SHOW_PHASE_PROMPT = { + name: "显示阶段信息", + intro: "在当前回合不同阶段开始时显示阶段名称", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-phase-use-prompt.js b/noname/library/configuration-menu/view/configuration/show-phase-use-prompt.js new file mode 100644 index 000000000..f30730d98 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-phase-use-prompt.js @@ -0,0 +1,6 @@ +export const SHOW_PHASE_USE_PROMPT = { + name: "出牌阶段提示", + intro: "在你出牌时显示提示文字", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-player-ids.js b/noname/library/configuration-menu/view/configuration/show-player-ids.js new file mode 100644 index 000000000..14251c7ef --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-player-ids.js @@ -0,0 +1,14 @@ +export const SHOW_PLAYER_IDS = { + name: "显示身份按钮", + init: true, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_playerids", bool); + if (lib.config.show_playerids) { + ui.playerids.style.display = ""; + } + else { + ui.playerids.style.display = "none"; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-rarity.js b/noname/library/configuration-menu/view/configuration/show-rarity.js new file mode 100644 index 000000000..14f99724b --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-rarity.js @@ -0,0 +1,9 @@ +export const SHOW_RARITY = { + name: "显示武将评级", + init: false, + intro: "仅供娱乐,重启后生效", + unfrequent: true, + onclick(bool) { + game.saveConfig("show_rarity", bool); + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-replay.js b/noname/library/configuration-menu/view/configuration/show-replay.js new file mode 100644 index 000000000..5155d52e3 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-replay.js @@ -0,0 +1,14 @@ +export const SHOW_REPLAY = { + name: "显示重来按钮", + init: false, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_replay", bool); + if (lib.config.show_replay) { + ui.replay.style.display = ""; + } + else { + ui.replay.style.display = "none"; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-round-menu.js b/noname/library/configuration-menu/view/configuration/show-round-menu.js new file mode 100644 index 000000000..45c4e285c --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-round-menu.js @@ -0,0 +1,16 @@ +export const SHOW_ROUND_MENU = { + name: "显示触屏按钮", + init: true, + unfrequent: true, + onclick(bool) { + if (get.is.nomenu("show_round_menu", bool)) return false; + game.saveConfig("show_round_menu", bool); + if (bool && ui.roundmenu) { + ui.roundmenu.style.display = ""; + } + else { + ui.roundmenu.style.display = "none"; + alert("关闭触屏按钮后可通过手势打开菜单(默认为下划)") + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-sex.js b/noname/library/configuration-menu/view/configuration/show-sex.js new file mode 100644 index 000000000..82da6d633 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-sex.js @@ -0,0 +1,6 @@ +export const SHOW_SEX = { + name: "显示角色性别", + intro: "在角色的右键菜单中显示角色性别", + init: true, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-skill-name-pinyin.js b/noname/library/configuration-menu/view/configuration/show-skill-name-pinyin.js new file mode 100644 index 000000000..9c6d03a49 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-skill-name-pinyin.js @@ -0,0 +1,18 @@ +import { SHOW_CHARACTER_NAME_PINYIN } from "./show-character-name-pinyin.js"; + +export const SHOW_SKILL_NAME_PINYIN = { + name: "显示技能名注解", + intro: "在武将资料卡显示技能名注解", + get init() { + return SHOW_CHARACTER_NAME_PINYIN.init; + }, + get unfrequent() { + return SHOW_CHARACTER_NAME_PINYIN.unfrequent; + }, + get item() { + return SHOW_CHARACTER_NAME_PINYIN.item; + }, + get visualMenu() { + return SHOW_CHARACTER_NAME_PINYIN.visualMenu; + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-sort-card.js b/noname/library/configuration-menu/view/configuration/show-sort-card.js new file mode 100644 index 000000000..a869d022e --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-sort-card.js @@ -0,0 +1,14 @@ +export const SHOW_SORT_CARD = { + name: "显示整理手牌按钮", + init: true, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_sortcard", bool); + if (lib.config.show_sortcard) { + ui.sortCard.style.display = ""; + } + else { + ui.sortCard.style.display = "none"; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-status-bar-android.js b/noname/library/configuration-menu/view/configuration/show-status-bar-android.js new file mode 100644 index 000000000..0baf51bd1 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-status-bar-android.js @@ -0,0 +1,18 @@ +export const SHOW_STATUS_BAR_ANDROID = { + name: "显示状态栏", + init: false, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_statusbar", bool); + if (window.StatusBar && lib.device == "android") { + if (bool) { + window.StatusBar.overlaysWebView(false); + window.StatusBar.backgroundColorByName("black"); + window.StatusBar.show(); + } + else { + window.StatusBar.hide(); + } + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-status-bar-ios.js b/noname/library/configuration-menu/view/configuration/show-status-bar-ios.js new file mode 100644 index 000000000..4c4cb231e --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-status-bar-ios.js @@ -0,0 +1,29 @@ +import { ITEM } from "./show-status-bar-ios/item.js"; + +export const SHOW_STATUS_BAR_IOS = { + name: "显示状态栏", + init: "off", + unfrequent: true, + item: ITEM, + onclick(bool) { + game.saveConfig("show_statusbar_ios", bool); + if (window.StatusBar && lib.device == "ios") { + if (bool != "off" && bool != "auto") { + if (lib.config.show_statusbar_ios == "default") { + window.StatusBar.overlaysWebView(false); + document.body.classList.remove("statusbar"); + } + else { + window.StatusBar.overlaysWebView(true); + document.body.classList.add("statusbar"); + } + window.StatusBar.backgroundColorByName("black"); + window.StatusBar.show(); + } + else { + document.body.classList.remove("statusbar"); + window.StatusBar.hide(); + } + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-status-bar-ios/item.js b/noname/library/configuration-menu/view/configuration/show-status-bar-ios/item.js new file mode 100644 index 000000000..fbff5ec7e --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-status-bar-ios/item.js @@ -0,0 +1,6 @@ +export const ITEM = { + default: "默认", + overlay: "嵌入", + auto: "自动", + off: "关闭" +}; diff --git a/noname/library/configuration-menu/view/configuration/show-time-2.js b/noname/library/configuration-menu/view/configuration/show-time-2.js new file mode 100644 index 000000000..b66b41d04 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-time-2.js @@ -0,0 +1,15 @@ +export const SHOW_TIME_2 = { + name: "显示时间", + intro: "在触屏按钮处显示当前时间", + init: false, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_time2", bool); + if (bool) { + ui.roundmenu.classList.add("clock"); + } + else { + ui.roundmenu.classList.remove("clock"); + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-time-3.js b/noname/library/configuration-menu/view/configuration/show-time-3.js new file mode 100644 index 000000000..bdf8d2c7b --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-time-3.js @@ -0,0 +1,5 @@ +export const SHOW_TIME_3 = { + name: "显示游戏时间", + init: false, + unfrequent: true +}; diff --git a/noname/library/configuration-menu/view/configuration/show-time.js b/noname/library/configuration-menu/view/configuration/show-time.js new file mode 100644 index 000000000..dff5d5d24 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-time.js @@ -0,0 +1,15 @@ +export const SHOW_TIME = { + name: "显示时间", + intro: "在屏幕顶部显示当前时间", + init: false, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_time", bool); + if (bool) { + ui.time.style.display = ""; + } + else { + ui.time.style.display = "none"; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-volume.js b/noname/library/configuration-menu/view/configuration/show-volume.js new file mode 100644 index 000000000..1dd459e5b --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-volume.js @@ -0,0 +1,14 @@ +export const SHOW_VOLUME = { + name: "显示音量按钮", + init: true, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_volumn", bool); + if (lib.config.show_volumn) { + ui.volumn.style.display = ""; + } + else { + ui.volumn.style.display = "none"; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/show-wuxie.js b/noname/library/configuration-menu/view/configuration/show-wuxie.js new file mode 100644 index 000000000..2d5194874 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/show-wuxie.js @@ -0,0 +1,15 @@ +export const SHOW_WUXIE = { + name: "显示无懈按钮", + intro: "在右上角显示不询问无懈", + init: false, + unfrequent: true, + onclick(bool) { + game.saveConfig("show_wuxie", bool); + if (lib.config.show_wuxie) { + ui.wuxie.style.display = ""; + } + else { + ui.wuxie.style.display = "none"; + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/transparent-dialog.js b/noname/library/configuration-menu/view/configuration/transparent-dialog.js new file mode 100644 index 000000000..1dcc3f4b2 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/transparent-dialog.js @@ -0,0 +1,22 @@ +export const TRANSPARENT_DIALOG = { + name: "堆叠对话框虚化", + init: false, + intro: "当具有static属性的对话框堆叠(如五谷丰登对话框中提示无懈可击)时,将后方的对话框变为半透明", + onclick(bool) { + game.saveConfig("transparent_dialog", bool); + if (bool) { + for (var i = 0; i < ui.dialogs.length; i++) { + if (ui.dialogs[i] != ui.dialog && ui.dialogs[i].static) { + ui.dialogs[i].unfocus(); + } + } + } + else { + for (var i = 0; i < ui.dialogs.length; i++) { + if (ui.dialogs[i] != ui.dialog && ui.dialogs[i].static) { + ui.dialogs[i].refocus(); + } + } + } + } +}; diff --git a/noname/library/configuration-menu/view/configuration/watch-face.js b/noname/library/configuration-menu/view/configuration/watch-face.js new file mode 100644 index 000000000..5db60a6cf --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/watch-face.js @@ -0,0 +1,12 @@ +import { ITEM } from "./watch-face/item.js"; + +export const WATCH_FACE = { + name: "表盘样式", + init: "none", + unfrequent: true, + item: ITEM, + onclick(item) { + game.saveConfig("watchface", item); + ui.roundmenu.dataset.watchface = item; + } +}; diff --git a/noname/library/configuration-menu/view/configuration/watch-face/item.js b/noname/library/configuration-menu/view/configuration/watch-face/item.js new file mode 100644 index 000000000..373e84912 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/watch-face/item.js @@ -0,0 +1,4 @@ +export const ITEM = { + none: "默认", + simple: "简约" +}; diff --git a/noname/library/configuration-menu/view/configuration/wuxie-right.js b/noname/library/configuration-menu/view/configuration/wuxie-right.js new file mode 100644 index 000000000..0c7e6f1e2 --- /dev/null +++ b/noname/library/configuration-menu/view/configuration/wuxie-right.js @@ -0,0 +1,5 @@ +export const WUXIE_RIGHT = { + name: "无懈按钮靠左", + init: true, + unfrequent: true +};