Skip to content

Commit

Permalink
split decloak warning so you can toggle individually observatories, g…
Browse files Browse the repository at this point in the history
…ates and other
  • Loading branch information
BitBaboonSteve committed Sep 8, 2024
1 parent 17e0a16 commit 0dbcdd3
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 10 deletions.
38 changes: 38 additions & 0 deletions EVEData/LocalCharacter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public class LocalCharacter : Character, INotifyPropertyChanged

private bool m_ObservatoryDecloakWarningEnabled;

private bool m_GateDecloakWarningEnabled;

private bool m_DecloakWarningEnabled;


private bool m_CombatWarningEnabled;

private bool routeNeedsUpdate = false;
Expand Down Expand Up @@ -108,6 +113,8 @@ public LocalCharacter()
IsOnline = true;
CombatWarningEnabled = true;
ObservatoryDecloakWarningEnabled = true;
DecloakWarningEnabled = true;
GateDecloakWarningEnabled = true;
}

/// <summary>
Expand All @@ -126,6 +133,8 @@ public LocalCharacter(string name, string lcf, string location)

CombatWarningEnabled = false;
ObservatoryDecloakWarningEnabled = true;
DecloakWarningEnabled = true;
GateDecloakWarningEnabled = true;
}

public event PropertyChangedEventHandler PropertyChanged;
Expand Down Expand Up @@ -216,6 +225,35 @@ public bool ObservatoryDecloakWarningEnabled
}
}

public bool GateDecloakWarningEnabled
{
get
{
return m_GateDecloakWarningEnabled;
}
set
{
m_GateDecloakWarningEnabled = value;
OnPropertyChanged("GateDecloakWarningEnabled");
}
}

public bool DecloakWarningEnabled
{
get
{
return m_DecloakWarningEnabled;
}
set
{
m_DecloakWarningEnabled = value;
OnPropertyChanged("DecloakWarningEnabled");
}
}




public bool CombatWarningEnabled
{
get
Expand Down
20 changes: 11 additions & 9 deletions SMT/CharactersWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
<ColumnDefinition Width="50*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="180" />
<RowDefinition Height="125" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
Expand All @@ -57,14 +60,11 @@
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition Height="30" />
<RowDefinition Height="30" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>

<Image Source="{Binding PortraitLocation}" Width="170" Height="170" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="10" />
<Image Source="{Binding PortraitLocation}" Width="120" Height="120" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="10" />
<StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1" Margin="-40,30" Grid.RowSpan="2">
<TextBlock Text="{Binding Name}" FontSize="24" Foreground="White" />
<TextBlock Text="{Binding Name}" FontSize="24" Foreground="White" />

<TextBlock FontSize="14" Foreground="LightGray">
<Run Text="{Binding CorporationName, FallbackValue='????'}" />
Expand Down Expand Up @@ -120,7 +120,7 @@
</TextBlock>
</StackPanel>

<GroupBox Header="Navigation Options" Grid.Row="1" Grid.RowSpan="8" BorderBrush="DarkGray" Margin="5">
<GroupBox Header="Navigation Options" Grid.Row="1" Grid.RowSpan="10" BorderBrush="DarkGray" Margin="5">
<StackPanel Margin="4">
<StackPanel Orientation="Horizontal" Margin="4">
<Label Content="Autopilot" />
Expand All @@ -142,14 +142,16 @@
</StackPanel>
</GroupBox>

<GroupBox Header="Notifications" Grid.Column="1" Grid.Row="5" Grid.RowSpan="4" BorderBrush="DarkGray" Margin="5">
<GroupBox Header="Notifications" Grid.Column="1" Grid.Row="5" Grid.RowSpan="6" BorderBrush="DarkGray" Margin="5">
<StackPanel Margin="4">
<CheckBox IsChecked="{Binding ObservatoryDecloakWarningEnabled}" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Content="Mobile Observatory Decloak" Margin="4" />
<CheckBox IsChecked="{Binding GateDecloakWarningEnabled}" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Content="Gate Decloak" Margin="4" />
<CheckBox IsChecked="{Binding DecloakWarningEnabled}" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Content="Other Decloak" Margin="4" />
<CheckBox IsChecked="{Binding CombatWarningEnabled}" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Content="Combat" Margin="4" />
</StackPanel>
</GroupBox>

<StackPanel Grid.Column="1" Grid.Row="9" Orientation="Horizontal" HorizontalAlignment="Right">
<StackPanel Grid.Column="1" Grid.Row="11" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="" Width="20" VerticalAlignment="Center" Margin="4,0" x:Name="moveDownBtn" Click="MoveDownBtn_OnClick" />
<Button Content="" Width="20" VerticalAlignment="Center" Margin="4,0" x:Name="moveUpBtn" Click="MoveUpBtn_OnClick" />
<Button Content="Delete" Width="100" VerticalAlignment="Center" Margin="20,0" x:Name="deleteBtn" Click="deleteBtn_Click" />
Expand Down
15 changes: 14 additions & 1 deletion SMT/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,20 @@ private void OnShipDecloaked(string character, string text)
{
if (lc.Name == character)
{
if (lc.ObservatoryDecloakWarningEnabled)
bool triggerAlert = lc.DecloakWarningEnabled;

if (text.Contains("Mobile Observatory"))
{
triggerAlert = lc.ObservatoryDecloakWarningEnabled;
}

if (text.Contains("Stargate"))
{
triggerAlert = lc.GateDecloakWarningEnabled;
}


if (triggerAlert)
{
if (OperatingSystem.IsWindows() && OperatingSystem.IsWindowsVersionAtLeast(10, 0, 17763, 0))
{
Expand Down

0 comments on commit 0dbcdd3

Please sign in to comment.