add support for power combat zones in UI
This commit is contained in:
parent
912e8b602f
commit
4fe77e6946
@ -121,6 +121,7 @@
|
||||
<Button Content="Ground" x:Name="Ground" Click="Ground_Click"/>
|
||||
<Button Content="Ship" x:Name="Ship" Click="Ship_Click"/>
|
||||
<Button Content="AX" x:Name="Thargoid" Click="Thargoid_Click"/>
|
||||
<Button Content="Power" x:Name="Power" Click="Power_Click"/>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
|
@ -476,6 +476,16 @@ public partial class MainWindow : MetroWindow {
|
||||
RefreshView();
|
||||
}
|
||||
|
||||
private void Power_Click(object sender, RoutedEventArgs e) {
|
||||
CombatZone transaction = GetTransaction<CombatZone>(sender);
|
||||
if (transaction == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
transaction.Type = CombatZones.PowerCombatZone;
|
||||
RefreshView();
|
||||
}
|
||||
|
||||
private void Thargoid_Click(object sender, RoutedEventArgs e) {
|
||||
CombatZone transaction = GetTransaction<CombatZone>(sender);
|
||||
if (transaction == null) {
|
||||
@ -713,4 +723,5 @@ public partial class MainWindow : MetroWindow {
|
||||
private void PostToAll_Click(object sender, RoutedEventArgs e) {
|
||||
PostToDiscordWebhook(Config.Global.Webhooks);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -59,7 +59,9 @@ public class UITransaction : INotifyPropertyChanged {
|
||||
return Visibility.Hidden;
|
||||
}
|
||||
|
||||
if (string.Compare(combat.Type, CombatZones.ShipCombatZone) == 0) {
|
||||
// Both normal and power combat zones have special objectives
|
||||
if (string.Compare(combat.Type, CombatZones.ShipCombatZone) == 0 ||
|
||||
string.Compare(combat.Type, CombatZones.PowerCombatZone) == 0) {
|
||||
return Visibility.Visible;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user