Skip to content

Commit 5ccfe2e

Browse files
committed
up 修改收藏
添加整合包收藏
1 parent b5853d8 commit 5ccfe2e

29 files changed

Lines changed: 718 additions & 567 deletions

src/ColorMC.Core/CoreMain.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ namespace ColorMC.Core;
1313

1414
public static class ColorMCCore
1515
{
16-
public const int VersionNum = 39;
17-
public const string TopVersion = "39";
18-
public const string DateVersion = "20251202";
16+
public const int VersionNum = 40;
17+
public const string TopVersion = "40";
18+
public const string DateVersion = "20251203";
1919

2020
/// <summary>
2121
/// 版本号

src/ColorMC.Gui/App.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
<StyleInclude Source="/Style/ToggleSwitch.axaml" />
4747
<StyleInclude Source="/Style/WindowNotificationManager.axaml" />
4848
<StyleInclude Source="/Style/ColorPicker.axaml" />
49+
<StyleInclude Source="/Style/AutoCompleteBox.axaml" />
4950
</Application.Styles>
5051
<Application.Resources>
5152
<ResourceDictionary>

src/ColorMC.Gui/Objs/Config/CollectObj.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public record CollectObj
5151
/// </summary>
5252
public Dictionary<string, List<string>> Groups { get; set; }
5353

54+
/// <summary>
55+
/// 显示整合包
56+
/// </summary>
57+
public bool ModPack { get; set; }
5458
/// <summary>
5559
/// 显示模组
5660
/// </summary>

src/ColorMC.Gui/Resource/Language/zh-cn.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -643,16 +643,16 @@
643643
"DownloadWindow.Text12": "空闲中",
644644
"DownloadWindow.Text13": "下载已停止",
645645
"AddGameWindow.Title": "添加游戏实例",
646-
"AddGameWindow.Tabs.Text1": "从头新建",
646+
"AddGameWindow.Tabs.Text1": "从版本新建",
647647
"AddGameWindow.Tabs.Text2": "从压缩包导入",
648648
"AddGameWindow.Tabs.Text3": "从文件夹导入",
649649
"AddGameWindow.Tab1.Text2": "实例名字",
650650
"AddGameWindow.Tab1.Text4": "模组加载器",
651651
"AddGameWindow.Tab1.Text5": "游戏分组",
652652
"AddGameWindow.Tab1.Text9": "添加分组",
653-
"AddGameWindow.Tab1.Text11": "刷新加载器",
654-
"AddGameWindow.Tab1.Text13": "下载云同步实例",
655-
"AddGameWindow.Tab1.Text14": "下载服务器实例",
653+
"AddGameWindow.Tab1.Text11": "刷新类型",
654+
"AddGameWindow.Tab1.Text13": "下载云实例",
655+
"AddGameWindow.Tab1.Text14": "下载在线实例",
656656
"AddGameWindow.Tab1.Text15": "模组加载器的安装器(-install.jar)位置",
657657
"AddGameWindow.Tab1.Text16": "后加载原版运行库",
658658
"AddGameWindow.Tab1.Text19": "下载整合包",
@@ -786,7 +786,6 @@
786786
"AddResourceWindow.Text27": "资源版本数据加载失败",
787787
"AddResourceWindow.Text28": "资源下载失败",
788788
"AddResourceWindow.Text29": "没有可以添加的存档",
789-
"AddResourceWindow.Text30": "数据包下载错误",
790789
"AddResourceWindow.Text31": "资源下载错误",
791790
"AddResourceWindow.Text32": "获取模组下载信息失败",
792791
"AddResourceWindow.Text33": "高清修复版本加载失败",
@@ -1044,14 +1043,18 @@
10441043
"CollectWindow.Text14": "正在获取版本信息",
10451044
"CollectWindow.Text15": "正在下载资源",
10461045
"CollectWindow.Text16": "资源已添加到游戏实例",
1047-
"CollectWindow.Text17": "是否要取消收藏所选资源",
1046+
"CollectWindow.Text17": "是否从所有分组中删除选择的收藏",
10481047
"CollectWindow.Text18": "选择一个需要添加的分组",
10491048
"CollectWindow.Text19": "这个分组已经存在",
10501049
"CollectWindow.Text20": "该游戏实例不存在",
10511050
"CollectWindow.Text21": "资源下载出现错误",
10521051
"CollectWindow.Text22": "安装到实例",
10531052
"CollectWindow.Text23": "删除收藏",
10541053
"CollectWindow.Text24": "添加到分组",
1054+
"CollectWindow.Text25": "你无法同时安装整合包与其他资源",
1055+
"CollectWindow.Text26": "默认分组",
1056+
"CollectWindow.Text27": "过滤器:",
1057+
"CollectWindow.Text28": "是否删除该分组选择的收藏",
10551058
"BuildPackWindow.Title": "导出客户端",
10561059
"BuildPackWindow.Text1": "正在生成客户端包",
10571060
"BuildPackWindow.Text2": "生成的位置",
@@ -1309,6 +1312,7 @@
13091312
"App.Text113": "启动器更新日志获取失败",
13101313
"App.Text114": "等{0}位作者...",
13111314
"App.Text115": "整合包模组信息",
1315+
"App.Text116": "是否要删除该收藏",
13121316
"App.Select.Text1": "保存皮肤",
13131317
"App.Select.Text2": "选择服务器实例储存文件夹",
13141318
"App.Select.Text3": "保存文本",
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<Styles
2+
xmlns="https://github.com/avaloniaui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:generic="using:System.Collections.Generic"
6+
xmlns:setting="clr-namespace:ColorMC.Gui.UI">
7+
<Design.PreviewWith>
8+
<Border
9+
Width="300"
10+
Height="300"
11+
Padding="20">
12+
<AutoCompleteBox Width="200">
13+
<AutoCompleteBox.ItemsSource>
14+
<generic:List x:TypeArguments="x:String">
15+
Alabama
16+
Alaska
17+
Arizona
18+
Arkansas
19+
California
20+
Colorado
21+
Connecticut
22+
Delaware
23+
</generic:List>
24+
</AutoCompleteBox.ItemsSource>
25+
</AutoCompleteBox>
26+
</Border>
27+
</Design.PreviewWith>
28+
29+
<Style Selector="AutoCompleteBox">
30+
<Setter Property="MaxDropDownHeight" Value="300" />
31+
<Setter Property="Background" Value="{setting:Theme ButtonBG}" />
32+
<Setter Property="BorderBrush" Value="{setting:Theme AllBorder}" />
33+
<Setter Property="BorderThickness" Value="1" />
34+
<Setter Property="CornerRadius" Value="5" />
35+
36+
<Style Selector="^:pointerover /template/ Border#Background">
37+
<Setter Property="BorderBrush" Value="{setting:Theme MainColor}" />
38+
</Style>
39+
</Style>
40+
</Styles>

src/ColorMC.Gui/UI/Controls/Add/AddGameTab1Control.axaml

Lines changed: 72 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,36 @@
4242
Path="/Resource/Icon/GameEdit/svg1.svg" />
4343
<TextBlock FontSize="{setting:Style FontTitle}" Text="{setting:Localize Text.GameVersion}" />
4444
</StackPanel>
45-
<WrapPanel IsEnabled="{Binding !IsLoad}">
46-
<DockPanel MinWidth="230" Margin="0,0,10,10">
47-
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Type}" />
48-
<ComboBox
49-
HorizontalAlignment="Stretch"
50-
ItemsSource="{Binding VersionTypeList}"
51-
SelectedIndex="{Binding VersionType}" />
52-
</DockPanel>
53-
<DockPanel MinWidth="230" Margin="0,0,10,10">
54-
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Version}" />
55-
<ComboBox
56-
HorizontalAlignment="Stretch"
57-
ItemsSource="{Binding GameVersionList}"
58-
SelectedItem="{Binding Version}" />
59-
</DockPanel>
45+
<Grid
46+
Margin="0,0,0,10"
47+
ColumnDefinitions="auto,*,auto,*,auto"
48+
IsEnabled="{Binding !IsLoad}">
49+
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Type}" />
50+
<ComboBox
51+
Grid.Column="1"
52+
Margin="0,0,10,0"
53+
HorizontalAlignment="Stretch"
54+
ItemsSource="{Binding VersionTypeList}"
55+
SelectedIndex="{Binding VersionType}" />
56+
<TextBlock
57+
Grid.Column="2"
58+
Margin="0,0,5,0"
59+
Text="{setting:Localize Text.Version}" />
60+
<ComboBox
61+
Grid.Column="3"
62+
HorizontalAlignment="Stretch"
63+
ItemsSource="{Binding GameVersionList}"
64+
SelectedItem="{Binding Version}" />
6065
<Button
66+
Grid.Column="4"
6167
Width="100"
6268
Height="35"
63-
Margin="-2,-3,7,7"
64-
HorizontalAlignment="Right"
69+
Margin="7,-3,7,-3"
6570
Classes="top"
6671
Command="{Binding LoadVersion}"
6772
Content="{setting:Localize Text.ReloadVersion}"
6873
ToolTip.Tip="{setting:Localize ToolTip.Text81}" />
69-
</WrapPanel>
74+
</Grid>
7075
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
7176
<svg:SvgControl
7277
Width="24"
@@ -75,53 +80,50 @@
7580
Path="/Resource/Icon/GameEdit/svg2.svg" />
7681
<TextBlock FontSize="{setting:Style FontTitle}" Text="{setting:Localize AddGameWindow.Tab1.Text4}" />
7782
</StackPanel>
78-
<WrapPanel>
79-
<DockPanel
80-
MinWidth="230"
81-
Margin="0,0,10,10"
82-
IsEnabled="{Binding !IsLoad}">
83-
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Type}" />
84-
<ComboBox
85-
HorizontalAlignment="Stretch"
86-
VerticalContentAlignment="Center"
87-
IsEnabled="{Binding EnableLoader}"
88-
ItemsSource="{Binding LoaderTypeList}"
89-
SelectedIndex="{Binding LoaderType}" />
90-
</DockPanel>
91-
<DockPanel
92-
MinWidth="230"
93-
Margin="0,0,10,10"
94-
IsEnabled="{Binding !IsLoad}">
95-
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Version}" />
96-
<ComboBox
97-
HorizontalAlignment="Stretch"
98-
VerticalContentAlignment="Center"
99-
IsEnabled="{Binding EnableLoaderVersion}"
100-
ItemsSource="{Binding LoaderVersionList}"
101-
SelectedItem="{Binding LoaderVersion}" />
102-
</DockPanel>
103-
<StackPanel
83+
<Grid
84+
Margin="0,0,0,10"
85+
ColumnDefinitions="auto,*,auto,auto,*,auto"
86+
IsEnabled="{Binding !IsLoad}">
87+
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Type}" />
88+
<ComboBox
89+
Grid.Column="1"
10490
Margin="0,0,10,0"
105-
HorizontalAlignment="Right"
106-
Orientation="Horizontal">
107-
<Button
108-
Width="100"
109-
Height="35"
110-
Margin="-2,-3,3,7"
111-
Classes="top"
112-
Command="{Binding VersionSelect}"
113-
Content="{setting:Localize AddGameWindow.Tab1.Text11}"
114-
ToolTip.Tip="{setting:Localize ToolTip.Text83}" />
115-
<Button
116-
Width="100"
117-
Height="35"
118-
Margin="-2,-3,-3,7"
119-
Classes="top"
120-
Command="{Binding GetLoader}"
121-
Content="{setting:Localize Text.ReloadVersion}"
122-
ToolTip.Tip="{setting:Localize ToolTip.Text82}" />
123-
</StackPanel>
124-
</WrapPanel>
91+
HorizontalAlignment="Stretch"
92+
VerticalContentAlignment="Center"
93+
IsEnabled="{Binding EnableLoader}"
94+
ItemsSource="{Binding LoaderTypeList}"
95+
SelectedIndex="{Binding LoaderType}" />
96+
<Button
97+
Grid.Column="2"
98+
Width="100"
99+
Height="35"
100+
Margin="-3,-3,7,-3"
101+
Classes="top"
102+
Command="{Binding VersionSelect}"
103+
Content="{setting:Localize AddGameWindow.Tab1.Text11}"
104+
ToolTip.Tip="{setting:Localize ToolTip.Text83}" />
105+
<TextBlock
106+
Grid.Column="3"
107+
Margin="0,0,5,0"
108+
Text="{setting:Localize Text.Version}" />
109+
<ComboBox
110+
Grid.Column="4"
111+
Margin="0,0,10,0"
112+
HorizontalAlignment="Stretch"
113+
VerticalContentAlignment="Center"
114+
IsEnabled="{Binding EnableLoaderVersion}"
115+
ItemsSource="{Binding LoaderVersionList}"
116+
SelectedItem="{Binding LoaderVersion}" />
117+
<Button
118+
Grid.Column="5"
119+
Width="100"
120+
Height="35"
121+
Margin="-3,-3,7,-3"
122+
Classes="top"
123+
Command="{Binding GetLoader}"
124+
Content="{setting:Localize Text.ReloadVersion}"
125+
ToolTip.Tip="{setting:Localize ToolTip.Text82}" />
126+
</Grid>
125127
<TextBox
126128
Height="30"
127129
Margin="0,0,10,10"
@@ -153,23 +155,12 @@
153155
<TextBlock FontSize="{setting:Style FontTitle}" Text="{setting:Localize AddGameWindow.Tab1.Text5}" />
154156
</StackPanel>
155157
<WrapPanel>
156-
<DockPanel MinWidth="230" Margin="0,0,10,10">
157-
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Group}" />
158-
<ComboBox
159-
HorizontalAlignment="Stretch"
160-
ItemsSource="{Binding GroupList}"
161-
SelectedItem="{Binding Group}" />
162-
</DockPanel>
163-
<Button
164-
Width="100"
165-
Height="35"
166-
Margin="-2,-3,7,7"
167-
HorizontalAlignment="Right"
168-
VerticalAlignment="Center"
169-
Classes="top"
170-
Command="{Binding AddGroup}"
171-
Content="{setting:Localize AddGameWindow.Tab1.Text9}"
172-
ToolTip.Tip="{setting:Localize ToolTip.Text84}" />
158+
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Group}" />
159+
<ComboBox
160+
Width="230"
161+
IsEditable="True"
162+
ItemsSource="{Binding GroupList}"
163+
Text="{Binding Group}" />
173164
</WrapPanel>
174165
</StackPanel>
175166
</DockPanel>

src/ColorMC.Gui/UI/Controls/Add/AddGameTab2Control.axaml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,13 @@
6060
Path="/Resource/Icon/AddMenu/item2.svg" />
6161
<TextBlock FontSize="{setting:Style FontTitle}" Text="{setting:Localize AddGameWindow.Tab2.Text2}" />
6262
</StackPanel>
63-
<WrapPanel>
64-
<DockPanel MinWidth="230" Margin="0,0,10,10">
65-
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Type}" />
66-
<ComboBox
67-
HorizontalAlignment="Stretch"
68-
ItemsSource="{Binding PackTypeList}"
69-
SelectedIndex="{Binding Type}" />
70-
</DockPanel>
71-
</WrapPanel>
63+
<StackPanel Margin="0,0,0,10" Orientation="Horizontal">
64+
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Type}" />
65+
<ComboBox
66+
Width="230"
67+
ItemsSource="{Binding PackTypeList}"
68+
SelectedIndex="{Binding Type}" />
69+
</StackPanel>
7270
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
7371
<svg:SvgControl
7472
Width="24"
@@ -77,25 +75,14 @@
7775
Path="/Resource/Icon/GameEdit/svg3.svg" />
7876
<TextBlock FontSize="{setting:Style FontTitle}" Text="{setting:Localize AddGameWindow.Tab1.Text5}" />
7977
</StackPanel>
80-
<WrapPanel>
81-
<DockPanel MinWidth="230" Margin="0,0,10,10">
82-
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Group}" />
83-
<ComboBox
84-
HorizontalAlignment="Stretch"
85-
ItemsSource="{Binding GroupList}"
86-
SelectedItem="{Binding Group}" />
87-
</DockPanel>
88-
<Button
89-
Width="100"
90-
Height="35"
91-
Margin="-2,-3,7,7"
92-
HorizontalAlignment="Right"
93-
VerticalAlignment="Center"
94-
Classes="top"
95-
Command="{Binding AddGroup}"
96-
Content="{setting:Localize AddGameWindow.Tab1.Text9}"
97-
ToolTip.Tip="{setting:Localize ToolTip.Text84}" />
98-
</WrapPanel>
78+
<StackPanel Margin="0,0,0,5" Orientation="Horizontal">
79+
<TextBlock Margin="0,0,5,0" Text="{setting:Localize Text.Group}" />
80+
<ComboBox
81+
Width="230"
82+
IsEditable="True"
83+
ItemsSource="{Binding GroupList}"
84+
Text="{Binding Group}" />
85+
</StackPanel>
9986
</StackPanel>
10087
</DockPanel>
10188
</Border>

0 commit comments

Comments
 (0)