Skip to content

Commit

Permalink
Thera Map Colours
Browse files Browse the repository at this point in the history
Tool Tip on data slider
WIP Slider
Right Click bugfix #1
  • Loading branch information
Slazanger committed Dec 28, 2018
1 parent 2b49220 commit a4abd52
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 8 deletions.
45 changes: 45 additions & 0 deletions EVEData/Structure.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SMT.EVEData
{
class Structure
{
public enum UpwellType
{
// citadel
Astrahus,
Fortizar,
FactionFortizar,
Keepstar,

// engineering
Raitaru,
Azbel,
Sotiyo,

// refineries
Athanor,
Tatara,
NPC_Station,
}

public enum PowerState
{
Normal,
LowPower,
Shield,
Armor,
}

public string ID { get; set; }
public string Name { get; set; }
public string System { get; set; }
public DateTime LastUpdate { get; set; }
public PowerState State { get; set; }
public UpwellType Type { get; set; }
}
}
2 changes: 1 addition & 1 deletion MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ private void AddRegionsToUniverse()
private void AddDataToUniverse()
{
Brush SysOutlineBrush = new SolidColorBrush(MapConf.ActiveColourScheme.SystemOutlineColour);
Brush TheraBrush = new SolidColorBrush(Colors.YellowGreen);
Brush TheraBrush = new SolidColorBrush(MapConf.ActiveColourScheme.TheraEntranceSystem);
Brush CharacterBrush = new SolidColorBrush(MapConf.ActiveColourScheme.CharacterHighlightColour);

foreach (EVEData.MapRegion mr in EVEManager.Regions)
Expand Down
8 changes: 8 additions & 0 deletions MapColours.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ public class MapColours
[DisplayName("Structure Vunerable Soon")]
public Color SOVStructureVunerableSoonColour { get; set; }

[Category("Thera")]
[DisplayName("Thera Entrance (Region)")]
public Color TheraEntranceRegion { get; set; }

[Category("Thera")]
[DisplayName("Thera Entrance (System)")]
public Color TheraEntranceSystem { get; set; }


static public Color GetSecStatusColour(double secStatus, bool GradeTrueSec)
{
Expand Down
15 changes: 14 additions & 1 deletion MapConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ public void SetDefaultColours()
defaultColours.SOVStructureVunerableColour = Color.FromRgb(64,64,64);
defaultColours.SOVStructureVunerableSoonColour = Color.FromRgb(178, 178, 178);

defaultColours.TheraEntranceRegion = Colors.YellowGreen;
defaultColours.TheraEntranceSystem = Colors.YellowGreen;




Expand Down Expand Up @@ -413,6 +416,9 @@ public void SetDefaultColours()
blueColours.SOVStructureVunerableColour = Colors.Red;
blueColours.SOVStructureVunerableSoonColour = Colors.Yellow;

blueColours.TheraEntranceRegion = Colors.YellowGreen;
blueColours.TheraEntranceSystem = Colors.YellowGreen;



MapColours.Add(blueColours);
Expand Down Expand Up @@ -443,6 +449,8 @@ public void SetDefaultColours()
greyAndRed.SOVStructureVunerableColour = Colors.Red;
greyAndRed.SOVStructureVunerableSoonColour = Colors.Yellow;

greyAndRed.TheraEntranceRegion = Colors.YellowGreen;
greyAndRed.TheraEntranceSystem = Colors.YellowGreen;


MapColours.Add(greyAndRed);
Expand Down Expand Up @@ -473,6 +481,10 @@ public void SetDefaultColours()
dark.SOVStructureVunerableColour = Colors.Red;
dark.SOVStructureVunerableSoonColour = Colors.Yellow;

dark.TheraEntranceRegion = Colors.YellowGreen;
dark.TheraEntranceSystem = Colors.YellowGreen;


MapColours.Add(dark);

MapColours lateNight = new MapColours();
Expand All @@ -498,10 +510,11 @@ public void SetDefaultColours()
lateNight.JumpRangeInColour = Color.FromRgb(0, 255, 0);
lateNight.ActiveIncursionColour = Color.FromRgb(110, 82, 77);


lateNight.SOVStructureVunerableColour = Colors.Red;
lateNight.SOVStructureVunerableSoonColour = Colors.Yellow;

lateNight.TheraEntranceRegion = Colors.YellowGreen;
lateNight.TheraEntranceSystem = Colors.YellowGreen;

MapColours.Add(lateNight);

Expand Down
2 changes: 1 addition & 1 deletion RegionControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
</StackPanel>


<Slider Width="170" Cursor="Arrow" Margin="0,2" Value="{Binding ESIOverlayScale}" Minimum="0.1" Maximum="2" TickFrequency="0.1" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="1" Foreground="{x:Null}" BorderBrush="{x:Null}" Background="{x:Null}" Height="18"/>
<Slider Width="170" Cursor="Arrow" Margin="0,2" Value="{Binding ESIOverlayScale}" Minimum="0.1" Maximum="2" TickFrequency="0.1" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="1" Foreground="{x:Null}" BorderBrush="{x:Null}" Background="{x:Null}" Height="18" ToolTip="Overlay/Data Scale"/>
</StackPanel>


Expand Down
43 changes: 38 additions & 5 deletions RegionControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,7 @@ public void SelectSystem(string name, bool changeRegion = false)

EVEData.AnomData system = ANOMManager.GetSystemAnomData(name);
ANOMManager.ActiveSystem = system;

///AnomSigList.ItemsSource = system.Anoms.Values;


}


Expand All @@ -536,6 +533,11 @@ public void SelectRegion(string regionName)
return;
}

// close the context menu if its open
ContextMenu cm = this.FindResource("SysRightClickContextMenu") as ContextMenu;
cm.IsOpen = false;


EM.UpdateIDsForMapRegion(regionName);

// check its a valid system
Expand Down Expand Up @@ -602,6 +604,17 @@ private void AddSystemsToMap()
bgtc.A = 192;
Brush SysTextBackgroundBrush = new SolidColorBrush(bgtc);


Color bgd = MapConf.ActiveColourScheme.MapBackgroundColour;

bgd.R =(byte)(0.7 * bgd.R);
bgd.G = (byte)(0.7 * bgd.G);
bgd.B = (byte)(0.7 * bgd.B);

Brush MapBackgroundBrushDarkend = new SolidColorBrush(bgd);



Brush NormalGateBrush = new SolidColorBrush(MapConf.ActiveColourScheme.NormalGateColour);
Brush ConstellationGateBrush = new SolidColorBrush(MapConf.ActiveColourScheme.ConstellationGateColour);

Expand Down Expand Up @@ -963,7 +976,7 @@ private void AddSystemsToMap()



if (MapConf.ShowJumpDistance && MapConf.CurrentJumpSystem != null && system.Name != MapConf.CurrentJumpSystem)
if (MapConf.ShowJumpDistance && MapConf.CurrentJumpSystem != null && system.Name != MapConf.CurrentJumpSystem && MapConf.CurrentJumpSystem != "")
{

double Distance = EM.GetRangeBetweenSystems(MapConf.CurrentJumpSystem, system.Name);
Expand Down Expand Up @@ -1071,7 +1084,27 @@ private void AddSystemsToMap()
Canvas.SetTop(sysRegionText, system.LayoutY + regionMarkerOffset);
Canvas.SetZIndex(sysRegionText, SYSTEM_Z_INDEX);



/*
Polygon poly = new Polygon();
foreach (Point p in system.CellPoints)
{
poly.Points.Add(p);
}
//poly.Fill
poly.Fill = MapBackgroundBrushDarkend;
poly.SnapsToDevicePixels = true;
poly.Stroke = MapBackgroundBrushDarkend;
poly.StrokeThickness = 3;
poly.StrokeDashCap = PenLineCap.Round;
poly.StrokeLineJoin = PenLineJoin.Round;
MainCanvas.Children.Add(poly);
MainCanvas.Children.Add(sysRegionText);
*/
}
}

Expand Down Expand Up @@ -1518,7 +1551,7 @@ public void AddEveTraceFleetsToMap()

public void AddTheraSystemsToMap()
{
Brush TheraBrush = new SolidColorBrush(Colors.YellowGreen);
Brush TheraBrush = new SolidColorBrush(MapConf.ActiveColourScheme.TheraEntranceSystem);

foreach(TheraConnection tc in EM.TheraConnections)
{
Expand Down
1 change: 1 addition & 0 deletions SMT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<Compile Include="EVEData\ESI\StructureIDData.cs" />
<Compile Include="EVEData\ESI\StructureSearch.cs" />
<Compile Include="EVEData\LocalCharacter.cs" />
<Compile Include="EVEData\Structure.cs" />
<Compile Include="StaticJumpOverlay.cs" />
<Compile Include="Utils.cs" />
<Page Include="About.xaml">
Expand Down

0 comments on commit a4abd52

Please sign in to comment.