Skip to content

Commit

Permalink
Merge pull request #262 from DMagic1/dev
Browse files Browse the repository at this point in the history
Version 17.5
  • Loading branch information
DMagic1 authored Mar 10, 2017
2 parents a701529 + 84a6448 commit dfde094
Show file tree
Hide file tree
Showing 56 changed files with 728 additions and 527 deletions.
16 changes: 8 additions & 8 deletions SCANassets/PluginData/Settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ SCAN_Settings_Config
ShowGroundTracks = True
GroundTracksActiveOnly = True
MechJebTarget = False
MechJebTargetLoad = False
OverlayTooltips = True
WindowTooltips = True
LegendTooltips = True
StockToolbar = True
ToolbarMenu = True
StockUIStyle = False
MapGenerationSpeed = 2
UIScale = 1
BiomeLock = True
RequireNarrowBand = True
Expand All @@ -24,8 +27,11 @@ SCAN_Settings_Config
TrueGreyScale = False
ExportCSV = False
BiomeTransparency = 0.400000006
BiomeBorder = True
StockBiomes = False
BigMapBiomeBorder = False
BigMapStockBiomes = True
ZoomMapBiomeBorder = True
SmallMapBiomeBorder = False
SmallMapStockBiomes = True
LowBiomeColor = 0.321568608,0.396078408,0.145098001,1
HighBiomeColor = 0.988235295,0.752941191,0.0235294104,1
SlopeCutoff = 1
Expand All @@ -34,12 +40,6 @@ SCAN_Settings_Config
TopLowSlopeColor = 0.992156923,1,0.321568608,1
TopHighSlopeColor = 0.992156923,0.254902005,0.117647097,1
CheatMapFill = False
CheatStartLoTerrain = False
CheatStartHiTerrain = False
CheatStartBiome = False
CheatStartFuzzyResources = False
CheatStartOre = False
CheatStartAllResources = False
BigMapWidth = 720
ZoomMapWidth = 240
BigMapPosition = 400,-400
Expand Down
10 changes: 6 additions & 4 deletions SCANassets/Resources/SCANlocalization.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ SCAN_Localization
instrumentsToggle = Instruments Readout
settingsToggle = Settings
mainMapColor = Map Color
mainMapTerminator = Map Day/Night Terminator
mainMapType = Terrain/Biome Toggle
mainMapMinimize = Show/Hide Vessel Info
mainMapStatus = Scanner Status Indicators
mainMapPercentage = Active Scanner Completion Percentage
bigMapRefresh = Map Refresh
bigMapColor = Map Color
bigMapTerminator = Map Day/Night Terminator
bigMapGrid = Grid Overlay
bigMapOrbit = Orbit Overlay
bigMapWaypoints = Waypoints
Expand Down Expand Up @@ -103,13 +105,13 @@ SCAN_Localization
waypointCancel = Cancel Waypoint
waypointMechJeb = Set MechJeb Landing Target
waypointNameRefresh = Reset Waypoint
warningDataResetCurrent = Erase all map data for [0]?
warningDataResetAll = Erase map data for all celestial bodies?
warningSCANResourceResetCurrent = Erase SCANsat resource data for [0]?
warningSCANResourceResetAll = Erase SCANsat resource data for all celestial bodies?
warningDataResetCurrent = Erase [0] map for [1]?
warningDataResetAll = Erase [0] for all celestial bodies?
warningStockResourceResetCurrent = Erase stock resource data for [0]?
warningStockResourceResetAll = Erase stock resource data for all celestial bodies?
warningStockResourceResetAll = Erase stock resource data for all celestial bodies?
warningMapFillCurrent = Fill in [0] map for [1]?
warningMapFillAll = Fill in [0] for all celestial bodies?
warningModuleManagerResource = Warning\nModule Manager is required for all SCANsat resource scanning functions.
warningSaveToConfig = Overwrite existing config file on disk?
}
Expand Down
Binary file modified SCANassets/Resources/scan_prefabs.scan
Binary file not shown.
2 changes: 1 addition & 1 deletion SCANassets/SCANsat.version
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"MAJOR":1,
"MINOR":1,
"PATCH":7,
"BUILD":4
"BUILD":5
},
"KSP_VERSION":{
"MAJOR":1,
Expand Down
6 changes: 3 additions & 3 deletions SCANmechjeb/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.7.4.0")]
[assembly: AssemblyFileVersion("1.7.4.0")]
[assembly: AssemblyInformationalVersion ("v17.4")]
[assembly: AssemblyVersion("1.7.5.0")]
[assembly: AssemblyFileVersion("1.7.5.0")]
[assembly: AssemblyInformationalVersion ("v17.5")]

[assembly: KSPAssembly ("SCANmechjeb", 0, 5)]
[assembly: KSPAssemblyDependency ("SCANsat", 1, 7)]
Expand Down
2 changes: 2 additions & 0 deletions SCANsat.Unity/Interfaces/ISCAN_BigMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public interface ISCAN_BigMap

bool ColorToggle { get; set; }

bool TerminatorToggle { get; set; }

bool GridToggle { get; set; }

bool OrbitToggle { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions SCANsat.Unity/Interfaces/ISCAN_MainMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public interface ISCAN_MainMap

bool Color { get; set; }

bool TerminatorToggle { get; set; }

bool MapType { get; set; }

bool Minimized { get; set; }
Expand Down
18 changes: 8 additions & 10 deletions SCANsat.Unity/Interfaces/ISCAN_Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,22 @@ public interface ISCAN_Settings

string DataResetAll { get; }

string SCANResourceResetCurrent { get; }

string SCANResourceResetAll { get; }

string StockResourceResetCurrent { get; }

string StockResourceResetAll { get; }

string WarningMapFillCurrent { get; }

string WarningMapFillAll { get; }

string ModuleManagerWarning { get; }

string SaveToConfig { get; }

string CurrentBody { get; }

string CurrentMapData { get; set; }

int MapGenSpeed { get; set; }

int TimeWarp { get; set; }
Expand Down Expand Up @@ -99,8 +101,6 @@ public interface ISCAN_Settings

bool ExportCSV { get; set; }

bool ShowSCANsatReset { get; }

bool ShowStockReset { get; }

bool ShowMapFill { get; }
Expand All @@ -115,6 +115,8 @@ public interface ISCAN_Settings

IList<string> BackgroundBodies { get; }

IList<string> MapDataTypes { get; }

ISCAN_Color ColorInterface { get; }

void ClampToScreen(RectTransform rect);
Expand All @@ -123,10 +125,6 @@ public interface ISCAN_Settings

void ResetAll();

void ResetSCANResourceCurrent();

void ResetSCANResourceAll();

void ResetStockResourceCurrent();

void ResetStockResourceAll();
Expand Down
2 changes: 2 additions & 0 deletions SCANsat.Unity/Interfaces/ISCAN_ZoomMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public interface ISCAN_ZoomMap

bool ColorToggle { get; set; }

bool TerminatorToggle { get; set; }

bool OrbitToggle { get; set; }

bool IconsToggle { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions SCANsat.Unity/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0c523d04-a52e-48bb-85b6-d75e8b7a63b9")]

[assembly: AssemblyVersion("1.7.4.0")]
[assembly: AssemblyFileVersion("1.7.4.0")]
[assembly: AssemblyVersion("1.7.5.0")]
[assembly: AssemblyFileVersion("1.7.5.0")]
8 changes: 7 additions & 1 deletion SCANsat.Unity/SCAN_Toggle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class SCAN_Toggle : Toggle, IPointerEnterHandler, IPointerExitHandler, IP
{
private Sprite normalImage;
public Sprite HoverCheckmark;
private bool inToggle;

protected override void Awake()
{
Expand All @@ -38,13 +39,16 @@ protected override void Awake()
if (!isOn)
return;

((Image)graphic).sprite = HoverCheckmark;
if (inToggle)
((Image)graphic).sprite = HoverCheckmark;
}

new public void OnPointerEnter(PointerEventData eventData)
{
base.OnPointerEnter(eventData);

inToggle = true;

if (!isOn)
return;

Expand All @@ -55,6 +59,8 @@ protected override void Awake()
{
base.OnPointerExit(eventData);

inToggle = false;

if (!isOn)
return;

Expand Down
24 changes: 22 additions & 2 deletions SCANsat.Unity/Unity/SCAN_BigMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public class SCAN_BigMap : CanvasFader, IDragHandler, IBeginDragHandler, IEndDra
[SerializeField]
private SCAN_Toggle m_ColorToggle = null;
[SerializeField]
private SCAN_Toggle m_TerminatorToggle = null;
[SerializeField]
private SCAN_Toggle m_GridToggle = null;
[SerializeField]
private SCAN_Toggle m_OrbitToggle = null;
Expand Down Expand Up @@ -241,6 +243,9 @@ public void setMap(ISCAN_BigMap map)
if (m_ColorToggle != null)
m_ColorToggle.isOn = map.ColorToggle;

if (m_TerminatorToggle != null)
m_TerminatorToggle.isOn = map.TerminatorToggle;

if (m_GridToggle != null)
m_GridToggle.isOn = map.GridToggle;

Expand Down Expand Up @@ -1090,13 +1095,18 @@ private void SetResource(string selection)

bigInterface.CurrentResource = selection;

loaded = false;
if (m_ResourcesToggle != null)
m_ResourcesToggle.isOn = true;
loaded = true;

bigInterface.ResourceToggle = true;

dropDown.FadeOut();
dropDown = null;

if (m_DropDownToggles != null)
m_DropDownToggles.SetAllTogglesOff();

RefreshIcons();
}

public void ToggleCelestialBodySelection(bool isOn)
Expand Down Expand Up @@ -1165,6 +1175,16 @@ public void ToggleColor(bool isOn)
SetLegend(bigInterface.LegendToggle);
}

public void ToggleTerminator(bool isOn)
{
if (!loaded || bigInterface == null)
return;

bigInterface.TerminatorToggle = isOn;

RefreshIcons();
}

public void ToggleGrid(bool isOn)
{
if (!loaded || bigInterface == null)
Expand Down
44 changes: 29 additions & 15 deletions SCANsat.Unity/Unity/SCAN_ColorAltimetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,22 +198,36 @@ public override void OnPointerDown(PointerEventData eventData)
if (SCAN_Settings.Instance == null)
return;

if (SCAN_Settings.Instance.DropDown == null)
return;

RectTransform r = SCAN_Settings.Instance.DropDown.GetComponent<RectTransform>();

if (r == null)
return;

if (RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera))
return;

SCAN_Settings.Instance.DropDown.FadeOut();
SCAN_Settings.Instance.DropDown = null;
if (SCAN_Settings.Instance.DropDown != null)
{
RectTransform r = SCAN_Settings.Instance.DropDown.GetComponent<RectTransform>();

if (r != null)
{
if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera))
{
SCAN_Settings.Instance.DropDown.FadeOut();
SCAN_Settings.Instance.DropDown = null;

if (m_DropDownToggles != null)
m_DropDownToggles.SetAllTogglesOff();
}
}
}

if (m_DropDownToggles != null)
m_DropDownToggles.SetAllTogglesOff();
if (SCAN_Settings.Instance.WarningPopup != null)
{
RectTransform r = SCAN_Settings.Instance.WarningPopup.GetComponent<RectTransform>();

if (r != null)
{
if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera))
{
SCAN_Settings.Instance.WarningPopup.FadeOut();
SCAN_Settings.Instance.WarningPopup = null;
}
}
}
}

public void PaletteStyleDropDown(bool isOn)
Expand Down
44 changes: 29 additions & 15 deletions SCANsat.Unity/Unity/SCAN_ColorResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,36 @@ public override void OnPointerDown(PointerEventData eventData)
if (SCAN_Settings.Instance == null)
return;

if (SCAN_Settings.Instance.DropDown == null)
return;

RectTransform r = SCAN_Settings.Instance.DropDown.GetComponent<RectTransform>();

if (r == null)
return;

if (RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera))
return;

SCAN_Settings.Instance.DropDown.FadeOut();
SCAN_Settings.Instance.DropDown = null;
if (SCAN_Settings.Instance.DropDown != null)
{
RectTransform r = SCAN_Settings.Instance.DropDown.GetComponent<RectTransform>();

if (r != null)
{
if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera))
{
SCAN_Settings.Instance.DropDown.FadeOut();
SCAN_Settings.Instance.DropDown = null;

if (m_DropDownToggles != null)
m_DropDownToggles.SetAllTogglesOff();
}
}
}

if (m_DropDownToggles != null)
m_DropDownToggles.SetAllTogglesOff();
if (SCAN_Settings.Instance.WarningPopup != null)
{
RectTransform r = SCAN_Settings.Instance.WarningPopup.GetComponent<RectTransform>();

if (r != null)
{
if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera))
{
SCAN_Settings.Instance.WarningPopup.FadeOut();
SCAN_Settings.Instance.WarningPopup = null;
}
}
}
}

public void PlanetDropDown(bool isOn)
Expand Down
Loading

0 comments on commit dfde094

Please sign in to comment.