Skip to content

Commit

Permalink
修复“复制隐藏物品介绍,会未响应”bug; 并整理美化
Browse files Browse the repository at this point in the history
  • Loading branch information
way-zer committed Dec 13, 2024
1 parent 60b6881 commit d3171c6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 26 deletions.
1 change: 0 additions & 1 deletion assets/bundles/bundle-mdtx.properties
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ setting.alwaysShowUnitRTSAi.name = [acid]单位[white]:执行的RTS命令
setting.arcAlwaysTeamColor.name = [acid]玩家列表[white]:总是绘制队伍颜色
setting.arcBuildInfo.name = [cyan]建造范围
setting.arcDrillProgress.name = [acid]钻头[white]:显示挖掘进度 [gray]只推荐mod下使用
setting.arcShareWaveInfo.name = [acid]游戏信息交流[gray](标记物品) [red]请勿刷屏
setting.arcTurretPlacementItem.name = [pink]炮台[white]:弹药射界
setting.arcdrillmode.name = [acid]钻头[white]:常亮矿物
setting.blockBars.name = [acid]建筑属性
Expand Down
1 change: 0 additions & 1 deletion assets/bundles/bundle-mdtx_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ setting.arcAlwaysTeamColor.name = [acid]Player List [white]: Always Draw Team Co
setting.arcBuildInfo.name = [cyan]Build Range
setting.arcDrillProgress.name = [acid]Drill [white]: Show Mining Progress [gray]Recommended for mod use only
setting.arcSelfName.name = [acid]Show Own Name
setting.arcShareWaveInfo.name = [acid]Game Info Sharing gray [red]Do Not Spam
setting.arcTurretPlacementItem.name = [pink]Turret [white]: Ammo Arc
setting.arcdrillmode.name = [acid]Drill [white]: Always Show Minerals
setting.arclogicbordershow.name = [acid]Display Screen and Panel [white]: Border
Expand Down
33 changes: 14 additions & 19 deletions patches/client/0063-ARC-merged.patch
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ way-zer <[email protected]> on 2024/9/8
core/src/mindustry/type/UnitType.java | 142 +++++--
core/src/mindustry/type/Weapon.java | 26 +-
core/src/mindustry/ui/Fonts.java | 2 +-
.../ui/dialogs/ContentInfoDialog.java | 27 +-
.../ui/dialogs/ContentInfoDialog.java | 22 +-
.../ui/dialogs/CustomRulesDialog.java | 371 +++++++++++++-----
.../mindustry/ui/dialogs/DatabaseDialog.java | 3 +-
.../mindustry/ui/dialogs/PausedDialog.java | 12 +-
Expand All @@ -123,7 +123,7 @@ way-zer <[email protected]> on 2024/9/8
.../ui/fragments/PlacementFragment.java | 151 +++++--
.../ui/fragments/PlayerListFragment.java | 93 ++---
core/src/mindustry/world/Block.java | 7 +-
30 files changed, 1788 insertions(+), 299 deletions(-)
30 files changed, 1783 insertions(+), 299 deletions(-)

diff --git a/core/src/mindustry/ai/BlockIndexer.java b/core/src/mindustry/ai/BlockIndexer.java
index 60bcca661ec27bbd5dc718ab9b4d7e1fc69d40dc..0b5de3b1215c9fdfd25e207e4491f792cc8b11a8 100644
Expand Down Expand Up @@ -1658,7 +1658,7 @@ index fe055ed5f0aa980f8177690bc14430bd6e920108..3514bfb883f7e81bb7f65e9c6d4e03cc
private static TextureRegion[] iconTable;
private static int lastCid;
diff --git a/core/src/mindustry/ui/dialogs/ContentInfoDialog.java b/core/src/mindustry/ui/dialogs/ContentInfoDialog.java
index 8defe26a2482e54d24d9b12e4a9ae453e13348f3..bd97f9cc7c1c491b1cb7eee0c19a32041b225674 100644
index 8defe26a2482e54d24d9b12e4a9ae453e13348f3..09e0436a567d0ab282e137bbf4ed2d75906f2c6c 100644
--- a/core/src/mindustry/ui/dialogs/ContentInfoDialog.java
+++ b/core/src/mindustry/ui/dialogs/ContentInfoDialog.java
@@ -8,8 +8,10 @@ import arc.util.*;
Expand All @@ -1684,33 +1684,28 @@ index 8defe26a2482e54d24d9b12e4a9ae453e13348f3..bd97f9cc7c1c491b1cb7eee0c19a3204
});

table.row();
@@ -89,12 +92,30 @@ public class ContentInfoDialog extends BaseDialog{
@@ -89,12 +92,25 @@ public class ContentInfoDialog extends BaseDialog{
}

if(content.details != null){
- table.add("[gray]" + (content.unlocked() || !content.hideDetails ? content.details : Iconc.lock + " " + Core.bundle.get("unlock.incampaign"))).pad(6).padTop(20).width(400f).wrap().fillX();
+ //table.add("[gray]" + (content.unlocked() || !content.hideDetails ? content.details : Iconc.lock + " " + Core.bundle.get("unlock.incampaign"))).pad(6).padTop(20).width(400f).wrap().fillX();
+ table.add("[gray]" + content.details ).pad(6).padTop(20).width(400f).wrap().fillX();
table.row();
}

content.displayExtra(table);

+ table.table(t -> {
+ t.row();
+ t.table(tt->{
+ tt.button(content.emoji(), Styles.cleart, () -> Core.app.setClipboardText(content.emoji())).width(60f).tooltip(content.emoji());
+ tt.button(Icon.info, Styles.clearNonei, () -> Core.app.setClipboardText(content.name)).width(50f).tooltip(content.name);
+ tt.button(Icon.book, Styles.clearNonei, () -> Core.app.setClipboardText(content.description)).width(50f).tooltip(content.description);
+ });
+
+ t.row();
+ t.table(tt -> {
+ tt.add("♐");
+ tt.button("简", Styles.cleart, () -> ArcMessageDialog.shareContent(content, false)).width(50f);
+ tt.button("详", Styles.cleart, () -> ArcMessageDialog.shareContent(content, true)).width(50f);
+ }).visible(() -> Core.settings.getBool("arcShareWaveInfo"));
+
+ t.defaults().size(40f);
+ t.button(content.emoji(), Styles.cleart, () -> Core.app.setClipboardText(content.emoji())).tooltip(content.emoji());
+ t.button(Icon.info, Styles.clearNonei, () -> Core.app.setClipboardText(content.name)).tooltip(content.name);
+ if(content.description != null)
+ t.button(Icon.book, Styles.clearNonei, () -> Core.app.setClipboardText(content.description)).tooltip(content.description);
+
+ if(net.active()){
+ t.button("♐简", Styles.cleart, () -> ArcMessageDialog.shareContent(content, false)).width(60f);
+ t.button("♐详", Styles.cleart, () -> ArcMessageDialog.shareContent(content, true)).width(60f);
+ }
+ }).fillX().padLeft(10);
+
ScrollPane pane = new ScrollPane(table);
Expand Down
3 changes: 0 additions & 3 deletions src/mindustryX/features/ArcOld.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
import arc.graphics.*;
import arc.graphics.g2d.*;
import arc.struct.*;
import arc.util.*;
import mindustry.ctype.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.world.*;
import mindustryX.features.Settings.*;
import mindustryX.features.ui.*;

import static arc.Core.settings;
import static arc.graphics.Color.RGBtoHSV;
Expand Down Expand Up @@ -136,7 +134,6 @@ public static void init(Seq<LazySettingsCategory> categories){

c.addCategory("arcShareinfo");
c.checkPref("ShowInfoPopup", true);
c.checkPref("arcShareWaveInfo", false);
c.checkPref("arcAlwaysTeamColor", false);

c.addCategory("arcWeakCheat");
Expand Down
4 changes: 2 additions & 2 deletions src/mindustryX/features/ui/WaveInfoDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class WaveInfoDisplay extends Table{
public static SettingsV2.CheckPref enable = new CheckPref("newWaveInfoDisplay", true);
public static final float fontScl = 0.8f;
private int waveOffset = 0;
private WaveInfoDialog waveInfoDialog = new WaveInfoDialog();
private final WaveInfoDialog waveInfoDialog = new WaveInfoDialog();
private final Table waveInfo;

public WaveInfoDisplay(){
Expand Down Expand Up @@ -49,7 +49,7 @@ public WaveInfoDisplay(){
setWaveOffset(0);
})).tooltip("强制跳波").disabled((b) -> net.client());
buttons.button("♐", Styles.cleart, () -> ArcMessageDialog.shareWaveInfo(state.wave + waveOffset))
.disabled((b) -> !state.rules.waves && !Core.settings.getBool("arcShareWaveInfo"));
.disabled((b) -> !state.rules.waves);
}).center().row();

waveInfo = new Table().left().top();
Expand Down

0 comments on commit d3171c6

Please sign in to comment.