Skip to content

Commit

Permalink
完善左右手布局(by - 风中的欧皇)并做适配跟进
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxinzxz committed Nov 16, 2024
1 parent 777227f commit 1f95f7e
Show file tree
Hide file tree
Showing 24 changed files with 1,663 additions and 88 deletions.
2 changes: 1 addition & 1 deletion equip.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
height: 100%;
left: auto;
min-width: 130px;
right: -16px;
right: 86px;
top: auto;
}

Expand Down
2 changes: 1 addition & 1 deletion equip_new.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
height: 100%;
left: auto;
min-width: 130px;
right: -16px;
right: 86px;
top: auto;
}

Expand Down
2 changes: 1 addition & 1 deletion equip_new_new.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
height: 100%;
left: auto;
min-width: 130px;
right: -16px;
right: 66px;
top: auto;
}

Expand Down
27 changes: 20 additions & 7 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -10979,10 +10979,22 @@ game.import("extension", function (lib, game, ui, get, ai, _status) {
init: false,
},
rightLayout: {
name: "右手布局",
init: true,
update: function () {
if (window.decadeUI) ui.arena.dataset.rightLayout = lib.config["extension_十周年UI_rightLayout"] ? "on" : "off";
name: '<b><font color="#E600FD">左右布局',
init: "on",
intro: "切换完以后自动重启游戏",
item: {
off: "左手",
on: "右手",
},
update() {
if (lib.config["extension_十周年UI_rightLayout"] == "on" || lib.config["extension_十周年UI_rightLayout"] == "off") {
ui.arena.dataset.rightLayout = lib.config["extension_十周年UI_rightLayout"];
}
},
onclick(item) {
lib.config["extension_十周年UI_rightLayout"] = item || "off";
game.saveConfig("extension_十周年UI_rightLayout", item);
game.reload();
},
},
cardPrettify: {
Expand Down Expand Up @@ -11649,10 +11661,11 @@ game.import("extension", function (lib, game, ui, get, ai, _status) {
"最低适配:v1.10.17 - 待定",
"新版适配",
"对所有文件进行统一prettier格式化,修复css文件里面的报错属性",
"整合lone的信息页美化并做适配跟进",
"整合u的“一将成名”样式并做适配跟进",
"大幅简化手杀样式技能剩余次数的写法",
"挑战模式boss名称显示位置优化(by - 幻翼幽冥)",
"添加“一将成名”界面布局(by - u)并做适配跟进",
"“一将成名”界面布局信息页美化(by - lone)并做适配跟进",
"完善左右手布局(by - 风中的欧皇)并做适配跟进",
"大幅简化手杀样式技能剩余次数的写法",
];
return '<a href="https://github.com/mengxinzxz/decadeUI--mx">点击前往萌修十周年Github仓库</a><br><p style="color:rgb(210,210,000); font-size:12px; line-height:14px; text-shadow: 0 0 2px black;">' + log.join("<br>•") + "</p>";
})(pack);
Expand Down
14 changes: 7 additions & 7 deletions layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ body > .background {
#arena > .hand-wrap,
#arena > .hand-back {
/*手牌区*/ /*左手布局+单独装备栏*/
left: 180px;
right: 180px;
left: 300px;
right: 225px;/*数值越大手牌右边界区域越往左*/
width: auto;
height: 170px;
height: 150px;
bottom: 1%;
transition: none;
z-index: 3;
Expand All @@ -235,8 +235,8 @@ body > .background {
#arena[data-alone-equip="off"][data-right-layout="off"] > .hand-wrap,
#arena[data-alone-equip="off"][data-right-layout="off"] > .hand-back {
/*左手布局+非单独装备栏*/
left: 180px;
right: 30px;
left: 300px;
right: 95px;
}

#arena[data-alone-equip="off"][data-right-layout="on"] > .hand-wrap,
Expand All @@ -252,12 +252,12 @@ body > .background {
}
/*挑战模式小头像*/
.hand-wrap > .fakeme.avatar {
left: -150px;
left: -270px;
top: auto;
right: auto;
bottom: 0;
width: 120px;
height: 120px;
height: 130px;
border-radius: 8px;
background-size: cover;
}
Expand Down
14 changes: 7 additions & 7 deletions layout_new.css
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ body > .background {
#arena > .hand-wrap,
#arena > .hand-back {
/*手牌区*/ /*左手布局+单独装备栏*/
left: 180px;
right: 180px;
left: 300px;
right: 225px;/*数值越大手牌右边界区域越往左*/
width: auto;
height: 170px;
height: 150px;
bottom: 1%;
transition: none;
z-index: 3;
Expand All @@ -235,8 +235,8 @@ body > .background {
#arena[data-alone-equip="off"][data-right-layout="off"] > .hand-wrap,
#arena[data-alone-equip="off"][data-right-layout="off"] > .hand-back {
/*左手布局+非单独装备栏*/
left: 180px;
right: 30px;
left: 300px;
right: 95px;
}

#arena[data-alone-equip="off"][data-right-layout="on"] > .hand-wrap,
Expand All @@ -252,12 +252,12 @@ body > .background {
}
/*挑战模式小头像*/
.hand-wrap > .fakeme.avatar {
left: -150px;
left: -270px;/*数值越小越左*/
top: auto;
right: auto;
bottom: 0;
width: 120px;
height: 120px;
height: 130px;
border-radius: 8px;
background-size: cover;
}
Expand Down
79 changes: 79 additions & 0 deletions shoushaUI/lbtn/main1.css
Original file line number Diff line number Diff line change
Expand Up @@ -754,3 +754,82 @@
left: 110px;
bottom: 60px;
}

/*以下左手模式添加的css*/
.lbtn-paixu1 {
width: 68px;
height: 55px;
background-image: url("./images/uibutton/btn-paixu.png");
right: 1.2%;
bottom: 25%;
z-index: 5;
font-size: 18.1px;
background-size: 100% 100%;
background-color: transparent;
line-height: 45px;
text-align: center;
white-space: nowrap;
color: #c5af88;
font-family: "shousha";
font-weight: bold;
-webkit-text-stroke: 1.1px rgba(43, 31, 25, 0.5);
text-shadow: none;
border-radius: 0px;
}

.lbtn-controls + .lbtn-controls {
margin-top: 1px;
}

/*记录*/
.latn-jilu1 {
display: block;
position: absolute;
right: 1.2%;
background-size: 100% 100%;
border-radius: 1px;
width: 68px;
height: 55px;
/*--w: 68px;
--h: calc(var(--w) * 78/91);
width: var(--w);
height: var(--h);*/
background-image: url("./images/uibutton/btn-jilu.png");
bottom: 15%;
z-index: 5;
}

/*左手手牌量显示*/
.handcardNumber1 {
bottom: 2px;
left: 0px; /* 将right属性值修改为left属性值 */
font-family: "HYZLSJ";
color: #ffffff;
font-weight: 100 !important;
font-size: 13px !important;
}

.handcardNumber1 > .cardPicture1 {
left: -50px; /* 调整left属性值 */
bottom: -16px;
--w: 417px;
--h: calc(var(--w) * 235 / 500); /*宽和长*/
width: var(--w);
height: var(--h);
background-image: url("./images/uibutton/shoupai1.png");
background-size: 100% 100%;
position: relative;
z-index: -1;
perspective: 800px; /* 设置透视属性值 */
transform: rotateY(180deg); /* 添加左右翻转效果 */
}

.handcardNumber1 > .cardNumber1 {
left: 180px;
bottom: 12px;
height: 8px;
line-height: 25px;
text-align: center;
font-size: 19px;
white-space: nowrap;
}
31 changes: 25 additions & 6 deletions shoushaUI/lbtn/main1.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ app.import(function (lib, game, ui, get, ai, _status, app) {
if (lib.config.extension_十周年UI_LTAN == false) {
var liaotian = ui.create.node("img");
liaotian.src = lib.assetURL + "extension/十周年UI/shoushaUI/lbtn/images/uibutton/liaotian.png";
liaotian.style.cssText = "display: block;--w: 135px;--h: calc(var(--w) * 699/960);width: var(--w);height: var(--h);position: absolute;top: calc(100% - 97px);right: calc(100% - 125px);background-color: transparent;z-index:3";
if (lib.config["extension_十周年UI_rightLayout"] == "on") {
liaotian.style.cssText = "display: block;--w: 135px;--h: calc(var(--w) * 1019/1400);width: var(--w);height: var(--h);position: absolute;top: calc(100% - 97px);right: calc(100% - 129px);background-color: transparent;z-index:3";
} else {
//左手模式聊天按钮参数
liaotian.style.cssText = "display: block; --w: 135px; --h: calc(var(--w) * 1019/1400); width: var(--w); height: var(--h); position: absolute; top: calc(100% - 97px); left: calc(100% - 129px); background-color: transparent; z-index: 3; transform: scaleX(-1);";
}
liaotian.onclick = function () {
if (lib.config["extension_说话_enable"]) {
game.showChatWordBackground();
Expand Down Expand Up @@ -557,7 +562,14 @@ app.import(function (lib, game, ui, get, ai, _status, app) {
ui.create.div(".lbtn-control", node2, " ");
ui.create.div(".lbtn-control", node2, " ");
/*ui.create.div('.lbtn-control1', node2, plugin.click.paixu);*/
var paixuauto = ui.create.div(".lbtn-paixu", ui.arena);
//左手模式记录和牌序按钮
if (lib.config["extension_十周年UI_rightLayout"] == "on") {
var paixuauto = ui.create.div(".lbtn-paixu", ui.arena);
var jilu = ui.create.div(".latn-jilu", ui.arena, ui.click.pause);
} else {
var paixuauto = ui.create.div(".lbtn-paixu1", ui.arena);
var jilu = ui.create.div(".latn-jilu1", ui.arena, ui.click.pause);
}
paixuauto.onclick = function () {
if (window.paixuxx == false) {
plugin.click.paixu();
Expand All @@ -569,14 +581,21 @@ app.import(function (lib, game, ui, get, ai, _status, app) {
window.paixuxx = false;
}
};
var jilu = ui.create.div(".latn-jilu", ui.arena, ui.click.pause);

//-----------------//
/*ui.create.div('.lbtn-control2', node2, ui.click.pause);*/
//var node4 = ui.create.div('.tuoguanButton', ui.arena, ui.click.auto);
var node = ui.create.div(".handcardNumber", ui.arena).hide();
//左手模式同上继续加一个显示手牌牌量新的按钮css
if (lib.config["extension_十周年UI_rightLayout"] == "on") {
var node = ui.create.div(".handcardNumber", ui.arena).hide();
node.node = {
cardPicture: ui.create.div(".cardPicture", node),
cardNumber: ui.create.div(".cardNumber1", node),
};
} else var node = ui.create.div(".handcardNumber1", ui.arena).hide();
node.node = {
cardPicture: ui.create.div(".cardPicture", node),
cardNumber: ui.create.div(".cardNumber", node),
cardPicture: ui.create.div(".cardPicture1", node),
cardNumber: ui.create.div(".cardNumber1", node),
};
//手牌显示·---//
node.updateCardnumber = function () {
Expand Down
79 changes: 79 additions & 0 deletions shoushaUI/lbtn/main1_window.css
Original file line number Diff line number Diff line change
Expand Up @@ -673,3 +673,82 @@
left: 230px;
bottom: 80px;
}

/*以下左手模式添加的css*/
.lbtn-paixu1 {
width: 68px;
height: 55px;
background-image: url("./images/uibutton/btn-paixu.png");
right: 1.2%;
bottom: 25%;
z-index: 5;
font-size: 18.1px;
background-size: 100% 100%;
background-color: transparent;
line-height: 45px;
text-align: center;
white-space: nowrap;
color: #c5af88;
font-family: "shousha";
font-weight: bold;
-webkit-text-stroke: 1.1px rgba(43, 31, 25, 0.5);
text-shadow: none;
border-radius: 0px;
}

.lbtn-controls + .lbtn-controls {
margin-top: 1px;
}

/*记录*/
.latn-jilu1 {
display: block;
position: absolute;
right: 1.2%;
background-size: 100% 100%;
border-radius: 1px;
width: 68px;
height: 55px;
/*--w: 68px;
--h: calc(var(--w) * 78/91);
width: var(--w);
height: var(--h);*/
background-image: url("./images/uibutton/btn-jilu.png");
bottom: 15%;
z-index: 5;
}

/*左手手牌量显示*/
.handcardNumber1 {
bottom: 2px;
left: 0px; /* 将right属性值修改为left属性值 */
font-family: "HYZLSJ";
color: #ffffff;
font-weight: 100 !important;
font-size: 13px !important;
}

.handcardNumber1 > .cardPicture1 {
left: -50px; /* 调整left属性值 */
bottom: -16px;
--w: 417px;
--h: calc(var(--w) * 235 / 500); /*宽和长*/
width: var(--w);
height: var(--h);
background-image: url("./images/uibutton/shoupai1.png");
background-size: 100% 100%;
position: relative;
z-index: -1;
perspective: 800px; /* 设置透视属性值 */
transform: rotateY(180deg); /* 添加左右翻转效果 */
}

.handcardNumber1 > .cardNumber1 {
left: 180px;
bottom: 12px;
height: 8px;
line-height: 25px;
text-align: center;
font-size: 19px;
white-space: nowrap;
}
Loading

0 comments on commit 1f95f7e

Please sign in to comment.