Skip to content

Commit

Permalink
精简显示
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxinzxz committed Nov 16, 2024
1 parent cfdea7b commit 777227f
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 97 deletions.
Binary file removed shoushaUI/character/images/pe_common.png
Binary file not shown.
Binary file removed shoushaUI/character/images/pe_epic.png
Binary file not shown.
Binary file removed shoushaUI/character/images/pe_junk.png
Binary file not shown.
Binary file removed shoushaUI/character/images/pe_legend.png
Binary file not shown.
Binary file removed shoushaUI/character/images/pe_rare.png
Binary file not shown.
Binary file removed shoushaUI/character/images/pe_restrictive.png
Binary file not shown.
Binary file removed shoushaUI/character/images/pe_unique.png
Binary file not shown.
45 changes: 0 additions & 45 deletions shoushaUI/character/main3.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,6 @@
position: relative;
background-repeat: no-repeat;
}
/* .character-dialog > div.pn1 {
left: -190px;
top: -180px;
width: 197px;
height: 35px;
background-size: cover;
position: relative;
background-repeat: no-repeat;
background-image: url("./images/skinname.png");
} */
.character-dialog > div.name {
position: relative;
left: 55px;
Expand Down Expand Up @@ -211,39 +201,4 @@
background-size: contain;
background-position: left;
background-repeat: no-repeat;
background-image: url("./images/skinname.png");
}
/* hp */
/* .hp:not(.text):not(.actcount):not(.treasure) > div {
box-shadow: none;
border: none;
background-size: 100% 100%;
background-repeat: no-repeat;
background-color: transparent;
border-radius: 0px;
}
.hp:not(.text):not(.actcount):not(.treasure)[data-condition="high"] > div:not(.lost) {
background-image: url('./images/hp/hp-1.png');
}
.hp:not(.text):not(.actcount):not(.treasure)[data-condition="mid"]>div:not(.lost){
background-image: url('./images/hp/hp-2.png');
}
.hp:not(.text):not(.actcount):not(.treasure)[data-condition="low"]>div:not(.lost){
background-image: url('./images/hp/hp-3.png');
}
.hp:not(.text):not(.actcount):not(.treasure)>.lost{
background-image: url('./images/hp/hp-0.png');
}
#arena[data-double-character] .hp:not(.text):not(.actcount):not(.treasure)[data-condition="high"] > div:not(.lost) {
background-image: url('./images/hp/hp-round-1.png');
}
#arena[data-double-character] .hp:not(.text):not(.actcount):not(.treasure)[data-condition="mid"]>div:not(.lost){
background-image: url('./images/hp/hp-round-2.png');
}
#arena[data-double-character] .hp:not(.text):not(.actcount):not(.treasure)[data-condition="low"]>div:not(.lost){
background-image: url('./images/hp/hp-round-3.png');
}
#arena[data-double-character] .hp:not(.text):not(.actcount):not(.treasure)>.lost{
background-image: url('./images/hp/hp-round-0.png');
} */
85 changes: 33 additions & 52 deletions shoushaUI/character/main3.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,64 +100,45 @@ app.import(function (lib, game, ui, get, ai, _status, app) {
}
}

//等阶,适配最新版千幻
var rarity = game.getRarity(name);
if (!rarity) rarity = "common";
var pe = ui.create.div(".pe1", dialog);
var url;
if (lib.config["extension_千幻聆音_enable"]) {
var temp;
switch (game.qhly_getSkinLevel(name, game.qhly_getSkin(name), true, false)) {
case "xiyou":
temp = "rare";
break;
case "shishi":
temp = "epic";
break;
case "chuanshuo":
temp = "legend";
break;
case "putong":
temp = "common";
break;
case "dongtai":
temp = "legend";
break;
case "jueban":
temp = "unique";
break;
case "xianding":
temp = "restrictive";
break;
default:
temp = "junk";
}
url = extensionPath + "character/images/pe_" + temp + ".png";
} else url = extensionPath + "character/images/pe_" + rarity + ".png";
pe.style.backgroundImage = 'url("' + url + '")';
var value;
if (lib.config["extension_千幻聆音_enable"]) {
value = game.qhly_getSkin(name);
if (value) value = value.substring(0, value.lastIndexOf("."));
else value = "经典形象";
} else value = "经典形象";
var pn = ui.create.div(".pn1", value + "*" + get.translation(name));
pe.appendChild(pn);
//适配最新版千幻
if (name) {
var value = (() => {
let value = "";
let value2, value3;
if (lib.config["extension_千幻聆音_enable"]) {
value2 = game.qhly_getSkin(name);
if (value2) value2 = value2.substring(0, value2.lastIndexOf("."));
else value2 = "经典形象";
} else value2 = "经典形象";
value += value2 + "*" + get.translation(name);
if (name2) {
value += "<br>";
if (lib.config["extension_千幻聆音_enable"]) {
value3 = game.qhly_getSkin(name2);
if (value) value3 = value3.substring(0, value3.lastIndexOf("."));
else value3 = "经典形象";
} else value3 = "经典形象";
value += value3 + "*" + get.translation(name2);
}
return value;
})();
var pe = ui.create.div(".pe1", dialog);
var pn = ui.create.div(".pn1", value);
pe.appendChild(pn);
}

//武将姓名
var nametext = "";
if (name && name2) {
if (name == "unknown") nametext += "未知";
else if (lib.translate[name + "_ab"]) nametext += lib.translate[name + "_ab"];
else nametext += get.translation(name);
nametext += " / ";
if (name2 == "unknown") nametext += "未知";
else if (lib.translate[name2 + "_ab"]) nametext += lib.translate[name2 + "_ab"];
else nametext += get.translation(name2);
} else {
if (name) {
if (name == "unknown") nametext += "未知";
else if (lib.translate[name + "_ab"]) nametext += lib.translate[name + "_ab"];
else nametext += get.translation(name);
if (name2) {
nametext += "/";
if (name2 == "unknown") nametext += "未知";
else if (lib.translate[name2 + "_ab"]) nametext += lib.translate[name2 + "_ab"];
else nametext += get.translation(name2);
}
}
var namestyle = ui.create.div(".name", nametext, dialog);
namestyle.dataset.camp = group;
Expand Down

0 comments on commit 777227f

Please sign in to comment.