Skip to content

Commit

Permalink
Tooltip strings
Browse files Browse the repository at this point in the history
  • Loading branch information
DMagic1 committed Feb 1, 2017
1 parent 33090d4 commit b662f5c
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 24 deletions.
72 changes: 50 additions & 22 deletions SCANassets/Resources/SCANlocalization.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,37 @@ SCAN_Localization
settingsHelpAnomalies = Select the marker used to display\nanomalies on the map.
settingsHelpScanningToggle = Toggle all SCANsat scanning.
settingsHelpBackground = Toggle background scanning on\nselected celestial bodies.
settingsHelpTimeWarp = Adjust the scanning frequency during TimeWarp.\nHigher settings result in fewer gaps in the maps but may have a performance impact at high TimeWarp.
settingsHelpTimeWarp = Adjust the scanning frequency during TimeWarp.\nHigher settings result in fewer gaps in the maps\nbut may have a performance impact at high TimeWarp.
settingsHelpGroundTracks = Display a visible indicator of\nscanning activity in map mode.
settingsHelpGroundTracksActive = The ground track indicator can be limited to only be displayed for the active vessel.
settingsHelpOverlayTooltips = Displays tooltips for the current mouse position when a planetary overlay map is activated. These tooltips include The cursor coordinates, terrain height, slope, biome name, and resource abundance, depending on scanning coverage.
settingsHelpWindowTooltips = Display tooltips on some map window buttons. These are primarily used to identify icon buttons.
settingsHelpStockToolbar = Use the stock toolbar.\nOnly one stock button is available. Can be used concurrently with the Blizzy78 Toolbar.
settingsHelpGroundTracksActive = The ground track indicator can be limited\nto only be displayed for the active vessel.
settingsHelpStockUIStyle = Switch between stock KSP-style UI elements and Unity-style elements.
settingsHelpOverlayTooltips = Displays tooltips for the current mouse position when a planetary overlay map is activated.\nThese tooltips include The cursor coordinates, terrain height, slope, biome name,\nand resource abundance, depending on scanning coverage.
settingsHelpWindowTooltips = Display tooltips on some map window buttons.\nThese are primarily used to identify icon buttons.
settingsHelpStockToolbar = Use the stock toolbar.\nCan be used concurrently with the Blizzy78 Toolbar.
settingsHelpToolbarMenu = Use a pop-out menu for the stock toolbar to show all available windows.
settingsHelpMechJeb = The SCANsat zoom map target selection mode can be used to select a MechJeb landing site.
settingsHelpResetWindows = Reset all window positions and scale. Use this in case a window has been dragged completely off screen or if any windows are not visible.
settingsHelpResetWindows = Reset all window positions and scale.\nUse this in case a window has been dragged completely\noff screen or if any windows are not visible.
settingsHelpResetPlanetData = Resets all SCANsat data for the current celestial body.\nA confirmation window will open before activating.\nCannot be reversed.
settingsHelpResetAllData = Resets all SCANsat data for all celestial bodies. \nA confirmation window will open before activating.\nCannot be reversed.
settingsHelpVesselsSensorsPasses = Information about the currently active SCANsat sensors. Vessels indicates the number of vessels with active sensors. Sensors indicates the total number of sensors; instruments with multiple sensor types count each individual sensor. Passes indicates the number of sensor updates performed per second.\nThis value is affected by the\nTimeWarp Resolution setting.
settingsHelpGreyScale = Use a true grey-scale color spectrum for black-and-white SCANsat maps. Pixels on the altitude map will interpolate between black and white; the min and max terrain heights for each celestial body\ndefine the limits.
settingsHelpExportCSV = Export a .csv file along with map texture when using the Export button on the big map. The file contains coordinates and the terrain height for each pixel. Pixels are labeled from left to right\nand from top to bottom.
settingsHelpSetMapWidth = Enter an exact value for the SCANsat big map texture width. Values are limited to 550 - 8192 pixels wide. Press the Set button to apply the value.
settingsHelpWindowScale = Adjust all SCANsat window scales; buttons adjust scale in increments of 5%.
settingsHelpResetAllData = Resets all SCANsat data for all celestial bodies.\nA confirmation window will open before activating.\nCannot be reversed.
settingsHelpVesselsSensorsPasses = Information about the currently active SCANsat sensors.\nVessels indicates the number of vessels with active sensors.\nSensors indicates the total number of sensors;\ninstruments with multiple sensor types count each individual sensor.\nPasses indicates the number of sensor updates performed per second.\nThis value is affected by the TimeWarp Resolution setting.
settingsHelpGreyScale = Use a true grey-scale color spectrum for black-and-white SCANsat maps.\nPixels on the altitude map will interpolate between black and white;\nthe min and max terrain heights for each celestial body define the limits.
settingsHelpExportCSV = Export a .csv file along with map texture when using the Export button on the big map.\nThe file contains coordinates and the terrain height for each pixel.\nPixels are labeled from left to right and from top to bottom.
settingsHelpSetMapWidth = Enter an exact value for the SCANsat big map texture width.\nValues are limited to 550 - 8192 pixels wide.\nPress the Set button to apply the value.
settingsHelpWindowScale = Adjust all SCANsat window scales.
settingsHelpFillPlanet = Fill in all SCANsat data for the current celestial body.
settingsHelpFillAll = Fill in all SCANsat data for all celestial bodies.
resourceSettingsHelpOverlayWindow = Open the planetary overlay map control window.
resourceSettingsHelpBiomeLock = Circumvents the requirement for stock surface biome scans. SCANsat displays will show the full accuracy for resource abundance with or without any surface biome scans.
resourceSettingsHelpInstant = By default, the stock M700 resource scanner's orbital survey will fill in all SCANsat resource maps. This can be disabled, requiring standard SCANsat methods for all resource scanning. Disabled automatically when stock resource scanning is disabled.
resourceSettingsHelpNarrowBand = Numerous SCANsat functions require a Narrow-Band resource scanner on-board the current vessel or in orbit of a celestial body for fully accurate resource abundance data.\nDisable this to circumvent these restrictions.
resourceSettingsHelpDisableStock = Disables all stock resource scanning functions. SCANsat scanning methods will be required for all resource data. Replaces several stock resource functions with SCANsat tools. These include The right-click readouts, the high resolution narrow-band scanner map, and the planetary overlay maps.
resourceSettingsHelpBiomeLock = Circumvents the requirement for stock surface biome scans.\nSCANsat displays will show the full accuracy for resource\nabundance with or without any surface biome scans.
resourceSettingsHelpInstant = By default, the stock M700 resource scanner's orbital survey will fill in all SCANsat resource maps.\nThis can be disabled, requiring standard SCANsat methods for all resource scanning.\nDisabled automatically when stock resource scanning is disabled.
resourceSettingsHelpNarrowBand = Numerous SCANsat functions require a Narrow-Band resource scanner on-board\nthe current vessel or in orbit of a celestial body for fully accurate resource abundance data.\nDisable this to circumvent these restrictions.
resourceSettingsHelpDisableStock = Disables all stock resource scanning functions.\nSCANsat scanning methods will be required for all resource data.\nReplaces several stock resource functions with SCANsat tools.\nThese include The right-click readouts, and the planetary overlay maps.
resourceSettingsHelpResetSCANsatResource = Resets all SCANsat resource data for the current celestial body. Other SCANsat data is not affected.\nA confirmation window will open before activating.\nCannot be reversed.
resourceSettingsHelpResetStockResource = Resets the stock resource scanning coverage for the current celestial body. A reload or scene change may be required for all changes to take effect.\nA confirmation window will open before activating.\nCannot be reversed.
resourceSettingsHelpOverlayInterpolation = Change the number of resource abundance measurements used in constructing the planetary overlay and big map resource overlay. Decrease the value to increase the accuracy of the map. Lower values will result in slower map generation.
resourceSettingsHelpOverlayHeight = Change the texture size (map width is 2XHeight) used in constructing the planetary overlay and big map resource overlay. Increase the value to increase the quality and accuracy of the map. Higher values will result in slower map generation.
resourceSettingsHelpOverlayBiomeHeight = Change the texture size (map width is 2XHeight) used in constructing the planetary overlay biome map. Increase the value to increase the quality and accuracy of the map. Higher values will result in slower map generation.
resourceSettingsHelpOverlayTransparency = Create a grey background for planetary overlay resource maps. Used to make clear which sections of the celestial body have been\nscanned but contain no resources.
resourceSettingsHelpScanThreshold = A threshold level used to apply the stock resource scan to a celestial body after scanning with SCANsat sensors. This is useful when contracts or other addons require that a stock resource scan be performed. Set a value from 0-100 in the text box and click on the Set button. All celestial bodies will be checked immediately; celestial bodies will also be checked upon loading or a scene change. A reload may be required for the changes to take effect.
resourceSettingsHelpResetStockResource = Resets the stock resource scanning coverage for the current celestial body.\nA reload or scene change may be required for all changes to take effect.\nA confirmation window will open before activating.\nCannot be reversed.
resourceSettingsHelpOverlayInterpolation = Change the number of resource abundance measurements used in constructing\nthe planetary overlay and big map resource overlay.\nDecrease the value to increase the accuracy of the map.\nLower values will result in slower map generation.
resourceSettingsHelpOverlayHeight = Change the texture size (map width is 2XHeight) used in constructing\nthe planetary overlay and big map resource overlay.\nIncrease the value to increase the quality and accuracy of the map.\nHigher values will result in slower map generation.
resourceSettingsHelpOverlayBiomeHeight = Change the texture size (map width is 2XHeight) used in constructing\nthe planetary overlay biome map. Increase the value to increase\nthe quality and accuracy of the map.\nHigher values will result in slower map generation.
resourceSettingsHelpOverlayTransparency = Create a grey background for planetary overlay resource maps.\nUsed to make clear which sections of the celestial body\nhave been scanned but contain no resources.
resourceSettingsHelpScanThreshold = A threshold level used to apply the stock resource scan to a celestial body after scanning with SCANsat sensors.\nThis is useful when contracts or other addons require that a stock resource scan be performed.\nSet a value from 0-100 in the text box and click on the Set button.\nAll celestial bodies will be checked immediately; celestial bodies will also be checked upon loading or a scene change.\nA reload may be required for the changes to take effect.
resourceSettingsModuleManagerWarning = Warning:\nModule Manager is required for all SCANsat resource scanning
colorTerrainHelpMin = Defines the low altitude cutoff for the terrain color palette. Anything below this altitude will be shown with the lowest color.
colorTerrainHelpMax = Defines the high altitude cutoff for the terrain color palette. Anything above this altitude will be shown with the highest color.
Expand All @@ -60,6 +64,30 @@ SCAN_Localization
colorResourceHelpDefaultAll = Reverts to the default values for the selected resource for all celestial bodies.
colorHelpSaveToConfig = Save all color configuration values to the config file found in your SCANsat/Resources folder. These values serve as the defaults for new saves and for all Revert To Default buttons. Values do not need to be saved to the config file to be applied for this save file.
colorSlopeHelpCutoff = Adjust the cutoff level between the two selected slope color pairs.
mainMapToggle = Main Map
bigMapToggle = Big Map
zoomMapToggle = Zoom Map
overlayToggle = Planetary Overlay
instrumentsToggle = Instruments Readout
settingsToggle = Settings
mainMapColor = Map Color
mainMapType = Terrain/Biome Toggle
mainMapMinimize = Show/Hide Vessel Info
mainMapStatus = Scanner Status Indicators
mainMapPercentage = Active Scanner Completion Percentage
bigMapRefresh = Map Refresh
bigMapColor = Map Color
bigMapGrid = Grid Overlay
bigMapOrbit = Orbit Overlay
bigMapWaypoints = Waypoints
bigMapAnomaly = Anomalies
bigMapFlags = Flags
bigMapLegend = Map Legend
bigMapResource = Resource Overlay
bigMapExport = Export Map To Disk
overlayRefresh = Map Refresh
insNextResource = Next Resource
insPreviousResource = Previous Resource
}
}
}
89 changes: 87 additions & 2 deletions SCANsat/SCAN_UI/UI_Framework/SCANlanguagePack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ public class SCANlanguagePack : SCAN_ConfigNodeStorage
[Persistent]
public string settingsHelpGroundTracksActive = "The ground track indicator can be limited to only be displayed for the active vessel.";
[Persistent]
public string settingsHelpStockUIStyle = "Switch between stock KSP-style UI elements and Unity-style elements.";
[Persistent]
public string settingsHelpOverlayTooltips = "Displays tooltips for the current mouse position when a planetary overlay map is activated. These tooltips include The cursor coordinates, terrain height, slope, biome name, and resource abundance, depending on scanning coverage.";
[Persistent]
public string settingsHelpWindowTooltips = "Display tooltips on some map window buttons. These are primarily used to identify icon buttons.";
[Persistent]
public string settingsHelpStockToolbar = "Use the stock toolbar.\nOnly one stock button is available. Can be used concurrently with the Blizzy78 Toolbar.";
[Persistent]
public string settingsHelpToolbarMenu = "Use a pop-out menu for the stock toolbar to show all available windows.";
[Persistent]
public string settingsHelpMechJeb = "The SCANsat zoom map target selection mode can be used to select a MechJeb landing site.";
[Persistent]
public string settingsHelpResetWindows = "Reset all window positions and scale. Use this in case a window has been dragged completely off screen or if any windows are not visible.";
public string settingsHelpResetWindows = "Reset all window positions. Use this in case a window has been dragged completely off screen or if any windows are not visible.";
[Persistent]
public string settingsHelpResetPlanetData = "Resets all SCANsat data for the current celestial body.\nA confirmation window will open before activating.\nCannot be reversed.";
[Persistent]
Expand All @@ -50,7 +54,11 @@ public class SCANlanguagePack : SCAN_ConfigNodeStorage
[Persistent]
public string settingsHelpSetMapWidth = "Enter an exact value for the SCANsat big map texture width. Values are limited to 550 - 8192 pixels wide. Press the Set button to apply the value.";
[Persistent]
public string settingsHelpWindowScale = "Adjust all SCANsat window scales; buttons adjust scale in increments of 5%.";
public string settingsHelpWindowScale = "Adjust SCANsat window UI scale; scale is also affected by the stock master UI scale controls.";
[Persistent]
public string settingsHelpFillPlanet = "Fill in all SCANsat data for the current celestial body.";
[Persistent]
public string settingsHelpFillAll = "Fill in all SCANsat data for all celestial bodies.";

//Resource Settings Window Help Tooltips
[Persistent]
Expand Down Expand Up @@ -128,6 +136,66 @@ public class SCANlanguagePack : SCAN_ConfigNodeStorage
[Persistent]
public string colorSlopeHelpCutoff = "Adjust the cutoff level between the two selected slope color pairs.";

//Window toggle buttons
[Persistent]
public string mainMapToggle = "Main Map";
[Persistent]
public string bigMapToggle = "Big Map";
[Persistent]
public string zoomMapToggle = "Zoom Map";
[Persistent]
public string overlayToggle = "Planetary Overlay";
[Persistent]
public string instrumentsToggle = "Instruments Readout";
[Persistent]
public string settingsToggle = "Settings";

//Main Map tooltips
[Persistent]
public string mainMapColor = "Map Color";
[Persistent]
public string mainMapType = "Terrain/Biome Toggle";
[Persistent]
public string mainMapMinimize = "Show/Hide Vessel Info";
[Persistent]
public string mainMapStatus = "Scanner Status Indicators";
[Persistent]
public string mainMapPercentage = "Active Scanner Completion Percentage";

//Big Map tooltips
[Persistent]
public string bigMapRefresh = "Map Refresh";
[Persistent]
public string bigMapColor = "Map Color";
[Persistent]
public string bigMapGrid = "Grid Overlay";
[Persistent]
public string bigMapOrbit = "Orbit Overlay";
[Persistent]
public string bigMapWaypoints = "Waypoints";
[Persistent]
public string bigMapAnomaly = "Anomalies";
[Persistent]
public string bigMapFlags = "Flags";
[Persistent]
public string bigMapLegend = "Map Legend";
[Persistent]
public string bigMapResource = "Resource Overlay";
[Persistent]
public string bigMapExport = "Export Map To Disk";

//Overlay tooltips
[Persistent]
public string overlayRefresh = "Map Refresh";

//Instruments tooltips
[Persistent]
public string insNextResource = "Next Resource";
[Persistent]
public string insPreviousResource = "Previous Resource";



public override void OnDecodeFromConfigNode()
{
Regex openBracket = new Regex(@"\[(?=\d+:?\w?\d?\])");
Expand Down Expand Up @@ -172,5 +240,22 @@ public override void OnEncodeToConfigNode()
}
}

public string GetStringWithName(string title)
{
var stringFields = this.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public).Where(a => a.FieldType == typeof(string)).ToList();

for (int i = stringFields.Count - 1; i >= 0; i--)
{
FieldInfo f = stringFields[i];

if (f.Name != title)
continue;

return (string)f.GetValue(this);
}

return "";
}

}
}

0 comments on commit b662f5c

Please sign in to comment.