Kerbal Space Program
1.12.4
|
Public Member Functions | |
virtual bool | AutoGenerateMode () |
Whether the mode should be caught in the assembly pass, or if we're doing something else with it. More... | |
virtual void | CustomPass (Texture2D tex) |
Custom pass - runs last and allows any change to the texture. No need to call Apply on the texture. More... | |
virtual Color | GetBackgroundColor (int x, int y) |
Return the background color at a specific point on the texture. More... | |
virtual Color | GetCoordinateColor (Vessel vessel, double latitude, double longitude) |
Return the color displayed for the coordinate pass. More... | |
virtual string | GetErrorState () |
Gets whether or not there is an error with this mode, and a description of said error. More... | |
virtual string | GetModeCaption () |
Gets a caption for the mode button, space for two characters only. More... | |
virtual Color | GetModeColorTint () |
Gets the color you want to tint the mode button. More... | |
ColorBlock | GetModeColorTintBlock () |
Necessary to colorize the button and have it highlight properly. More... | |
virtual void | GetTerrainContourColors (Vessel vessel, out Color lowColor, out Color highColor) |
Return the color used when contouring the lowest terrain. More... | |
void | Init () |
Initializes stuff the base class needs, then initializes stuff any derived classes need. More... | |
virtual void | InterpolateContourTexture (Texture2D tex) |
Interpolate after the terrain contours if they are enabled. Does not happen if they are disabled. More... | |
virtual void | InterpolateMainTexture (Texture2D tex) |
Interpolate after the main texture is generated, whether or not the coordinate pass is enabled. More... | |
virtual bool | isModeActive (Vessel vessel) |
Called on KerbNet window opening to check if this mode should be added to the currently available modes. More... | |
virtual string | LocalCoordinateInfo (Vessel vessel, double centerLatitude, double centerLongitude, double waypointLatitude, double waypointLongitude, bool waypointInSpace) |
The string displayed for the info text. More... | |
virtual void | OnActivated () |
Called when a mode is brought up within KerbNet, either by opening the dialog or switching modes. More... | |
virtual void | OnDeactivated () |
Called when the mode is switched away from a mode, or KerbNet is closed. More... | |
abstract void | OnInit () |
Called to initialize the class. Should be used to set buttonSprite (20x20 Sprite). More... | |
virtual void | OnPrecache (Vessel vessel) |
Runs before any passes, lets us precache things that do not need to be calculated every single pixel. More... | |
void | Precache (Vessel vessel) |
Precaches stuff the base class needs, then precaches stuff any derived classes need. More... | |
Public Attributes | |
Sprite | buttonSprite |
The displayed button sprite. More... | |
UnityAction | customButtonCallback = null |
If non-null, creates a custom button on the dialog that, when clicked, fires the callback. More... | |
string | customButtonCaption = "Custom" |
If using the custom button, this allows you to customize its caption. More... | |
string | customButtonTooltip = string.Empty |
If using the custom button, this allows you to customize its tooltip. More... | |
string | displayName = "ModeName" |
The displayed - Localized mode name More... | |
bool | doAnomaliesPass = false |
Should anomalies display pass (third) be called . More... | |
bool | doCoordinatePass = false |
Should the coordinate based pass (first) be called in this mode. More... | |
bool | doCustomPass = false |
Should the the custom pass (last) be called. More... | |
bool | doTerrainContourPass = false |
Should the terrain contour pass (second) called. More... | |
string | localCoordinateInfoLabel = "N/A" |
The string displayed as the center coordinate title instead of the default "Biome". More... | |
string | name = "ModeName" |
The internal mode name. More... | |
float | terrainContourThreshold = 1f |
Clamps the ceiling a bit on terrain contours, to brighten the peaks. More... | |
Protected Attributes | |
KSPRandom | backgroundGenerator |
A random generator that is seeded before every pass, used for the background. More... | |
KSPRandom | foregroundGenerator |
A random generator that is seeded before every pass, used for the foreground. More... | |
Properties | |
static ColorHSV | hsv [get] |
General use ColorHSV. More... | |
|
inlinevirtual |
Whether the mode should be caught in the assembly pass, or if we're doing something else with it.
Reimplemented in KerbNet.KerbNetModeResource.
|
inlinevirtual |
Custom pass - runs last and allows any change to the texture. No need to call Apply on the texture.
tex | The texture to do a custom pass on. |
|
inlinevirtual |
Return the background color at a specific point on the texture.
x | The x position the map is considering. |
y | The y position the map is considering. |
|
inlinevirtual |
Return the color displayed for the coordinate pass.
vessel | The vessel to check. |
latitude | The latitude of the coordinate. |
longitude | The longitude of the coordinate. |
Reimplemented in KerbNet.KerbNetModeResource, and KerbNet.KerbNetModeBiome.
|
inlinevirtual |
Gets whether or not there is an error with this mode, and a description of said error.
Reimplemented in KerbNet.KerbNetModeResource.
|
inlinevirtual |
Gets a caption for the mode button, space for two characters only.
Reimplemented in KerbNet.KerbNetModeResource.
|
inlinevirtual |
Gets the color you want to tint the mode button.
Reimplemented in KerbNet.KerbNetModeResource.
|
inline |
Necessary to colorize the button and have it highlight properly.
|
inlinevirtual |
Return the color used when contouring the lowest terrain.
vessel | The vessel to check. |
lowColor | The color at minimum terrain height. |
highColor | The color at maximum terrain height. |
Reimplemented in KerbNet.KerbNetModeTerrain.
|
inline |
Initializes stuff the base class needs, then initializes stuff any derived classes need.
|
inlinevirtual |
Interpolate after the terrain contours if they are enabled. Does not happen if they are disabled.
tex | The texture to interpolate. |
|
inlinevirtual |
Interpolate after the main texture is generated, whether or not the coordinate pass is enabled.
tex | The texture to interpolate. |
|
inlinevirtual |
Called on KerbNet window opening to check if this mode should be added to the currently available modes.
vessel | The vessel to check. |
|
inlinevirtual |
The string displayed for the info text.
vessel | The vessel to check. |
centerLatitude | The latitude of the center. |
centerLongitude | The longitude of the center. |
waypointLatitude | The latitude of the waypoint. |
waypointLongitude | The longitude of the waypoint. |
Reimplemented in KerbNet.KerbNetModeResource, KerbNet.KerbNetModeBiome, and KerbNet.KerbNetModeTerrain.
|
inlinevirtual |
Called when a mode is brought up within KerbNet, either by opening the dialog or switching modes.
Reimplemented in KerbNet.KerbNetModeResource.
|
inlinevirtual |
Called when the mode is switched away from a mode, or KerbNet is closed.
Reimplemented in KerbNet.KerbNetModeResource.
|
pure virtual |
Called to initialize the class. Should be used to set buttonSprite (20x20 Sprite).
Implemented in KerbNet.KerbNetModeResource, KerbNet.KerbNetModeBiome, and KerbNet.KerbNetModeTerrain.
|
inlinevirtual |
Runs before any passes, lets us precache things that do not need to be calculated every single pixel.
vessel | The vessel to check. |
Reimplemented in KerbNet.KerbNetModeResource, and KerbNet.KerbNetModeBiome.
|
inline |
Precaches stuff the base class needs, then precaches stuff any derived classes need.
|
protected |
A random generator that is seeded before every pass, used for the background.
Sprite KerbNet.KerbNetMode.buttonSprite |
The displayed button sprite.
UnityAction KerbNet.KerbNetMode.customButtonCallback = null |
If non-null, creates a custom button on the dialog that, when clicked, fires the callback.
string KerbNet.KerbNetMode.customButtonCaption = "Custom" |
If using the custom button, this allows you to customize its caption.
string KerbNet.KerbNetMode.customButtonTooltip = string.Empty |
If using the custom button, this allows you to customize its tooltip.
string KerbNet.KerbNetMode.displayName = "ModeName" |
The displayed - Localized mode name
bool KerbNet.KerbNetMode.doAnomaliesPass = false |
Should anomalies display pass (third) be called .
bool KerbNet.KerbNetMode.doCoordinatePass = false |
Should the coordinate based pass (first) be called in this mode.
bool KerbNet.KerbNetMode.doCustomPass = false |
Should the the custom pass (last) be called.
bool KerbNet.KerbNetMode.doTerrainContourPass = false |
Should the terrain contour pass (second) called.
|
protected |
A random generator that is seeded before every pass, used for the foreground.
string KerbNet.KerbNetMode.localCoordinateInfoLabel = "N/A" |
The string displayed as the center coordinate title instead of the default "Biome".
string KerbNet.KerbNetMode.name = "ModeName" |
The internal mode name.
float KerbNet.KerbNetMode.terrainContourThreshold = 1f |
Clamps the ceiling a bit on terrain contours, to brighten the peaks.