Finish the configuration menu.

This commit is contained in:
Tipx-L 2023-12-08 06:41:06 -08:00
parent db22d22dd6
commit fb534ef868
86 changed files with 1088 additions and 6 deletions

View File

@ -1,9 +1,15 @@
import { APPEARANCE } from "./configuration-menu/appearance.js"; import { APPEARANCE } from "./configuration-menu/appearance.js";
import { AUDIO } from "./configuration-menu/audio.js";
import { GENERAL } from "./configuration-menu/general.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"; import { VIEW } from "./configuration-menu/view.js";
export const CONFIGURATION_MENU = { export const CONFIGURATION_MENU = {
general: GENERAL, general: GENERAL,
appearence: APPEARANCE, appearence: APPEARANCE,
view: VIEW view: VIEW,
audio: AUDIO,
skill: SKILL,
others: OTHERS
}; };

View File

@ -2,13 +2,13 @@ import { ITEM } from "./automatic-border-count/item.js";
const introduction = document.createElement("body"); const introduction = document.createElement("body");
const kill = document.createElement("strong"); const kill = document.createElement("strong");
kill.textContent = "击杀"; kill.append("击杀");
introduction.append(kill, " 每击杀一人,边框提升两级", document.createElement("br")); introduction.append(kill, " 每击杀一人,边框提升两级", document.createElement("br"));
const damage = document.createElement("strong"); const damage = document.createElement("strong");
damage.textContent = "伤害"; damage.append("伤害");
introduction.append(damage, " 每造成两点伤害,边框提升一级", document.createElement("br")); introduction.append(damage, " 每造成两点伤害,边框提升一级", document.createElement("br"));
const mix = document.createElement("strong"); const mix = document.createElement("strong");
mix.textContent = "混合"; mix.append("混合");
introduction.append(mix, " 击杀量决定边框颜色,伤害量决定边框装饰"); introduction.append(mix, " 击杀量决定边框颜色,伤害量决定边框装饰");
export const AUTOMATIC_BORDER_COUNT = { export const AUTOMATIC_BORDER_COUNT = {

View File

@ -0,0 +1,6 @@
import { CONFIGURATION } from "./audio/configuration.js";
export const AUDIO = {
name: "音效",
config: CONFIGURATION
};

View File

@ -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
};

View File

@ -0,0 +1,4 @@
export const BACKGROUND_AUDIO = {
name: "游戏音效",
init: true
};

View File

@ -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();
}
};

View File

@ -0,0 +1,3 @@
export const ITEM = {
music_default: "默认"
};

View File

@ -0,0 +1,4 @@
export const BACKGROUND_SPEAK = {
name: "人物配音",
init: true
};

View File

@ -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();
}
}
};

View File

@ -0,0 +1,4 @@
export const EQUIP_AUDIO = {
name: "装备配音",
init: false
};

View File

@ -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
}

View File

@ -0,0 +1,4 @@
export const REPEAT_AUDIO = {
name: "播放重复语音",
init: false
};

View File

@ -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));
}
};

View File

@ -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;
}
};

View File

@ -0,0 +1,11 @@
export const VOLUME_ITEM = {
"0": "",
"1": "一",
"2": "二",
"3": "三",
"4": "四",
"5": "五",
"6": "六",
"7": "七",
"8": "八"
};

View File

@ -0,0 +1,6 @@
import { CONFIGURATION } from "./others/configuration.js";
export const OTHERS = {
name: "其它",
config: CONFIGURATION
};

View File

@ -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();
}
}
};

View File

@ -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
};

View File

@ -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
};

View File

@ -0,0 +1,7 @@
export const IMPORT_DATA = {
name: "导入游戏设置",
onclick() {
ui.import_data_button.classList.toggle("hidden");
},
clear: true
};

View File

@ -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
};

View File

@ -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
};

View File

@ -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
};

View File

@ -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
};

View File

@ -0,0 +1,6 @@
import { CONFIGURATION } from "./skill/configuration.js";
export const SKILL = {
name: "技能",
config: CONFIGURATION
};

View File

@ -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");
}
}
}
}
};

View File

@ -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 { 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_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 = { export const CONFIGURATION = {
update(config, map) { update(config, map) {
@ -91,5 +143,57 @@ export const CONFIGURATION = {
} }
}, },
show_history: SHOW_HISTORY, show_history: SHOW_HISTORY,
pop_logv: POP_LOGV 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
}; };

View File

@ -0,0 +1,6 @@
export const AUTOMATICALLY_POPPED_CONFIGURATION = {
name: "自动弹出选项",
intro: "鼠标移至选项按钮时弹出模式选择菜单",
init: true,
unfrequent: true
};

View File

@ -0,0 +1,6 @@
export const AUTOMATICALLY_POPPED_HISTORY = {
name: "自动弹出历史",
intro: "鼠标移至暂停按钮时弹出历史记录菜单",
init: false,
unfrequent: true
};

View File

@ -0,0 +1,9 @@
import { ITEM } from "./character-dialog-tool/item.js";
export const CHARACTER_DIALOG_TOOL = {
name: "自由选将显示",
intro: "点击自由选将时默认显示的条目",
init: "最近",
item: ITEM,
unfrequent: true
};

View File

@ -0,0 +1,5 @@
export const ITEM = {
收藏: "收藏",
最近: "最近",
all: "全部"
};

View File

@ -0,0 +1,6 @@
export const CLEAR_LOG = {
name: "自动清除历史记录",
init: false,
unfrequent: true,
intro: "开启后将定时清除历史记录栏的条目(而不是等记录栏满后再清除)"
};

View File

@ -0,0 +1,7 @@
export const HIDE_CARD_IMAGE = {
name: "隐藏卡牌背景",
intro: "所有卡牌将使用文字作为背景",
init: false,
unfrequent: true,
restart: true
};

View File

@ -0,0 +1,6 @@
export const HIDE_CARD_PROMPT_BASIC = {
name: "隐藏基本牌信息",
intro: "不显示基本牌名称",
init: false,
unfrequent: true
};

View File

@ -0,0 +1,6 @@
export const HIDE_CARD_PROMPT_EQUIP = {
name: "隐藏装备牌信息",
intro: "不显示装备牌名称",
init: false,
unfrequent: true
};

View File

@ -0,0 +1,6 @@
export const LOG_HIGHLIGHT = {
name: "历史记录高亮",
init: true,
unfrequent: true,
intro: "开启后历史记录不同类别的信息将以不同颜色显示"
};

View File

@ -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
};

View File

@ -0,0 +1,4 @@
export const ITEM = {
menu: "菜单",
click: "单击"
};

View File

@ -0,0 +1,6 @@
export const POP_EQUIP = {
name: "触屏装备选择",
intro: "设置触屏布局中选择装备的方式",
init: true,
unfrequent: true
};

View File

@ -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
};

View File

@ -0,0 +1,6 @@
export const ITEM = {
"6": "6",
"12": "12",
"20": "24",
"30": "36",
};

View File

@ -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]);
}
}
};

View File

@ -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();
}
}
};

View File

@ -0,0 +1,6 @@
export const RIGHT_RANGE = {
name: "显示距离信息",
intro: "在角色的右键菜单中显示距离等信息",
init: true,
unfrequent: true
};

View File

@ -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";
}
}
};

View File

@ -0,0 +1,6 @@
export const SHOW_BAN_MENU = {
name: "显示禁将菜单",
intro: "在选项-武将中显示禁将一栏",
init: true,
unfrequent: true
};

View File

@ -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";
}
}
};

View File

@ -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";
}
}
};

View File

@ -0,0 +1,6 @@
export const SHOW_CARD_PROMPT = {
name: "显示出牌信息",
intro: "出牌时在使用者上显示卡牌名称",
init: true,
unfrequent: true
};

View File

@ -0,0 +1,6 @@
export const SHOW_CHARACTER_CARD = {
name: "显示武将资料",
intro: "在武将界面单击时弹出武将资料卡",
init: true,
unfrequent: true
};

View File

@ -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;
}
};

View File

@ -0,0 +1,7 @@
export const ITEM = {
doNotShow: "不显示",
showPinyin: "拼音(样式一)",
showCodeIdentifier: "代码ID(样式一)",
showPinyin2: "拼音(样式二)",
showCodeIdentifier2: "代码ID(样式二)"
};

View File

@ -0,0 +1,5 @@
export const SHOW_DISCARD_PILE = {
name: "暂停时显示弃牌堆",
init: false,
unfrequent: true
};

View File

@ -0,0 +1,5 @@
export const SHOW_EXTENSION_MAKER = {
name: "显示制作扩展",
init: true,
unfrequent: true
};

View File

@ -0,0 +1,5 @@
export const SHOW_EXTENSION_SHARE = {
name: "显示分享扩展",
init: true,
unfrequent: true
};

View File

@ -0,0 +1,6 @@
export const SHOW_FAVORITE_MENU = {
name: "显示收藏菜单",
intro: "在选项-武将中显示收藏一栏",
init: true,
unfrequent: true
};

View File

@ -0,0 +1,6 @@
export const SHOW_FAVORITE_MODE = {
name: "显示模式收藏",
intro: "快捷菜单中显示收藏模式",
init: true,
unfrequent: true
};

View File

@ -0,0 +1,6 @@
export const SHOW_FAVORITE = {
name: "显示添加收藏",
intro: "在角色的右键菜单中显示添加收藏",
init: false,
unfrequent: true
};

View File

@ -0,0 +1,8 @@
export const SHOW_GIVE_UP = {
name: "显示投降按钮",
init: true,
unfrequent: true,
onclick(bool) {
game.saveConfig("show_giveup", bool);
}
};

View File

@ -0,0 +1,6 @@
export const SHOW_GROUP = {
name: "显示角色势力",
intro: "在角色的右键菜单中显示角色势力",
init: true,
unfrequent: true
};

View File

@ -0,0 +1,8 @@
export const SHOW_HAND_CARD_BUTTON = {
name: '显示手牌按钮',
init: true,
unfrequent: true,
onclick(bool) {
game.saveConfig('show_handcardbutton', bool);
}
};

View File

@ -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 = "";
}
}
};

View File

@ -0,0 +1,6 @@
export const ITEM = {
off: "关闭",
left: "靠左",
center: "居中",
right: "靠右"
};

View File

@ -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");
}
}
};

View File

@ -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";
}
}
};

View File

@ -0,0 +1,6 @@
export const SHOW_PHASE_PROMPT = {
name: "显示阶段信息",
intro: "在当前回合不同阶段开始时显示阶段名称",
init: true,
unfrequent: true
};

View File

@ -0,0 +1,6 @@
export const SHOW_PHASE_USE_PROMPT = {
name: "出牌阶段提示",
intro: "在你出牌时显示提示文字",
init: true,
unfrequent: true
};

View File

@ -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";
}
}
};

View File

@ -0,0 +1,9 @@
export const SHOW_RARITY = {
name: "显示武将评级",
init: false,
intro: "仅供娱乐,重启后生效",
unfrequent: true,
onclick(bool) {
game.saveConfig("show_rarity", bool);
}
};

View File

@ -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";
}
}
};

View File

@ -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("关闭触屏按钮后可通过手势打开菜单(默认为下划)")
}
}
};

View File

@ -0,0 +1,6 @@
export const SHOW_SEX = {
name: "显示角色性别",
intro: "在角色的右键菜单中显示角色性别",
init: true,
unfrequent: true
};

View File

@ -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;
}
};

View File

@ -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";
}
}
};

View File

@ -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();
}
}
}
};

View File

@ -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();
}
}
}
};

View File

@ -0,0 +1,6 @@
export const ITEM = {
default: "默认",
overlay: "嵌入",
auto: "自动",
off: "关闭"
};

View File

@ -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");
}
}
};

View File

@ -0,0 +1,5 @@
export const SHOW_TIME_3 = {
name: "显示游戏时间",
init: false,
unfrequent: true
};

View File

@ -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";
}
}
};

View File

@ -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";
}
}
};

View File

@ -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";
}
}
};

View File

@ -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();
}
}
}
}
};

View File

@ -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;
}
};

View File

@ -0,0 +1,4 @@
export const ITEM = {
none: "默认",
simple: "简约"
};

View File

@ -0,0 +1,5 @@
export const WUXIE_RIGHT = {
name: "无懈按钮靠左",
init: true,
unfrequent: true
};