chore: 自动战斗中的 使用编队 改为勾选框

This commit is contained in:
uye
2025-08-18 20:28:51 +08:00
parent 5c951b6bc7
commit 9778748d99
2 changed files with 17 additions and 6 deletions

View File

@@ -269,9 +269,16 @@ namespace MaaWpfGui.ViewModels.UI
}
}
private bool _useFormation;
public bool UseFormation
{
get => _useFormation;
set => SetAndNotify(ref _useFormation, value);
}
public List<GenericCombinedData<int>> FormationSelectList { get; } =
[
new() { Display = LocalizationHelper.GetString("Current"), Value = 0 },
new() { Display = "1", Value = 1 },
new() { Display = "2", Value = 2 },
new() { Display = "3", Value = 3 },
@@ -1276,7 +1283,7 @@ namespace MaaWpfGui.ViewModels.UI
NeedNavigate = false,
LoopTimes = Loop ? LoopTimes : 1,
UseSanityPotion = _useSanityPotion,
SelectFormation = _selectFormation,
SelectFormation = UseFormation ? _selectFormation : 0,
};
ret = Instances.AsstProxy.AsstAppendTaskWithEncoding(AsstProxy.TaskType.Copilot, _taskType, task.Serialize().Params);
ret &= Instances.AsstProxy.AsstStart();

View File

@@ -131,16 +131,20 @@
VerticalAlignment="Center"
Orientation="Horizontal"
Visibility="{c:Binding Form}">
<controls:TextBlock VerticalAlignment="Center" Text="{DynamicResource UseFormation}" />
<CheckBox
VerticalAlignment="Center"
Content="{DynamicResource UseFormation}"
IsChecked="{c:Binding UseFormation}" />
<ComboBox
Margin="0,-10"
Padding="0,-1,8,0"
Margin="2.5,-10,0,-10"
Padding="2.5,-1,0,0"
VerticalAlignment="Center"
BorderThickness="0"
DisplayMemberPath="Display"
ItemsSource="{Binding FormationSelectList}"
SelectedValue="{Binding SelectFormation}"
SelectedValuePath="Value" />
SelectedValuePath="Value"
Visibility="{c:Binding UseFormation}" />
</StackPanel>
</StackPanel>