C# Class TerrainPainter.tp_Editor

Datei anzeigen Open project: Stumpstump/RoverGame

Public Methods

Method Description
ButtonDoAllStyle ( ) : GUIStyle
DrawAlphaSelector ( TerrainPainter.TerrainPainter tp, Color color ) : void
DrawNoiseEditor ( TerrainPainter.TerrainPainter tp, int resolution ) : void
DrawNone ( ) : void

No tool selected

DrawSwitch ( bool value, string left_false, string right_true ) : bool

Draw brush settings

DrawTitleLabel ( string msg ) : void
DrawTooltip ( int startIndex, string title ) : void
DrawTooltip ( string title ) : void
ToolbarOptions ( int items ) : UnityEngine.GUILayoutOption[]

Protected Methods

Method Description
DrawBrushSettings ( bool drawStrength = false ) : void
DrawSlopeEditor ( TerrainPainter.TerrainPainter tp, System.Action additional ) : void
GetAlpha ( Point pos, Point target, Texture2D tex ) : float
GetAlphaRaw ( Vector2 pos, Vector2 target, Texture2D tex ) : float
GetBaseData ( Point current, float otherResolution, float &height, float &angle ) : void
GetNoiseValue ( Point current, float otherResolution ) : float

Private Methods

Method Description
CurrentRect ( ) : Rect

Get current rect

CurrentRect ( float height ) : Rect

Get current rect

CurrentRect ( float width, float height ) : Rect

Get current rect

DrawHelpBox ( string title, string msg ) : void

Draw help box

FlexibleSpace ( int amount = 1 ) : void

Add EditorGUILayout FlexibleSpace

IconContent ( string file, string tooltip = default(string) ) : GUIContent

See EditorGUIUtilitiy.IconContent But this is for this DLL

LoadIcon ( string file ) : Texture2D

Load icon

OnInspectorGUI ( TerrainPainter.TerrainPainter c ) : void
OnSceneGUI ( TerrainPainter.TerrainPainter c ) : void
Seperator ( int amount = 1 ) : void

Adds EditorGUILayout seperators

Method Details

ButtonDoAllStyle() public static method

public static ButtonDoAllStyle ( ) : GUIStyle
return UnityEngine.GUIStyle

DrawAlphaSelector() public method

public DrawAlphaSelector ( TerrainPainter.TerrainPainter tp, Color color ) : void
tp TerrainPainter.TerrainPainter
color Color
return void

DrawBrushSettings() protected method

protected DrawBrushSettings ( bool drawStrength = false ) : void
drawStrength bool
return void

DrawNoiseEditor() public static method

public static DrawNoiseEditor ( TerrainPainter.TerrainPainter tp, int resolution ) : void
tp TerrainPainter.TerrainPainter
resolution int
return void

DrawNone() public static method

No tool selected
public static DrawNone ( ) : void
return void

DrawSlopeEditor() protected method

protected DrawSlopeEditor ( TerrainPainter.TerrainPainter tp, System.Action additional ) : void
tp TerrainPainter.TerrainPainter
additional System.Action
return void

DrawSwitch() public static method

Draw brush settings
public static DrawSwitch ( bool value, string left_false, string right_true ) : bool
value bool
left_false string
right_true string
return bool

DrawTitleLabel() public static method

public static DrawTitleLabel ( string msg ) : void
msg string
return void

DrawTooltip() public method

public DrawTooltip ( int startIndex, string title ) : void
startIndex int
title string
return void

DrawTooltip() public method

public DrawTooltip ( string title ) : void
title string
return void

GetAlpha() protected method

protected GetAlpha ( Point pos, Point target, Texture2D tex ) : float
pos Point
target Point
tex UnityEngine.Texture2D
return float

GetAlphaRaw() protected method

protected GetAlphaRaw ( Vector2 pos, Vector2 target, Texture2D tex ) : float
pos Vector2
target Vector2
tex UnityEngine.Texture2D
return float

GetBaseData() protected method

protected GetBaseData ( Point current, float otherResolution, float &height, float &angle ) : void
current Point
otherResolution float
height float
angle float
return void

GetNoiseValue() protected method

protected GetNoiseValue ( Point current, float otherResolution ) : float
current Point
otherResolution float
return float

ToolbarOptions() public static method

public static ToolbarOptions ( int items ) : UnityEngine.GUILayoutOption[]
items int
return UnityEngine.GUILayoutOption[]