an style="color: #000000; ">a As lgMathVector3
b As lgMathVector3
Initialize (a As lgMathVector3, b As lgMathVector3)
Members description:
a As lgMathVector3
the starting position
b As lgMathVector3
the ending position
Initialize (a As lgMathVector3, b As lgMathVector3)
Constructs a new Segment from the two points given.
Encapsulates a 3D sphere with a center and a radius
Events:
None
Members:
center As lgMathVector3
Initialize (Center As lgMathVector3, Radius As Float)
overlaps (sphere As lgMathSphere) As Boolean
radius As Float
Members description:
center As lgMathVector3
the center of the sphere
Initialize (Center As lgMathVector3, Radius As Float)
Constructs a sphere with the given center and radius.
overlaps (sphere As lgMathSphere) As Boolean
sphere: the other sphere
Return type: @return:whether this and the other sphere overlap
radius As Float
the radius of the sphere
Utility and fast math functions.
Thanks to Riven on JavaGaming.org for the basis of sin/cos/atan2/floor/ceil.
Events:
None
Members:
atan2 (y As Float, x As Float) As Float
ceil (x As Float) As Int
ceilPositive (x As Float) As Int
clamp (value As Float, min As Float, max As Float) As Float
clamp2 (value As Int, min As Int, max As Int) As Int
clamp3 (value As Short, min As Short, max As Short) As Short
cos (radians As Float) As Float
cosDeg (degrees As Float) As Float
degRad As Float
degreesToRadians As Float
floor (x As Float) As Int
floorPositive (x As Float) As Int
isPowerOfTwo (value As Int) As Boolean
nanoToSec As Float
nextPowerOfTwo (value As Int) As Int
PI As Float
PI2 As Float
radDeg As Float
radiansToDegrees As Float
randomBoolean As Boolean
RandomBoolean2 (chance As Float) As Boolean
RandomFloat As Float
RandomFloat2 (start As Float, end As Float) As Float
round (x As Float) As Int
roundPositive (x As Float) As Int
sin (radians As Float) As Float
sinDeg (degrees As Float) As Float
Members description:
atan2 (y As Float, x As Float) As Float
Returns atan2 in radians from a lookup table.
ceil (x As Float) As Int
Returns the smallest integer greater than or equal to the specified float. This method will only properly ceil floats from
-(2^14) to (Float.MAX_VALUE - 2^14).
ceilPositive (x As Float) As Int
Returns the smallest integer greater than or equal to the specified float. This method will only properly ceil floats that
are positive.
clamp (value As Float, min As Float, max As Float) As Float
clamp2 (value As Int, min As Int, max As Int) As Int
clamp3 (value As Short, min As Short, max As Short) As Short
cos (radians As Float) As Float
Returns the cosine in radians from a lookup table.
cosDeg (degrees As Float) As Float
Returns the cosine in radians from a lookup table.
degRad As Float
degreesToRadians As Float
floor (x As Float) As Int
Returns the largest integer less than or equal to the specified float. This method will only properly floor floats from
-(2^14) to (Float.MAX_VALUE - 2^14).
floorPositive (x As Float) As Int
Returns the largest integer less than or equal to the specified float. This method will only properly floor floats that are
positive. Note this method simply casts the float to int.
isPowerOfTwo (value As Int) As Boolean
nanoToSec As Float
nextPowerOfTwo (value As Int) As Int
Returns the next power of two. Returns the specified value if the value is already a power of two.
PI As Float
PI2 As Float
radDeg As Float
radiansToDegrees As Float
randomBoolean As Boolean
Returns a random boolean value.
RandomBoolean2 (chance As Float) As Boolean
Returns true if a random value between 0 and 1 is less than the specified value.
RandomFloat As Float
Returns random number between 0.0 (inclusive) and 1.0 (exclusive).
RandomFloat2 (start As Float, end As Float) As Float
Returns a random number between start (inclusive) and end (exclusive).
round (x As Float) As Int
Returns the closest integer to the specified float. This method will only properly round floats from -(2^14) to
(Float.MAX_VALUE - 2^14).
roundPositive (x As Float) As Int
Returns the closest integer to the specified float. This method will only properly round floats that are positive.
sin (radians As Float) As Float
Returns the sine in radians from a lookup table.
sinDeg (degrees As Float) As Float
Returns the sine in radians from a lookup table.
Encapsulates a 2D vector. Allows chaining methods by returning a reference to itself
Events:
None
Members:
add (v As lgMathVector2) As lgMathVector2
add2 (x As Float, y As Float) As lgMathVector2
Angle As Float
clamp (min As Float, max As Float) As lgMathVector2
cpy As lgMathVector2
crs (v As lgMathVector2) As Float
crs2 (x As Float, y As Float) As Float
div (value As Float) As lgMathVector2
div2 (vx As Float, vy As Float) As lgMathVector2
div3 (other As lgMathVector2) As lgMathVector2
dot (v As lgMathVector2) As Float
dst (v As lgMathVector2) As Float
dst_xy (x As Float, y As Float) As Float
dst2 (v As lgMathVector2) As Float
dst2_xy (x As Float, y As Float) As Float
epsilonEquals (obj As lgMathVector2, epsilon As Float) As Boolean
equals (obj As Object) As Boolean
hashCode As Int
len As Float
len2 As Float
lerp (target As lgMathVector2, alpha As Float) As lgMathVector2
limit (limit As Float) As lgMathVector2
mul (mat As lgMathMatrix3) As lgMathVector2
nor As lgMathVector2
rotate (degrees As Float) As lgMathVector2
scl (scalar As Float) As lgMathVector2
set (x As Float, y As Float) As lgMathVector2
set2 (v As lgMathVector2) As lgMathVector2
sub (v As lgMathVector2) As lgMathVector2
toString As String
x As Float
X2 As lgMathVector2
yle="color: #000000; ">y As Float
Y2 As lgMathVector2
Zero As lgMathVector2
Members description:
add (v As lgMathVector2) As lgMathVector2
Adds the given vector to this vector
v: The vector
Return type: @return:This vector for chaining
add2 (x As Float, y As Float) As lgMathVector2
Adds the given components to this vector
x: The x-component
y: The y-component
Return type: @return:This vector for chaining
Angle As Float
Gets or sets the angle in degrees of this vector (point) relative to the x-axis.
Angles are towards the positive y-axis (typically counter-clockwise) and between 0 and 360.
clamp (min As Float, max As Float) As lgMathVector2
Clamps this vector's length to given value
min: Min length
max: Max length
Return type: @return:This vector for chaining
cpy As lgMathVector2
Return type: @return:a copy of this vector
crs (v As lgMathVector2) As Float
Calculates the 2D cross product between this and the given vector.
v: the other vector
Return type: @return:the cross product
crs2 (x As Float, y As Float) As Float
Calculates the 2D cross product between this and the given vector.
x: the x-coordinate of the other vector
y: the y-coordinate of the other vector
Return type: @return:the cross product
div (value As Float) As lgMathVector2
div2 (vx As Float, vy As Float) As lgMathVector2
div3 (other As lgMathVector2) As lgMathVector2
dot (v As lgMathVector2) As Float
Returns the dot product between this vector and the other vector.
dst (v As lgMathVector2) As Float
Returns the distance between this vector and the other vector.
dst_xy (x As Float, y As Float) As Float
Returns the distance between this vector and the other vector.
x: The x-component of the other vector
y: The y-component of the other vector
dst2 (v As lgMathVector2) As Float
Returns the squared distance between this vector and the other vector.
dst2_xy (x As Float, y As Float) As Float
Returns the squared distance between this vector and the other vector.
x: The x-component of the other vector
y: The y-component of the other vector
epsilonEquals (obj As lgMathVector2, epsilon As Float) As Boolean
Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.
obj:
epsilon:
Return type: @return:whether the vectors are the same.
equals (obj As Object) As Boolean
hashCode As Int
len As Float
Return type: @return:The euclidian length
len2 As Float
Return type: @return:The squared euclidian length
lerp (target As lgMathVector2, alpha As Float) As lgMathVector2
Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1]. The result is stored
in this vector.
target: The target vector
alpha: The interpolation coefficient
Return type: @return:This vector for chaining.
limit (limit As Float) As lgMathVector2
Limits this vector's length to given value
limit: Max length
Return type: @return:This vector for chaining
mul (mat As lgMathMatrix3) As lgMathVector2
Left-multiplies this vector by the given matrix
mat: the matrix
Return type: @return:this vector
nor As lgMathVector2
Normalizes this vector. Does nothing if it is zero.
Return type: @return:This vector for chaining
rotate (degrees As Float) As lgMathVector2
Rotates the Vector2 by the given angle, counter-clockwise assuming the y-axis points up.
degrees: the angle in degrees
scl (scalar As Float) As lgMathVector2
Multiplies this vector by a scalar
scalar: The scalar
Return type: @return:This vector for chaining
set (x As Float, y As Float) As lgMathVector2
Sets the components of this vector
x: The x-component
y: The y-component
Return type: @return:This vector for chaining
set2 (v As lgMathVector2) As lgMathVector2
Sets this vector from the given vector
v: The vector
Return type: @return:This vector for chaining
sub (v As lgMathVector2) As lgMathVector2
Subtracts the given vector from this vector.
v: The vector
Return type: @return:This vector for chaining
toString As String
x As Float
the x-component of this vector
X2 As lgMathVector2
y As Float
the y-component of this vector
Y2 As lgMathVector2
Zero As lgMathVector2
Encapsulates a 3D vector. Allows chaining operations by returning a reference to itself in all modification methods.
Events:
None
Members:
add (vector As lgMathVector3) As lgMathVector3
clamp (min As Float, max As Float) As lgMathVector3
cpy As lgMathVector3
crs (vector As lgMathVector3) As lgMathVector3
div (value As Float) As lgMathVector3
dot (x As Float, y As Float, z As Float) As Float
dst (x1 As Float, y1 As Float, z1 As Float, x2 As Float, y2 As Float, z2 As Float) As Float
dst2 (point As lgMathVector3) As Float
epsilonEquals (obj As lgMathVector3, epsilon As Float) As Boolean
equals (obj As Object) As Boolean
hashCode As Int
idt (vector As lgMathVector3) As Boolean
isUnit As Boolean
isZero As Boolean
len (x As Float, y As Float, z As Float) As Float
len2 (x As Float, y As Float, z As Float) As Float
lerp (target As lgMathVector3, alpha As Float) As lgMathVector3
limit (limit As Float) As lgMathVector3
mul (matrix As lgMathMatrix4) As lgMathVector3
nor As lgMathVector3
prj (matrix As lgMathMatrix4) As lgMathVector3
rot (matrix As lgMathMatrix4) As lgMathVector3
rotate (degrees As Float, axisX As Float, axisY As Float, axisZ As Float) As lgMathVector3
scale (scalarX As Float, scalarY As Float, scalarZ As Float) As lgMathVector3
scl (value As Float) As lgMathVector3
set (x As Float, y As Float, z As Float) As lgMathVector3
slerp (target As lgMathVector3, alpha As Float) As lgMathVector3
sub (a_vec As lgMathVector3) As lgMathVector3
toString As String
x As Float
X3 As lgMathVector3
yle="color: #000000; ">y As Float
Y3 As lgMathVector3
z As Float
Z3 As lgMathVector3
Zero As lgMathVector3
Members description:
add (vector As lgMathVector3) As lgMathVector3
Adds the given vector to this vector
vector: The other vector
Return type: @return:This vector for chaining
clamp (min As Float, max As Float) As lgMathVector3
Clamps this vector's length to given value
min: Min length
max: Max length
Return type: @return:This vector for chaining
cpy As lgMathVector3
Return type: @return:a copy of this vector
crs (vector As lgMathVector3) As lgMathVector3
Sets this vector to the cross product between it and the other vector.
vector: The other vector
Return type: @return:This vector for chaining
div (value As Float) As lgMathVector3
value: The value
Return type: @return:This vector for chaining
dot (x As Float, y As Float, z As Float) As Float
Returns the dot product between this and the given vector.
x: The x-component of the other vector
y: The y-component of the other vector
z: The z-component of the other vector
Return type: @return:The dot product
dst (x1 As Float, y1 As Float, z1 As Float, x2 As Float, y2 As Float, z2 As Float) As Float
Return type: @return:The euclidian distance between the two specified vectors
dst2 (point As lgMathVector3) As Float
Returns the squared distance between this point and the given point
point: The other point
Return type: @return:The squared distance
epsilonEquals (obj As lgMathVector3, epsilon As Float) As Boolean
Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.
obj:
epsilon:
Return type: @return:whether the vectors are the same.
equals (obj As Object) As Boolean
hashCode As Int
idt (vector As lgMathVector3) As Boolean
vector: The other vector
Return type: @return:Wether this and the other vector are equal
isUnit As Boolean
Return type: @return:Whether this vector is a unit length vector
isZero As Boolean
Return type: @return:Whether this vector is a zero vector
len (x As Float, y As Float, z As Float) As Float
Return type: @return:The euclidian length
len2 (x As Float, y As Float, z As Float) As Float
Return type: @return:The squared euclidian length
lerp (target As lgMathVector3, alpha As Float) As lgMathVector3
Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1]. The result is stored
in this vector.
target: The target vector
alpha: The interpolation coefficient
Return type: @return:This vector for chaining.
limit (limit As Float) As lgMathVector3
Limits this vector's length to given value
limit: Max length
Return type: @return:This vector for chaining
mul (matrix As lgMathMatrix4) As lgMathVector3
Left-multiplies the vector by the given matrix, assuming the fourth (w) component of the vector is 1.
matrix: The matrix
Return type: @return:This vector for chaining
nor As lgMathVector3
Normalizes this vector to unit length. Does nothing if it is zero.
Return type: @return:This vector for chaining
prj (matrix As lgMathMatrix4) As lgMathVector3
Multiplies this vector by the given matrix dividing by w, assuming the fourth (w) component of the vector is 1.
This is mostly used to project/unproject vectors via a perspective projection matrix.
matrix: The matrix.
Return type: @return:This vector for chaining
rot (matrix As lgMathMatrix4) As lgMathVector3
Multiplies this vector by the first three columns of the matrix, essentially only applying rotation and scaling.
matrix: The matrix
Return type: @return:This vector for chaining
rotate (degrees As Float, axisX As Float, axisY As Float, axisZ As Float) As lgMathVector3
Rotates this vector by the given angle in degrees around the given axis.
degrees: the angle in degrees
axisX: the x-component of the axis
axisY: the y-component of the axis
axisZ: the z-component of the axis
Return type: @return:This vector for chaining
scale (scalarX As Float, scalarY As Float, scalarZ As Float) As lgMathVector3
scl (value As Float) As lgMathVector3
Scales this vector by the given value
value: The value
Return type: @return:This vector for chaining
set (x As Float, y As Float, z As Float) As lgMathVector3
Sets the vector to the given components
x: The x-component
y: The y-component
z: The z-component
Return type: @return:this vector for chaining
slerp (target As lgMathVector3, alpha As Float) As lgMathVector3
Spherically interpolates between this vector and the target vector by alpha which is in the range [0,1]. The result is
stored in this vector.
target: The target vector
alpha: The interpolation coefficient
Return type: @return:This vector for chaining.
sub (a_vec As lgMathVector3) As lgMathVector3
Subtracts the given vector from this vector
a_vec: The other vector
Return type: @return:This vector for chaining
toString As String
x As Float
the x-component of this vector
X3 As lgMathVector3
y As Float
the y-component of this vector
Y3 As lgMathVector3
z As Float
the z-component of this vector
Z3 As lgMathVector3
Zero As lgMathVector3
A simple class keeping track of the mean of a stream of values within a certain window. the WindowedMean will only return a
value in case enough data has been sampled. After enough data has been sampled the oldest sample will be replaced by the newest
in case a new sample is added.
Events:
None
Members:
addValue (value As Float)
clear
hasEnoughData As Boolean
Latest As Float [read only]
Mean As Float [read only]
Oldest As Float [read only]
standardDeviation As Float
Members description:
addValue (value As Float)
adds a new sample to this mean. in case the window is full the oldest value will be replaced by this new value.
value: The value to add
clear
clears this WindowedMean. The class will only return meaningfull values after enough data has been added again.
hasEnoughData As Boolean
Return type: @return:whether the value returned will be meaningfull
Latest As Float [read only]
Mean As Float [read only]
returns the mean of the samples added to this instance. only returns meaningfull results when at least window_size samples
as specified in the constructor have been added.
Oldest As Float [read only]
standardDeviation As Float
Return type: @return:The standard deviation
Events:
None
Members:
AutoBind As Boolean [write only]
Bind
BindS (Shader As lgShaderProgram)
BindS2 (Shader As lgShaderProgram, Locations() As Int)
CalculateBoundingBox As lgMathBoundingBox
CalculateBoundingBox2 (Bbox As lgMathBoundingBox)
CalculateBoundingBox3 (Out As lgMathBoundingBox, Offset As Int, Count As Int) As lgMathBoundingBox
CalculateBoundingBox4 (Out As lgMathBoundingBox, Offset As Int, Count As Int, Transform As lgMathMatrix4) As lgMathBoundingBox
Copy (IsStatic As Boolean) As lgMesh
Copy2 (IsStatic As Boolean, RemoveDuplicates As Boolean, Usage() As Int) As lgMesh
Create (IsStatic As Boolean, Base As lgMesh, Transformations() As lgMathMatrix4) As lgMesh
Create2 (IsStatic As Boolean, Meshes() As lgMesh) As lgMesh
Create3 (IsStatic As Boolean, Meshes() As lgMesh, Transformations() As lgMathMatrix4) As lgMesh
dispose
ExtendBoundingBox (Out As lgMathBoundingBox, Offset As Int, Count As Int) As lgMathBoundingBox
ExtendBoundingBox2 (Out As lgMathBoundingBox, Offset As Int, Count As Int, Transform As lgMathMatrix4) As lgMathBoundingBox
GetIndices (Indices() As Short)
GetIndices2 (Indices() As Short, DestOffset As Int)
GetVertexAttribute (Usage As Int) As lgVertexAttribute
GetVertices (Vertices() As Float)
GetVertices2 (SrcOffset As Int, Vertices() As Float)
GetVertices3 (SrcOffset As Int, Count As Int, Vertices() As Float)
IndicesBuffer As java.nio.ShortBuffer [read only]
Initialize (IsStatic As Boolean, MaxVertices As Int, MaxIndices As Int, Attributes() As lgVertexAttribute)
Initialize2 (IsStatic As Boolean, MaxVertices As Int, MaxIndices As Int, Attributes As lgVertexAttributes)
Initialize3 (StaticVertices As Boolean, StaticIndices As Boolean, MaxVertices As Int, MaxIndices As Int, Attributes As lgVertexAttributes)
InternalObject As com.badlogic.gdx.graphics.Mesh [read only]
InvalidateAllMeshes
ManagedStatus As String [read only]
MaxIndices As Int [read only]
MaxVertices As Int [read only]
NumIndices As Int [read only]
NumVertices As Int [read only]
Render (PrimitiveType As Int)
Render2 (PrimitiveType As Int, Offset As Int, Count As Int)
Render3 (PrimitiveType As Int, Offset As Int, Count As Int, AutoBind As Boolean)
RenderS (Shader As lgShaderProgram, PrimitiveType As Int)
RenderS2 (Shader As lgShaderProgram, PrimitiveType As Int, Offset As Int, Count As Int)
RenderS3 (Shader As lgShaderProgram, PrimitiveType As Int, Offset As Int, Count As Int, AutoBind As Boolean)
Scale (ScaleX As Float, ScaleY As Float, ScaleZ As Float)
SetIndices (Indices() As Short)
SetIndices2 (Indices() As Short, Offset As Int, Count As Int)
SetVertices (Vertices() As Float)
SetVertices2 (Vertices() As Float, Offset As Int, Count As Int)
Transform (Matrix As lgMathMatrix4)
TransformUV (Matrix As lgMathMatrix3)
TransformUV2 (Matrix As lgMathMatrix3, Vertices() As Float, VertexSize As Int, Offset As Int, Start As Int, Count As Int)
Unbind
UnbindS (Shader As lgShaderProgram)
UnbindS2 (Shader As lgShaderProgram, Locations() As Int)
VertexAttributes As lgVertexAttributes [read only]
VertexSize As Int [read only]
VerticesBuffer As java.nio.FloatBuffer [read only]
Members description:
AutoBind As Boolean [write only]
Sets whether to bind the underlying VertexArray or VertexBufferObject automatically on a call to one of the
Render functions or not. Usually you want to use Autobind. Manual binding is an expert functionality. There is a
driver bug on the MSM720xa chips that will fuck up memory if you manipulate the vertices and indices of a Mesh
multiple times while it is bound. Keep this in mind.
Bind
Binds the underlying VertexArray/VertexBufferObject and IndexBufferObject if indices were given.
Use this with OpenGL ES 1.x and when auto-bind is disabled.
BindS (Shader As lgShaderProgram)
Binds the underlying VertexBufferObject and IndexBufferObject if indices where given. Use this with OpenGL ES 2.0 and when auto-bind is disabled.
Shader: the shader (does not bind the shader)
BindS2 (Shader As lgShaderProgram, Locations() As Int)
Binds the underlying VertexBufferObject and IndexBufferObject if indices where given. Use this with OpenGL ES 2.0 and when auto-bind is disabled.
Shader: the shader (does not bind the shader)
Locations: array containing the attribute locations.
CalculateBoundingBox As lgMathBoundingBox
Calculates the BoundingBox of the vertices contained in this mesh. In case no vertices are defined yet a GdxRuntimeException is thrown. This function creates a new BoundingBox instance.
Returns the bounding box.
CalculateBoundingBox2 (Bbox As lgMathBoundingBox)
Calculates the BoundingBox of the vertices contained in this mesh. In case no vertices are defined yet a GdxRuntimeException is thrown.
Bbox: the bounding box to store the result in.
CalculateBoundingBox3 (Out As lgMathBoundingBox, Offset As Int, Count As Int) As lgMathBoundingBox
Calculates the BoundingBox of the specified part.
Out: the bounding box to store the result in.
Offset: the start index of the part.
Count: the amount of indices the part contains.
Returns the value specified by Out.
CalculateBoundingBox4 (Out As lgMathBoundingBox, Offset As Int, Count As Int, Transform As lgMathMatrix4) As lgMathBoundingBox
Calculates the BoundingBox of the specified part.
Out: the bounding box to store the result in.
Offset: the start index of the part.
Count: the amount of indices the part contains.
Returns the value specified by Out.
Copy (IsStatic As Boolean) As lgMesh
Copies this mesh.
IsStatic: whether the new mesh is static or not. Allows for internal optimizations.
Returns the copy of this mesh.
Copy2 (IsStatic As Boolean, RemoveDuplicates As Boolean, Usage() As Int) As lgMesh
Copies this mesh optionally removing duplicate vertices and/or reducing the amount of attributes.
IsStatic: whether the new mesh is static or not. Allows for internal optimizations.
RemoveDuplicates: whether to remove duplicate vertices if possible. Only the vertices specified by usage are checked.
Usage: which attributes (if available) to copy
Returns the copy of this mesh.
Create (IsStatic As Boolean, Base As lgMesh, Transformations() As lgMathMatrix4) As lgMesh
Create a new Mesh that is a combination of transformations of the supplied base mesh.
Not all primitive types, like line strip and triangle strip, can be combined.
IsStatic: whether this mesh is static or not. Allows for internal optimizations.
Transformations: the transformations to apply to the meshes
Returns the combined mesh.
Create2 (IsStatic As Boolean, Meshes() As lgMesh) As lgMesh
Create a new Mesh that is a combination of the supplied meshes. The meshes must have the same VertexAttributes signature.
Not all primitive types, like line strip and triangle strip, can be combined.
IsStatic: whether this mesh is static or not. Allows for internal optimizations.
Meshes: the meshes to combine
Returns the combined mesh.
Create3 (IsStatic As Boolean, Meshes() As lgMesh, Transformations() As lgMathMatrix4) As lgMesh
Create a new Mesh that is a combination of the supplied meshes. The meshes must have the same VertexAttributes signature.
If transformations is supplied, it must have the same length as meshes.
Not all primitive types, like line strip and triangle strip, can be combined.
IsStatic: whether this mesh is static or not. Allows for internal optimizations.
Meshes: the meshes to combine
Transformations: the transformations to apply to the meshes
Returns the combined mesh.
dispose
Frees all resources associated with this mesh
ExtendBoundingBox (Out As lgMathBoundingBox, Offset As Int, Count As Int) As lgMathBoundingBox
Extends the specified BoundingBox with the specified part.
Out: the bounding box to store the result in.
Offset: the start index of the part.
Count: the amount of indices the part contains.
Returns the value specified by Out.
ExtendBoundingBox2 (Out As lgMathBoundingBox, Offset As Int, Count As Int, Transform As lgMathMatrix4) As lgMathBoundingBox
Extends the specified BoundingBox with the specified part.
Out: the bounding box to store the result in.
Offset: the start index of the part.
Count: the amount of indices the part contains.
Returns the value specified by Out.
GetIndices (Indices() As Short)
Copies the indices from the mesh to the short array. The short array must be large enough to hold all the mesh's indices.
Indices: the array to copy the indices to
GetIndices2 (Indices() As Short, DestOffset As Int)
Copies the indices from the mesh to the short array. The short array must be large enough to hold DestOffset + all the mesh's indices.
Indices: the array to copy the indices to
DestOffset: the offset in the indices array to start copying
GetVertexAttribute (Usage As Int) As lgVertexAttribute
Returns the first VertexAttribute having the given usage, or null if no attribute with that usage was found.
GetVertices (Vertices() As Float)
Copies the vertices from the mesh to the float array. The float array must be large enough to hold all the mesh's vertices.
Vertices: the array to copy the vertices to.
GetVertices2 (SrcOffset As Int, Vertices() As Float)
Copies the remaining vertices from the Mesh to the float array. The float array must be large enough to hold the remaining vertices.
SrcOffset: the offset (in number of floats) of the vertices in the mesh to copy.
Vertices: the array to copy the vertices to.
GetVertices3 (SrcOffset As Int, Count As Int, Vertices() As Float)
Copies the specified vertices from the Mesh to the float array. The float array must be large enough to hold count vertices.
SrcOffset: the offset (in number of floats) of the vertices in the mesh to copy.
Count: the amount of floats to copy.
Vertices: the array to copy the vertices to.
IndicesBuffer As java.nio.ShortBuffer [read only]
Returns the backing shortbuffer holding the indices.
Initialize (IsStatic As Boolean, MaxVertices As Int, MaxIndices As Int, Attributes() As lgVertexAttribute)
Creates a new Mesh with the given attributes.
IsStatic: whether this mesh is static or not. Allows for internal optimizations.
MaxVertices: the maximum number of vertices this mesh can hold
MaxIndices: the maximum number of indices this mesh can hold
Attributes: an array of VertexAttribute. Each vertex attribute defines one property of a vertex such as position, normal or texture coordinate
Initialize2 (IsStatic As Boolean, MaxVertices As Int, MaxIndices As Int, Attributes As lgVertexAttributes)
Creates a new Mesh with the given attributes.
IsStatic: whether this mesh is static or not. Allows for internal optimizations.
MaxVertices: the maximum number of vertices this mesh can hold
MaxIndices: the maximum number of indices this mesh can hold
Attributes: the VertexAttributes. Each vertex attribute defines one property of a vertex such as position, normal or texture coordinate
Initialize3 (StaticVertices As Boolean, StaticIndices As Boolean, MaxVertices As Int, MaxIndices As Int, Attributes As lgVertexAttributes)
Creates a new Mesh with the given attributes. Adds extra optimizations for dynamic (frequently modified) meshes.
StaticVertices: whether vertices of this mesh are static or not. Allows for internal optimizations.
StaticIndices: whether indices of this mesh are static or not. Allows for internal optimizations.
MaxVertices: the maximum number of vertices this mesh can hold
MaxIndices: the maximum number of indices this mesh can hold
Attributes: the VertexAttributes. Each vertex attribute defines one property of a vertex such as position, normal or texture coordinate
InternalObject As com.badlogic.gdx.graphics.Mesh [read only]
InvalidateAllMeshes
Invalidates all meshes so the next time they are rendered new VBO handles are generated.
ManagedStatus As String [read only]
MaxIndices As Int [read only]
Returns the maximum number of indices this mesh can hold.
MaxVertices As Int [read only]
Returns the maximum number of vertices this mesh can hold.
NumIndices As Int [read only]
Returns the number of defined indices.
NumVertices As Int [read only]
Returns the number of defined vertices.
Render (PrimitiveType As Int)
Renders the mesh using the given primitive type. If indices are set for this mesh then NumIndices / #vertices-per-
primitive primitives are rendered. If no indices are set then NumVertices / #vertices-per-primitive primitives are
rendered.
This function is intended for use with OpenGL ES 1.x and will throw an IllegalStateException when OpenGL ES 2.0 is used.
PrimitiveType: the GL primitive type
Render2 (PrimitiveType As Int, Offset As Int, Count As Int)
Renders the mesh using the given primitive type. Offset specifies the offset into vertex buffer and is ignored for the index
buffer. Count specifies the number of vertices or indices to use thus count / #vertices-per-primitive primitives are
rendered.
This function is intended for use with OpenGL ES 1.x and will throw an IllegalStateException when OpenGL ES 2.0 is used.
PrimitiveType: the GL primitive type
Offset: the offset into the vertex buffer, ignored for indexed rendering
Count: number of vertices or indices to use
Render3 (PrimitiveType As Int, Offset As Int, Count As Int, AutoBind As Boolean)
Renders the mesh using the given primitive type. Offset specifies the offset into vertex buffer and is ignored for the index
buffer. Count specifies the number of vertices or indices to use thus count / #vertices-per-primitive primitives are
rendered.
This function is intended for use with OpenGL ES 1.x and will throw an IllegalStateException when OpenGL ES 2.0 is used.
PrimitiveType: the GL primitive type
Offset: the offset into the vertex buffer, ignored for indexed rendering
Count: number of vertices or indices to use
AutoBind: overrides the AutoBind member of this Mesh
RenderS (Shader As lgShaderProgram, PrimitiveType As Int)
Renders the mesh using the given primitive type. If indices are set for this mesh then NumIndices / #vertices-per-
primitive primitives are rendered. If no indices are set then NumVertices / #vertices-per-primitive primitives are
rendered.
This method will automatically bind each vertex attribute as specified at construction time via VertexAttributes to
the respective shader attributes. The binding is based on the alias defined for each VertexAttribute.
This method must only be called after the lgShaderProgram.Begin method has been called!
This method is intended for use with OpenGL ES 2.0 and will throw an IllegalStateException when OpenGL ES 1.x is used.
Shader: the shader to be used
PrimitiveType: the GL primitive type
RenderS2 (Shader As lgShaderProgram, PrimitiveType As Int, Offset As Int, Count As Int)
Renders the mesh using the given primitive type. Offset specifies the offset into either the vertex buffer or the index
buffer depending on whether indices are defined. Count specifies the number of vertices or indices to use thus count /
#vertices-per-primitive primitives are rendered.
This method will automatically bind each vertex attribute as specified at construction time via VertexAttributes to
the respective shader attributes. The binding is based on the alias defined for each VertexAttribute.
This method must only be called after the lgShaderProgram.Begin method has been called!
This method is intended for use with OpenGL ES 2.0 and will throw an IllegalStateException when OpenGL ES 1.x is used.
Shader: the shader to be used
PrimitiveType: the GL primitive type
Offset: the offset into the vertex or index buffer
Count: number of vertices or indices to use
RenderS3 (Shader As lgShaderProgram, PrimitiveType As Int, Offset As Int, Count As Int, AutoBind As Boolean)
Renders the mesh using the given primitive type. Offset specifies the offset into either the vertex buffer or the index
buffer depending on whether indices are defined. Count specifies the number of vertices or indices to use thus count /
#vertices-per-primitive primitives are rendered.
This method will automatically bind each vertex attribute as specified at construction time via VertexAttributes to
the respective shader attributes. The binding is based on the alias defined for each VertexAttribute.
This method must only be called after the lgShaderProgram.Begin method has been called!
This method is intended for use with OpenGL ES 2.0 and will throw an IllegalStateException when OpenGL ES 1.x is used.
Shader: the shader to be used
PrimitiveType: the GL primitive type
Offset: the offset into the vertex or index buffer
Count: number of vertices or indices to use
AutoBind: overrides the AutoBind member of this Mesh
Scale (ScaleX As Float, ScaleY As Float, ScaleZ As Float)
Scales the positions in the mesh. Normals will be kept as is. This is a potentially slow operation, use with care.
It will also create a temporary float() which will be garbage collected.
ScaleX: scale on x
ScaleY: scale on y
ScaleZ: scale on z
SetIndices (Indices() As Short)
Sets the indices of this mesh.
SetIndices2 (Indices() As Short, Offset As Int, Count As Int)
Sets the indices of this mesh.
Indices: the indices
Offset: the offset into the indices array
Count: the number of indices to copy
SetVertices (Vertices() As Float)
Sets the vertices of this mesh. The attributes are assumed to be given in float format.
SetVertices2 (Vertices() As Float, Offset As Int, Count As Int)
Sets the vertices of this mesh. The attributes are assumed to be given in float format.
Vertices: the vertices.
Offset: the offset into the vertices array
Count: the number of floats to use
Transform (Matrix As lgMathMatrix4)
Transforms the positions in the mesh. Normals will be kept as is. This is a potentially slow operation, use with care.
It will also create a temporary float() which will be garbage collected.
Matrix: the transformation matrix
TransformUV (Matrix As lgMathMatrix3)
Transforms the texture coordinates in the mesh. This is a potentially slow operation, use with care.
It will also create a temporary float() which will be garbage collected.
Matrix: the transformation matrix
TransformUV2 (Matrix As lgMathMatrix3, Vertices() As Float, VertexSize As Int, Offset As Int, Start As Int, Count As Int)
Transforms the texture coordinates (UV) in the float array. This is a potentially slow operation, use with care.
Matrix: the transformation matrix
Vertices: the float array
VertexSize: the number of floats in each vertex
Offset: the offset within a vertex to the texture location
Start: the vertex to start with
Count: the amount of vertices to transform
Unbind
Unbinds the underlying VertexArray/VertexBufferObject and IndexBufferObject is indices were given.
Use this with OpenGL ES 1.x and when auto-bind is disabled.
UnbindS (Shader As lgShaderProgram)
Unbinds the underlying VertexBufferObject and IndexBufferObject is indices were given. Use this with OpenGL ES 2.0 and when auto-bind is disabled.
Shader: the shader (does not unbind the shader)
UnbindS2 (Shader As lgShaderProgram, Locations() As Int)
Unbinds the underlying VertexBufferObject and IndexBufferObject is indices were given. Use this with OpenGL ES 2.0 and when auto-bind is disabled.
Shader: the shader (does not unbind the shader)
Locations: array containing the attribute locations.
VertexAttributes As lgVertexAttributes [read only]
Returns the vertex attributes of this Mesh.
VertexSize As Int [read only]
Returns the size of a single vertex in bytes.
VerticesBuffer As java.nio.FloatBuffer [read only]
Returns the backing FloatBuffer holding the vertices.
Events:
Completed
Members:
dispose
Initialize (Internal As String, evtPrefix As String)
Initialize2 (File As lgFileHandle, evtPrefix As String)
InternalObject As com.badlogic.gdx.backends.android.AndroidMusic [read only]
IsPlaying As Boolean
Looping As Boolean
Pause
Play
Position As Float [read only]
SetPan (Pan As Float, Volume As Float)
Stop
Volume As Float
Members description:
dispose
Needs to be called when the Music is no longer needed.
Initialize (Internal As String, evtPrefix As String)
Creates a new Music instance which is used to play back a music stream from a file. Currently supported formats are WAV, MP3 and OGG. The Music instance has to be disposed if it is no longer used via the Dispose method. Music instances are automatically paused and resumed when an Application is paused or resumed.
Internal: Internal file path.
evtPrefix: Prefix of the Completed event.
Initialize2 (File As lgFileHandle, evtPrefix As String)
Creates a new Music instance which is used to play back a music stream from a file. Currently supported formats are WAV, MP3 and OGG. The Music instance has to be disposed if it is no longer used via the Dispose method. Music instances are automatically paused and resumed when an Application is paused or resumed.
File: The file handle.
evtPrefix: Prefix of the Completed event.
InternalObject As com.badlogic.gdx.backends.android.AndroidMusic [read only]
IsPlaying As Boolean
Returns whether this music stream is playing.
Looping As Boolean
Gets or sets whether the music stream is looping. This can be called at any time.
Pause
Pauses the play back. If the music stream has not been started yet or has finished playing a call to this method will be ignored.
Play
Starts the play back of the music stream. In case the stream was paused this will resume the play back. In case the music stream is finished playing this will restart the play back.
Position As Float [read only]
Returns the playback position in milliseconds.
SetPan (Pan As Float, Volume As Float)
Sets the panning and volume of this music stream.
Stop
Stops a playing or paused Music instance. Next time Play is invoked the Music will start from the beginning.
Volume As Float
Gets or sets the volume of this music stream. The volume is set in the range [0,1] with 0 being silent and 1 being the maximum volume.
Permissions:
android.permission.INTERNET
Events:
None
Members:
InternalObject As com.badlogic.gdx.backends.android.AndroidNet [read only]
NewTCPClientSocket (Host As String, Port As Int, Hints As lgSocketHints) As lgSocket
NewTCPServerSocket (Port As Int, Hints As lgServerSocketHints) As lgServerSocket
OpenURI (URI As String)
Members description:
InternalObject As com.badlogic.gdx.backends.android.AndroidNet [read only]
NewTCPClientSocket (Host As String, Port As Int, Hints As lgSocketHints) As lgSocket
Creates a new TCP client socket that connects to the given host and port.
Call the Dispose function of the client socket when you no longer need it.
NewTCPServerSocket (Port As Int, Hints As lgServerSocketHints) As lgServerSocket
Creates a new server socket on the given port, using the TCP protocol.
Call the Dispose function of the server socket when you no longer need it.
OpenURI (URI As String)
Events:
None
Members:
BOTTOM_CENTER As Int
BOTTOM_LEFT As Int
BOTTOM_RIGHT As Int
BottomHeight As Float
Color As lgColor
Draw (Batch As lgSpriteBatch, X As Float, Y As Float, Width As Float, Height As Float)
Initialize (NinePatch As lgNinePatch)
Initialize2 (NinePatch As lgNinePatch, Color As lgColor)
InitializeWithRegion (Region As lgTextureRegion)
InitializeWithRegion2 (Region As lgTextureRegion, Color As lgColor)
InitializeWithRegion3 (Region As lgTextureRegion, Left As Int, Right As Int, Top As Int, Bottom As Int)
InitializeWithRegions (Regions() As lgTextureRegion)
InitializeWithTexture (Texture As lgTexture)
InitializeWithTexture2 (Texture As lgTexture, Color As lgColor)
InitializeWithTexture3 (Texture As lgTexture, Left As Int, Right As Int, Top As Int, Bottom As Int)
InternalObject As com.badlogic.gdx.graphics.g2d.NinePatch [read only]
LeftWidth As Float
MIDDLE_CENTER As Int
MIDDLE_LEFT As Int
MIDDLE_RIGHT As Int
MiddleHeight As Float
MiddleWidth As Float
PadBottom As Float
PadLeft As Float
PadRight As Float
PadTop As Float
RightWidth As Float
SetPadding (Left As Int, Right As Int, Top As Int, Bottom As Int)
Texture As lgTexture [read only]
TOP_CENTER As Int
TOP_LEFT As Int
TOP_RIGHT As Int
TopHeight As Float
TotalHeight As Float [read only]
TotalWidth As Float [read only]
Members description:
BOTTOM_CENTER As Int
BOTTOM_LEFT As Int
BOTTOM_RIGHT As Int
BottomHeight As Float
Gets or sets the draw-time height of the three bottom edge patches.
Color As lgColor
Gets or sets the color. The color will be blended with the batch color, then combined with the texture colors at draw time. Default is White.
Draw (Batch As lgSpriteBatch, X As Float, Y As Float, Width As Float, Height As Float)
Initialize (NinePatch As lgNinePatch)
Initialize2 (NinePatch As lgNinePatch, Color As lgColor)
InitializeWithRegion (Region As lgTextureRegion)
Constructs a degenerate "nine" patch with only a center component.
InitializeWithRegion2 (Region As lgTextureRegion, Color As lgColor)
Constructs a degenerate "nine" patch with only a center component.
InitializeWithRegion3 (Region As lgTextureRegion, Left As Int, Right As Int, Top As Int, Bottom As Int)
Creates a ninepatch by cutting up the given texture region into nine patches. The subsequent parameters define the 4 lines that will cut the texture region into 9 pieces.
Left: Pixels from left edge.
Right: Pixels from right edge.
Top: Pixels from top edge.
Bottom: Pixels from bottom edge.
InitializeWithRegions (Regions() As lgTextureRegion)
Constructs a ninepatch from the given nine texture regions. The provided patches must be consistently sized (e.g., any left edge textures must have the same width, etc). Patches may be null. Patch indices are specified via the constants TOP_LEFT, TOP_CENTER, etc.
InitializeWithTexture (Texture As lgTexture)
Constructs a degenerate "nine" patch with only a center component.
InitializeWithTexture2 (Texture As lgTexture, Color As lgColor)
Constructs a degenerate "nine" patch with only a center component.
InitializeWithTexture3 (Texture As lgTexture, Left As Int, Right As Int, Top As Int, Bottom As Int)
Creates a ninepatch by cutting up the given texture into nine patches. The subsequent parameters define the 4 lines that will cut the texture region into 9 pieces.
Left: Pixels from left edge.
Right: Pixels from right edge.
Top: Pixels from top edge.
Bottom: Pixels from bottom edge.
InternalObject As com.badlogic.gdx.graphics.g2d.NinePatch [read only]
LeftWidth As Float
Gets or sets the draw-time width of the three left edge patches.
MIDDLE_CENTER As Int
MIDDLE_LEFT As Int
MIDDLE_RIGHT As Int
MiddleHeight As Float
Gets or sets the height of the middle row of the patch. At render time, this is implicitly the requested render-height of the entire nine patch, minus the top and bottom height.
MiddleWidth As Float
Gets or sets the draw-time width of the three middle edge patches.
PadBottom As Float
Gets or sets the bottom padding. If not set, returns BottomHeight.
PadLeft As Float
Gets or sets the left padding. If not set, returns LeftWidth.
PadRight As Float
Gets or sets the right padding. If not set, returns RightWidth.
PadTop As Float
Gets or sets the top padding. If not set, returns TopHeight.
RightWidth As Float
Gets or sets the draw-time width of the three right edge patches.
SetPadding (Left As Int, Right As Int, Top As Int, Bottom As Int)
Sets the padding for content inside this ninepatch. By default the padding is set to match the exterior of the ninepatch, so the content should fit exactly within the middle patch.
Texture As lgTexture [read only]
TOP_CENTER As Int
TOP_LEFT As Int
TOP_RIGHT As Int
TopHeight As Float
Gets or sets the draw-time height of the three top edge patches.
TotalHeight As Float [read only]
TotalWidth As Float [read only]
Events:
None
Members:
Combined As lgMathMatrix4 [read only]
Direction As lgMathVector3 [read only]
Far As Float
FindDirectionForIsoView (TargetAngle As Float, Epsilon As Float, MaxIterations As Int)
Frustum As lgMathFrustum [read only]
Initialize
Initialize2 (viewportWidth As Float, viewportHeight As Float)
Initialize3 (viewportWidth As Float, viewportHeight As Float, DiamondAngle As Float)
InternalObject As com.badlogic.gdx.graphics.OrthographicCamera [read only]
InvProjectionView As lgMathMatrix4 [read only]
Near As Float
Position As lgMathVector3 [read only]
Project (Coord As lgMathVector2)
Projection As lgMathMatrix4 [read only]
Rotate (Angle As Float)
SetToOrtho (yDown As Boolean)
SetToOrtho2 (yDown As Boolean, ViewportWidth As Float, ViewportHeight As Float)
Translate (X As Float, Y As Float)
Translate2 (vec As lgMathVector2)
Unproject (Coord As lgMathVector2)
Up As lgMathVector3 [read only]
Update
Update2 (UpdateFrustum As Boolean)
View As lgMathMatrix4 [read only]
ViewportHeight As Float
ViewportWidth As Float
Zoom As Float
Members description:
Combined As lgMathMatrix4 [read only]
Returns the combined projection and view matrix.
Direction As lgMathVector3 [read only]
Gets the unit length direction vector of the camera.
Far As Float
Gets or sets the far clipping plane distance. Has to be positive.
FindDirectionForIsoView (TargetAngle As Float, Epsilon As Float, MaxIterations As Int)
Frustum As lgMathFrustum [read only]
Initialize
Initialize2 (viewportWidth As Float, viewportHeight As Float)
Constructs a new OrthographicCamera, using the given viewport width and height. For pixel perfect 2D rendering just supply the screen size, for other unit scales (e.g. meters for box2d) proceed accordingly. The camera will show the region [-viewportWidth/2, -viewportHeight/2]- [viewportWidth/2, viewportHeight/2].
viewportWidth: The viewport width.
viewportHeight: The viewport height.
Initialize3 (viewportWidth As Float, viewportHeight As Float, DiamondAngle As Float)
Constructs a new OrthographicCamera, using the given viewport width and height. This will create a camera useable for iso-metric views. The diamond angle specifies the angle of a tile viewed isometrically.
viewportWidth: The viewport width.
viewportHeight: The viewport height.
diamondAngle: The angle in degrees.
InternalObject As com.badlogic.gdx.graphics.OrthographicCamera [read only]
InvProjectionView As lgMathMatrix4 [read only]
Returns the inverse combined projection and view matrix.
Near As Float
Gets or sets the near clipping plane distance. Has to be positive.
Position As lgMathVector3 [read only]
Gets the position of the camera.
Project (Coord As lgMathVector2)
Translates the viewport/world coordinates into screen coordinates.
Projection As lgMathMatrix4 [read only]
Returns the projection matrix.
Rotate (Angle As Float)
Rotates the camera by the given angle around the direction vector. The direction and up vector will not be orthogonalized.
SetToOrtho (yDown As Boolean)
Sets this camera to an orthographic projection using a viewport fitting the screen resolution, centered at (lgGdx.Graphics.Width/2, lgGdx.Graphics.Height/2), with the y-axis pointing up or down.
SetToOrtho2 (yDown As Boolean, ViewportWidth As Float, ViewportHeight As Float)
Sets this camera to an orthographic projection, centered at (viewportWidth/2, viewportHeight/2), with the y-axis pointing up or down.
Translate (X As Float, Y As Float)
Moves the camera by the given amount on each axis.
X: The displacement on the X-axis.
Y: The displacement on the Y-axis.
Translate2 (vec As lgMathVector2)
Moves the camera by the given vector.
Unproject (Coord As lgMathVector2)
Translates the screen coordinates into viewport/world coordinates.
Up As lgMathVector3 [read only]
Gets the unit length up vector of the camera.
Update
Recalculates the projection and view matrix of this camera and the Frustum planes. Use this after you've manipulated any of the attributes of the camera.
Update2 (UpdateFrustum As Boolean)
Recalculates the projection and view matrix of this camera and the Frustum planes if UpdateFrustum is true. Use this after you've manipulated any of the attributes of the camera.
View As lgMathMatrix4 [read only]
Returns the view matrix.
ViewportHeight As Float
ViewportWidth As Float
Zoom As Float
Events:
None
Members:
AllowCompletion
BoundingBox As lgMathBoundingBox [read only]
dispose
Draw (SpriteBatch As lgSpriteBatch)
Draw2 (SpriteBatch As lgSpriteBatch, Delta As Float)
Duration As Int [write only]
Emitters As List [read only]
FindEmitter (Name As String) As lgParticleEmitter
FlipY
Initialize
Initialize2 (Effect As lgParticleEffect)
InternalObject As com.badlogic.gdx.graphics.g2d.ParticleEffect [read only]
IsComplete As Boolean
Load (EffectFile As lgFileHandle, ImagesDir As lgFileHandle)
Load2 (EffectFile As lgFileHandle, Atlas As lgTextureAtlas)
LoadEmitterImages (ImagesDir As lgFileHandle)
LoadEmitterImages2 (Atlas As lgTextureAtlas)
LoadEmitters (EffectFile As lgFileHandle)
Reset
Save (EffectFile As lgFileHandle)
SetFlip (flipX As Boolean, flipY As Boolean)
SetPosition (X As Float, Y As Float)
Start
Update (Delta As Float)
Members description:
AllowCompletion
BoundingBox As lgMathBoundingBox [read only]
Returns the bounding box for all active particles. Z axis will always be zero.
dispose
Disposes the texture for each sprite for each ParticleEmitter.
Draw (SpriteBatch As lgSpriteBatch)
Draw2 (SpriteBatch As lgSpriteBatch, Delta As Float)
Duration As Int [write only]
Emitters As List [read only]
FindEmitter (Name As String) As lgParticleEmitter
Returns the emitter with the specified name, or null.
FlipY
Initialize
Initialize2 (Effect As lgParticleEffect)
InternalObject As com.badlogic.gdx.graphics.g2d.ParticleEffect [read only]
IsComplete As Boolean
Load (EffectFile As lgFileHandle, ImagesDir As lgFileHandle)
Load2 (EffectFile As lgFileHandle, Atlas As lgTextureAtlas)
LoadEmitterImages (ImagesDir As lgFileHandle)
LoadEmitterImages2 (Atlas As lgTextureAtlas)
LoadEmitters (EffectFile As lgFileHandle)
Reset
Save (EffectFile As lgFileHandle)
SetFlip (flipX As Boolean, flipY As Boolean)
SetPosition (X As Float, Y As Float)
Start
Update (Delta As Float)
Events:
None
Members:
Available As Int [read only]
Clear
dispose
Free (Effect As lgParticleEffect) As Boolean
Initialize (Effect As lgParticleEffect, InitialCapacity As Int)
Initialize2 (Effect As lgParticleEffect, InitialCapacity As Int, Max As Int)
Max As Int [read only]
Obtain As lgParticleEffect
Peak As Int [read only]
Size As Int [read only]
Members description:
Available As Int [read only]
Returns the number of objects already created that can be reused.
Clear
Removes all objects from this pool.
dispose
Disposes all resources used by this pool.
Free (Effect As lgParticleEffect) As Boolean
Makes the specified ParticleEffect eligible to be returned by Obtain. The function returns False if the ParticleEffect was not found in this pool.
Initialize (Effect As lgParticleEffect, InitialCapacity As Int)
Creates a pool of ParticleEffect with the specified initial capacity and no maximum.
Initialize2 (Effect As lgParticleEffect, InitialCapacity As Int, Max As Int)
Creates a pool of ParticleEffect with the specified initial capacity and the specified maximum number of objects.
Max As Int [read only]
Returns the maximum number of objects that will be pooled.
Obtain As lgParticleEffect
Returns a ParticleEffect from this pool. It may be new or reused (previously freed). If all objects of this pool are used and the pool already contains Max objects, the function returns Null.
Peak As Int [read only]
Returns the highest number of created objects.
Size As Int [read only]
Returns the number of objects currently in the pool.
Events:
None
Members:
ActiveCount As Int [read only]
Additive As Boolean
AddParticle
AddParticles (Count As Int)
Aligned As Boolean
AllowCompletion
Angle As lgParticleScaledNumericValue [read only]
Attached As Boolean
Behind As Boolean
BoundingBox As lgMathBoundingBox [read only]
Continuous As Boolean
Delay As lgParticleRangedNumericValue [read only]
Draw (SpriteBatch As lgSpriteBatch)
Draw2 (SpriteBatch As lgSpriteBatch, Delta As Float)
Duration As lgParticleRangedNumericValue [read only]
DurationTimer As Float
Emission As lgParticleScaledNumericValue [read only]
FlipY
Gravity As lgParticleScaledNumericValue [read only]
ImagePath As String
Initialize
Initialize2 (Emitter As lgParticleEmitter)
InternalObject As com.badlogic.gdx.graphics.g2d.ParticleEmitter [read only]
IsComplete As Boolean
Life As lgParticleScaledNumericValue [read only]
LifeOffset As lgParticleScaledNumericValue [read only]
Load (Internal As String)
Load2 (File As lgFileHandle)
MaxParticleCount As Int
MinParticleCount As Int
Name As String
PercentComplete As Float [read only]
Reset
Rotation As lgParticleScaledNumericValue [read only]
Save (File As lgFileHandle)
Scale As lgParticleScaledNumericValue [read only]
SetFlip (FlipX As Boolean, FlipY As Boolean)
SetPosition (X As Float, Y As Float)
SpawnHeight As lgParticleScaledNumericValue [read only]
SpawnShape As lgParticleSpawnShapeValue [read only]
SpawnWidth As lgParticleScaledNumericValue [read only]
Sprite As lgSprite
Start
Tint As lgParticleGradientColorValue [read only]
Transparency As lgParticleScaledNumericValue [read only]
Update (Delta As Float)
Velocity As lgParticleScaledNumericValue [read only]
Wind As lgParticleScaledNumericValue [read only]
X As Float [read only]
XOffsetValue As lgParticleRangedNumericValue [read only]
Y As Float [read only]
YOffsetValue As lgParticleRangedNumericValue [read only]
Members description:
ActiveCount As Int [read only]
Additive As Boolean
AddParticle
AddParticles (Count As Int)
Aligned As Boolean
AllowCompletion
Ignores the continuous setting until the emitter is started again. This allows the emitter to stop smoothly.
Angle As lgParticleScaledNumericValue [read only]
Attached As Boolean
Behind As Boolean
BoundingBox As lgMathBoundingBox [read only]
Returns the bounding box for all active particles. Z axis will always be zero.
Continuous As Boolean
Delay As lgParticleRangedNumericValue [read only]
Draw (SpriteBatch As lgSpriteBatch)
Draw2 (SpriteBatch As lgSpriteBatch, Delta As Float)
Updates and draws the particles. This is slightly more efficient than calling Update and Draw separately.
Duration As lgParticleRangedNumericValue [read only]
DurationTimer As Float
Emission As lgParticleScaledNumericValue [read only]
FlipY
Gravity As lgParticleScaledNumericValue [read only]
ImagePath As String
Initialize
Initialize2 (Emitter As lgParticleEmitter)
InternalObject As com.badlogic.gdx.graphics.g2d.ParticleEmitter [read only]
IsComplete As Boolean
Life As lgParticleScaledNumericValue [read only]
LifeOffset As lgParticleScaledNumericValue [read only]
Load (Internal As String)
Load2 (File As lgFileHandle)
MaxParticleCount As Int
MinParticleCount As Int
Name As String
PercentComplete As Float [read only]
Reset
Rotation As lgParticleScaledNumericValue [read only]
Save (File As lgFileHandle)
Scale As lgParticleScaledNumericValue [read only]
SetFlip (FlipX As Boolean, FlipY As Boolean)
SetPosition (X As Float, Y As Float)
SpawnHeight As lgParticleScaledNumericValue [read only]
SpawnShape As lgParticleSpawnShapeValue [read only]
SpawnWidth As lgParticleScaledNumericValue [read only]
Sprite As lgSprite
Start
Tint As lgParticleGradientColorValue [read only]
Transparency As lgParticleScaledNumericValue [read only]
Update (Delta As Float)
Velocity As lgParticleScaledNumericValue [read only]
Wind As lgParticleScaledNumericValue [read only]
X As Float [read only]
XOffsetValue As lgParticleRangedNumericValue [read only]
Y As Float [read only]
YOffsetValue As lgParticleRangedNumericValue [read only]
Events:
None
Members:
Active As Boolean [write only]
AlwaysActive As Boolean [write only]
Colors() As Float
getColor (percent As Float) As Float()
isActive As Boolean
isAlwaysActive As Boolean
Timeline() As Float
Members description:
Active As Boolean [write only]
AlwaysActive As Boolean [write only]
Colors() As Float
getColor (percent As Float) As Float()
isActive As Boolean
isAlwaysActive As Boolean
Timeline() As Float
Events:
None
Members:
Active As Boolean [write only]
AlwaysActive As Boolean [write only]
isActive As Boolean
isAlwaysActive As Boolean
Low As Float [write only]
LowMax As Float
LowMin As Float
newLowValue As Float
setLow (min As Float, max As Float)
Members description:
Active As Boolean [write only]
AlwaysActive As Boolean [write only]
isActive As Boolean
isAlwaysActive As Boolean
Low As Float [write only]
LowMax As Float
LowMin As Float
newLowValue As Float
setLow (min As Float, max As Float)
Events:
None
Members:
Active As Boolean [write only]
AlwaysActive As Boolean [write only]
getScale (percent As Float) As Float
High As Float [write only]
HighMax As Float
HighMin As Float
isActive As Boolean
isAlwaysActive As Boolean
isRelative As Boolean
Low As Float [write only]
LowMax As Float
LowMin As Float
newHighValue As Float
newLowValue As Float
Relative As Boolean [write only]
Scaling() As Float
setHigh (min As Float, max As Float)
setLow (min As Float, max As Float)
Timeline() As Float
Members description:
Active As Boolean [write only]
AlwaysActive As Boolean [write only]
getScale (percent As Float) As Float
High As Float [write only]
HighMax As Float
HighMin As Float
isActive As Boolean
isAlwaysActive As Boolean
isRelative As Boolean
Low As Float [write only]
LowMax As Float
LowMin As Float
newHighValue As Float
newLowValue As Float
Relative As Boolean [write only]
Scaling() As Float
setHigh (min As Float, max As Float)
setLow (min As Float, max As Float)
Timeline() As Float
Events:
None
Members:
Active As Boolean [write only]
AlwaysActive As Boolean [write only]
Edges As Boolean [write only]
isActive As Boolean
isAlwaysActive As Boolean
isEdges As Boolean
Shape As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape
Side As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnEllipseSide
SPAWNSHAPE_Ellipse As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape
SPAWNSHAPE_Line As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape
SPAWNSHAPE_Point As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape
SPAWNSHAPE_Square As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape
SPAWNSIDE_Both As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnEllipseSide
SPAWNSIDE_Bottom As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnEllipseSide
SPAWNSIDE_Top As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnEllipseSide
Members description:
Active As Boolean [write only]
AlwaysActive As Boolean [write only]
Edges As Boolean [write only]
isActive As Boolean
isAlwaysActive As Boolean
isEdges As Boolean
Shape As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape
Side As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnEllipseSide
SPAWNSHAPE_Ellipse As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape
SPAWNSHAPE_Line As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape
SPAWNSHAPE_Point As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape
SPAWNSHAPE_Square As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnShape
SPAWNSIDE_Both As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnEllipseSide
SPAWNSIDE_Bottom As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnEllipseSide
SPAWNSIDE_Top As com.badlogic.gdx.graphics.g2d.ParticleEmitter.SpawnEllipseSide
A Pixmap represents an image in memory. It has a width and height expressed in pixels as well as a Format specifying the number and order of color components per pixel. Coordinates of pixels are specified with respect to the top left corner of the image, with the x-axis pointing to the right and the y-axis pointing downwards.
By default all methods use blending. You can disable blending with SetBlending. The DrawPixmap method will scale and stretch the source image to a target image. There either nearest neighbour or bilinear filtering can be used.
A Pixmap stores its data in native heap memory. It is mandatory to call dispose() when the pixmap is no longer needed, otherwise memory leaks will result.
Events:
None
Members:
Blending As com.badlogic.gdx.graphics.Pixmap.Blending
BLENDING_None As com.badlogic.gdx.graphics.Pixmap.Blending
BLENDING_SourceOver As com.badlogic.gdx.graphics.Pixmap.Blending
dispose
DrawCircle (X As Int, Y As Int, Radius As Int)
DrawLine (X As Int, Y As Int, X2 As Int, Y2 As Int)
DrawPixel (X As Int, Y As Int)
DrawPixel2 (X As Int, Y As Int, Color As Int)
DrawPixmap (Pixmap As lgPixmap, X As Int, Y As Int)
DrawPixmap2 (Pixmap As lgPixmap, X As Int, Y As Int, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int)
DrawPixmap3 (Pixmap As lgPixmap, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int, dstX As Int, dstY As Int, dstWidth As Int, dstHeight As Int)
DrawRectangle (X As Int, Y As Int, Width As Int, Height As Int)
Fill
FillCircle (X As Int, Y As Int, Radius As Int)
FillRectangle (X As Int, Y As Int, Width As Int, Height As Int)
FillTriangle (X1 As Int, Y1 As Int, X2 As Int, Y2 As Int, X3 As Int, Y3 As Int)
Filter As com.badlogic.gdx.graphics.Pixmap.Filter [write only]
FILTER_BiLinear As com.badlogic.gdx.graphics.Pixmap.Filter
FILTER_NearestNeighbour As com.badlogic.gdx.graphics.Pixmap.Filter
Format As com.badlogic.gdx.graphics.Pixmap.Format [read only]
FORMAT_Alpha As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_Intensity As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_LuminanceAlpha As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_RGB565 As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_RGB888 As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_RGBA4444 As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_RGBA8888 As com.badlogic.gdx.graphics.Pixmap.Format
getPixel (X As Int, Y As Int) As Int
GLFormat As Int [read only]
GLInternalFormat As Int [read only]
GLType As Int [read only]
Height As Int [read only]
Initialize (Width As Int, Height As Int, Format As com.badlogic.gdx.graphics.Pixmap.Format)
InitializeWithArray (EncodedData() As Byte, Offset As Int, Len As Int)
InitializeWithFile (File As lgFileHandle)
InternalObject As com.badlogic.gdx.graphics.Pixmap [read only]
Pixels() As Byte [read only]
SetColor (Color As lgColor)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
SetColorRGBA8888 (Color As Int)
Width As Int [read only]
Members description:
Blending As com.badlogic.gdx.graphics.Pixmap.Blending
Gets or sets the type of Blending to be used for all operations. Default is BLENDING_SourceOver.
BLENDING_None As com.badlogic.gdx.graphics.Pixmap.Blending
BLENDING_SourceOver As com.badlogic.gdx.graphics.Pixmap.Blending
dispose
Releases all resources associated with this Pixmap.
DrawCircle (X As Int, Y As Int, Radius As Int)
Draws a circle outline with the center at X,Y and a radius using the current color and stroke width.
X: The X-coordinate of the center.
Y: The Y-coordinate of the center.
Radius: The radius in pixels.
DrawLine (X As Int, Y As Int, X2 As Int, Y2 As Int)
Draws a line between the given coordinates using the currently set color.
X: The X-coordinate of the first point
Y: The Y-coordinate of the first point
X2: The X-coordinate of the second point
Y2: The Y-coordinate of the second point
DrawPixel (X As Int, Y As Int)
Draws a pixel at the given location with the current color.
DrawPixel2 (X As Int, Y As Int, Color As Int)
Draws a pixel at the given location with the given color.
DrawPixmap (Pixmap As lgPixmap, X As Int, Y As Int)
Draws an area from another Pixmap to this Pixmap.
Pixmap: The other Pixmap.
X: The target X-coordinate (top left corner).
Y: The target Y-coordinate (top left corner).
DrawPixmap2 (Pixmap As lgPixmap, X As Int, Y As Int, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int)
Draws an area from another Pixmap to this Pixmap.
Pixmap: The other Pixmap.
X: The target X-coordinate (top left corner).
Y: The target Y-coordinate (top left corner).
srcX: The source X-coordinate (top left corner).
srcY: The source Y-coordinate (top left corner).
srcWidth: The width of the area from the other Pixmap in pixels.
srcHeight: The height of the area from the other Pixmap in pixels.
DrawPixmap3 (Pixmap As lgPixmap, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int, dstX As Int, dstY As Int, dstWidth As Int, dstHeight As Int)
Draws an area from another Pixmap to this Pixmap. This will automatically scale and stretch the source image to the specified target rectangle. Set Filter to specify the type of filtering to be used (nearest neighbour or bilinear).
Pixmap: The other Pixmap.
srcX: The source X-coordinate (top left corner).
srcY: The source Y-coordinate (top left corner).
srcWidth: The width of the area from the other Pixmap in pixels.
srcHeight: The height of the area from the other Pixmap in pixels.
dstX: The target X-coordinate (top left corner).
dstY: The target Y-coordinate (top left corner).
dstWidth: The target width.
dstHeight: The target height.
DrawRectangle (X As Int, Y As Int, Width As Int, Height As Int)
Draws a rectangle outline starting at X,Y extending by width to the right and by height downwards (Y-axis points downwards) using the current color.
X: The X coordinate.
Y: The Y coordinate.
Width: The width in pixels.
Height: The height in pixels.
Fill
Fills the complete bitmap with the currently set color.
FillCircle (X As Int, Y As Int, Radius As Int)
Fills a circle with the center at X,Y and a radius using the current color.
X: The X-coordinate of the center.
Y: The Y-coordinate of the center.
Radius: The radius in pixels.
FillRectangle (X As Int, Y As Int, Width As Int, Height As Int)
Fills a rectangle starting at X, Y extending by width to the right and by height downwards (Y-axis points downwards) using the current color.
X: The X coordinate.
Y: The Y coordinate.
Width: The width in pixels.
Height: The height in pixels.
FillTriangle (X1 As Int, Y1 As Int, X2 As Int, Y2 As Int, X3 As Int, Y3 As Int)
Fills a triangle with vertices at X1,Y1 and X2,Y2 and X3,Y3 using the current color.
Filter As com.badlogic.gdx.graphics.Pixmap.Filter [write only]
Sets the type of interpolation Filter to be used in conjunction with DrawPixmap3.
FILTER_BiLinear As com.badlogic.gdx.graphics.Pixmap.Filter
FILTER_NearestNeighbour As com.badlogic.gdx.graphics.Pixmap.Filter
Format As com.badlogic.gdx.graphics.Pixmap.Format [read only]
Returns the Format of this Pixmap.
FORMAT_Alpha As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_Intensity As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_LuminanceAlpha As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_RGB565 As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_RGB888 As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_RGBA4444 As com.badlogic.gdx.graphics.Pixmap.Format
FORMAT_RGBA8888 As com.badlogic.gdx.graphics.Pixmap.Format
getPixel (X As Int, Y As Int) As Int
Returns the 32-bit RGBA8888 value of the pixel at X, Y. For Alpha formats the RGB components will be one.
GLFormat As Int [read only]
Returns the OpenGL ES format of this Pixmap. Used as the seventh parameter to glTexImage2D.
GLInternalFormat As Int [read only]
Returns the OpenGL ES format of this Pixmap. Used as the third parameter to glTexImage2D.
GLType As Int [read only]
Returns the OpenGL ES type of this Pixmap. Used as the eighth parameter to glTexImage2D.
Height As Int [read only]
Returns the height of the Pixmap in pixels.
Initialize (Width As Int, Height As Int, Format As com.badlogic.gdx.graphics.Pixmap.Format)
Creates a new Pixmap instance with the given width, height and format.
Width: The width in pixels
Height: The height in pixels
Format: One of the Format constants.
InitializeWithArray (EncodedData() As Byte, Offset As Int, Len As Int)
Creates a new Pixmap instance from the given encoded image data. The image can be encoded as JPEG, PNG or BMP.
InitializeWithFile (File As lgFileHandle)
Creates a new Pixmap instance from the given file. The file must be a Png, Jpeg or Bitmap. Paletted formats are not supported.
InternalObject As com.badlogic.gdx.graphics.Pixmap [read only]
Pixels() As Byte [read only]
Returns the direct ByteBuffer holding the pixel data. For the format Alpha each value is encoded as a byte. For the format LuminanceAlpha the luminance is the first byte and the alpha is the second byte of the pixel. For the formats RGB888 and RGBA8888 the color components are stored in a single byte each in the order red, green, blue (alpha). For the formats RGB565 and RGBA4444 the pixel colors are stored in shorts in machine dependent order.
SetColor (Color As lgColor)
Sets the color for the following drawing operations.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
Sets the color for the following drawing operations.
R: Red, from 0 to 1
G: Green, from 0 to 1
B: Blue, from 0 to 1
A: Alpha, from 0 to 1
SetColorRGBA8888 (Color As Int)
Sets the color, encoded as RGBA8888, for the following drawing operations.
Width As Int [read only]
Returns the width of the Pixmap in pixels.
Writes Pixmaps to various formats.
Events:
None
Members:
ReadCIM (File As lgFileHandle) As lgPixmap
WriteCIM (File As lgFileHandle, Pixmap As lgPixmap)
WritePNG (File As lgFileHandle, Pixmap As lgPixmap)
Members description:
ReadCIM (File As lgFileHandle) As lgPixmap
Reads the Pixmap from the given file, assuming the Pixmap was written with the WriteCIM function.
Throws a GdxRuntimeException in case the file couldn't be read.
WriteCIM (File As lgFileHandle, Pixmap As lgPixmap)
Writes the Pixmap to the given file using a custom compression scheme. First three integers define the width, height and format, remaining bytes are zlib compressed pixels.
To be able to load the Pixmap to a Texture, use ".cim" as the file suffix!
Throws a GdxRuntimeException in case the Pixmap couldn't be written to the file.
WritePNG (File As lgFileHandle, Pixmap As lgPixmap)
Writes the pixmap as a PNG. Note this method uses quite a bit of working memory. WriteCIM is faster if the file does not need to be read outside of libGDX.
Packs {@link Pixmap} instances into one more more {@link Page} instances to generate an atlas of Pixmap instances. Provides
means to directly convert the pixmap atlas to a {@link TextureAtlas}. The packer supports padding and border pixel duplication,
specified during construction. The packer supports incremental inserts and updates of TextureAtlases generated with this
class.
All methods except {@link #getPage(String)} and {@link #getPages()} are thread safe. The methods
{@link #generateTextureAtlas(TextureFilter, TextureFilter, boolean)} and
{@link #updateTextureAtlas(TextureAtlas, TextureFilter, TextureFilter, boolean)} need to be called on the rendering thread, all
other methods can be called from any thread.
One-off usage:
// 512x512 pixel pages, RGB565 format, 2 pixels of padding, border duplication
PixmapPacker packer = new PixmapPacker(512, 512, Format.RGB565, 2, true);
packer.pack("First Pixmap", pixmap1);
packer.pack("Second Pixmap", pixmap2);
TextureAtlas altas = packer.generateTextureAtlas(TextureFilter.Nearest, TextureFilter.Nearest);
Note that you should not dispose the packer in this usage pattern. Instead, dispose the TextureAtlas if no longer needed.
Incremental usage:
// 512x512 pixel pages, RGB565 format, 2 pixels of padding, no border duplication
PixmapPacker packer = new PixmapPacker(512, 512, Format.RGB565, 2, false);
TextureAtlas incrementalAtlas = new TextureAtlas();
// potentially on a separate thread, e.g. downloading thumbnails
packer.pack("thumbnail", thumbnail);
// on the rendering thread, every frame
packer.updateTextureAtlas(incrementalAtlas, TextureFilter.Linear, TextureFilter.Linear);
// once the atlas is no longer needed, make sure you get the final additions. This might
// be more elaborate depending on your threading model.
packer.updateTextureAtlas(incrementalAtlas, TextureFilter.Linear, TextureFilter.Linear);
incrementalAtlas.dispose();
Pixmap-only usage:
PixmapPacker packer = new PixmapPacker(512, 512, Format.RGB565, 2, true);
packer.pack("First Pixmap", pixmap1);
packer.pack("Second Pixmap", pixmap2);
// do something interesting with the resulting pages
for (Page page : packer.getPages()) {
}
// dispose of the packer in this case
packer.dispose();
Events:
None
Members:
dispose
DuplicateBorder As Boolean [read only]
GenerateTextureAtlas (MinFilter As com.badlogic.gdx.graphics.Texture.TextureFilter, MagFilter As com.badlogic.gdx.graphics.Texture.TextureFilter, UseMipMaps As Boolean) As lgTextureAtlas
GetPage (name As String) As lgPixmapPackerPage
GetPageIndex (name As String) As Int
GetRect (name As String) As lgMathRectangle
Pack (Name As String, Image As lgPixmap) As lgMathRectangle
Padding As Int [read only]
PageHeight As Int [read only]
PageWidth As Int [read only]
UpdateTextureAtlas (Atlas As lgTextureAtlas, MinFilter As com.badlogic.gdx.graphics.Texture.TextureFilter, MagFilter As com.badlogic.gdx.graphics.Texture.TextureFilter, UseMipMaps As Boolean)
Members description:
dispose
Disposes all resources, including Pixmap instances for the pages created so far. These Pixmap instances are shared with any TextureAtlas generated or updated by either GenerateTextureAtlas or UpdateTextureAtlas.
Do not call this method if you generated or updated a TextureAtlas, instead dispose the TextureAtlas.
DuplicateBorder As Boolean [read only]
GenerateTextureAtlas (MinFilter As com.badlogic.gdx.graphics.Texture.TextureFilter, MagFilter As com.badlogic.gdx.graphics.Texture.TextureFilter, UseMipMaps As Boolean) As lgTextureAtlas
Generates a new TextureAtlas from the Pixmap instances inserted so far.
GetPage (name As String) As lgPixmapPackerPage
Returns the page the image is stored in or null.
name: the name of the image.
GetPageIndex (name As String) As Int
Returns the index of the page containing the given packed rectangle, or -1.
name: the name of the image
GetRect (name As String) As lgMathRectangle
Returns the rectangle for the image in the page it's stored in or null.
name: the name of the image.
Pack (Name As String, Image As lgPixmap) As lgMathRectangle
Inserts the given Pixmap. You can later on retrieve the images position in the output image via the supplied name and the function GetRect.
Returns a Rectangle describing the area the pixmap was rendered to or null.
Throws RuntimeException in case the image did not fit due to the page size being too small or providing a duplicate name.
Padding As Int [read only]
PageHeight As Int [read only]
PageWidth As Int [read only]
UpdateTextureAtlas (Atlas As lgTextureAtlas, MinFilter As com.badlogic.gdx.graphics.Texture.TextureFilter, MagFilter As com.badlogic.gdx.graphics.Texture.TextureFilter, UseMipMaps As Boolean)
Updates the given TextureAtlas, adding any new Pixmap instances packed since the last call to this function.
This can be used to insert Pixmap instances on a separate thread via Pack and update the TextureAtlas on the rendering thread.
This function must be called on the rendering thread.
Events:
None
Members:
Pixmap As lgPixmap [read only]
Members description:
Pixmap As lgPixmap [read only]
Events:
None
Members:
consumeCompressedData
consumePixmap As lgPixmap
DATATYPE_Compressed As com.badlogic.gdx.graphics.TextureData.TextureDataType
DATATYPE_Float As com.badlogic.gdx.graphics.TextureData.TextureDataType
DATATYPE_Pixmap As com.badlogic.gdx.graphics.TextureData.TextureDataType
disposePixmap As Boolean
Format As com.badlogic.gdx.graphics.Pixmap.Format [read only]
Height As Int [read only]
Initialize (Pixmap As lgPixmap, Format As com.badlogic.gdx.graphics.Pixmap.Format, UseMipMaps As Boolean, DisposePixmap As Boolean)
isManaged As Boolean
isPrepared As Boolean
prepare
Type As com.badlogic.gdx.graphics.TextureData.TextureDataType [read only]
useMipMaps As Boolean
Width As Int [read only]
Members description:
consumeCompressedData
Uploads the pixel data to the OpenGL ES texture. The caller must bind an OpenGL ES texture. A call to Prepare must preceed a call to this method.
consumePixmap As lgPixmap
Returns the Pixmap for upload by Texture. A call to Prepare must preceed a call to this method. Any internal datastructures created in Prepare should be disposed of here.
DATATYPE_Compressed As com.badlogic.gdx.graphics.TextureData.TextureDataType
DATATYPE_Float As com.badlogic.gdx.graphics.TextureData.TextureDataType
DATATYPE_Pixmap As com.badlogic.gdx.graphics.TextureData.TextureDataType
disposePixmap As Boolean
Returns whether the caller of ConsumePixmap should dispose the Pixmap returned by ConsumePixmap.
Format As com.badlogic.gdx.graphics.Pixmap.Format [read only]
Height As Int [read only]
Initialize (Pixmap As lgPixmap, Format As com.badlogic.gdx.graphics.Pixmap.Format, UseMipMaps As Boolean, DisposePixmap As Boolean)
isManaged As Boolean
Returns whether this implementation can cope with a EGL context loss.
isPrepared As Boolean
Returns whether the TextureData is prepared or not.
prepare
Prepares the TextureData for a call to ConsumePixmap or ConsumeCompressedData. This method can be called from a non OpenGL thread and should thus not interact with OpenGL.
Type As com.badlogic.gdx.graphics.TextureData.TextureDataType [read only]
useMipMaps As Boolean
Returns whether to generate mipmaps or not.
Width As Int [read only]
Events:
None
Members:
Initialize (Region As lgTextureRegion, File As lgFileHandle)
Initialize2 (Region As lgTextureRegion, Vertices() As Float, Triangles() As Short)
InternalObject As com.badlogic.gdx.graphics.g2d.PolygonRegion [read only]
Region As lgTextureRegion [read only]
TextureCoords() As Float [read only]
Triangles() As Short [read only]
Vertices() As Float [read only]
Members description:
Initialize (Region As lgTextureRegion, File As lgFileHandle)
Loads a PolygonRegion from a PSH (Polygon SHape) file. The PSH file format defines the polygon vertices before triangulation. Lines not prefixed with "s" are ignored.
PSH files can be created with external tools, e.g.: https://code.google.com/p/libgdx-polygoneditor/
Initialize2 (Region As lgTextureRegion, Vertices() As Float, Triangles() As Short)
Creates a PolygonRegion with the specified vertices and triangles.
InternalObject As com.badlogic.gdx.graphics.g2d.PolygonRegion [read only]
Region As lgTextureRegion [read only]
TextureCoords() As Float [read only]
Triangles() As Short [read only]
Vertices() As Float [read only]
Events:
None
Members:
BoundingRectangle As lgMathRectangle [read only]
Color As lgColor
Draw (PSpriteBatch As lgPolygonSpriteBatch)
DrawAlpha (PSpriteBatch As lgPolygonSpriteBatch, AlphaModulation As Float)
Height As Float [read only]
InitializeWithRegion (Region As lgPolygonRegion)
InitializeWithSprite (PolygonSprite As lgPolygonSprite)
InternalObject As com.badlogic.gdx.graphics.g2d.PolygonSprite [read only]
OriginX As Float [read only]
OriginY As Float [read only]
Rotate (Degrees As Float)
Rotation As Float
Scale (Amount As Float)
ScaleX As Float [read only]
ScaleY As Float [read only]
Set (PolygonSprite As lgPolygonSprite)
SetBounds (X As Float, Y As Float, Width As Float, Height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
SetOrigin (originX As Float, originY As Float)
SetPosition (X As Float, Y As Float)
SetRegion (Region As lgPolygonRegion)
SetScale (scaleX As Float, scaleY As Float)
SetSize (Width As Float, Height As Float)
Translate (xAmount As Float, yAmount As Float)
TranslateX (xAmount As Float)
TranslateY (yAmount As Float)
Vertices() As Float [read only]
Width As Float [read only]
X As Float
Y As Float
Members description:
BoundingRectangle As lgMathRectangle [read only]
Returns the bounding axis aligned Rectangle that bounds this sprite. The rectangles x and y coordinates describe its bottom left corner. If you change the position or size of the sprite, you have to fetch the triangle again for it to be recomputed.
Color As lgColor
Gets or sets the color used to tint this sprite. Default is White.
Draw (PSpriteBatch As lgPolygonSpriteBatch)
DrawAlpha (PSpriteBatch As lgPolygonSpriteBatch, AlphaModulation As Float)
Height As Float [read only]
InitializeWithRegion (Region As lgPolygonRegion)
InitializeWithSprite (PolygonSprite As lgPolygonSprite)
Creates a sprite that is a copy in every way of the specified sprite.
InternalObject As com.badlogic.gdx.graphics.g2d.PolygonSprite [read only]
OriginX As Float [read only]
OriginY As Float [read only]
Rotate (Degrees As Float)
Sets the sprite's rotation relative to the current rotation.
Rotation As Float
Scale (Amount As Float)
Sets the sprite's scale relative to the current scale.
ScaleX As Float [read only]
ScaleY As Float [read only]
Set (PolygonSprite As lgPolygonSprite)
SetBounds (X As Float, Y As Float, Width As Float, Height As Float)
Sets the position and size of the sprite when drawn, before scaling and rotation are applied. If origin, rotation, or scale are changed, it is slightly more efficient to set the bounds after those operations.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
Sets the color of this sprite.
R: Red, from 0 to 1
G: Green, from 0 to 1
B: Blue, from 0 to 1
A: Alpha, from 0 to 1
SetOrigin (originX As Float, originY As Float)
Sets the origin in relation to the sprite's position for scaling and rotation.
SetPosition (X As Float, Y As Float)
Sets the position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to set the position after those operations. If both position and size are to be changed, it is better to use SetBounds.
SetRegion (Region As lgPolygonRegion)
SetScale (scaleX As Float, scaleY As Float)
SetSize (Width As Float, Height As Float)
Sets the size of the sprite when drawn, before scaling and rotation are applied. If origin, rotation, or scale are changed, it is slightly more efficient to set the size after those operations. If both position and size are to be changed, it is better to use SetBounds.
Translate (xAmount As Float, yAmount As Float)
Sets the position relative to the current position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to translate after those operations.
TranslateX (xAmount As Float)
Sets the X position relative to the current position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to translate after those operations.
TranslateY (yAmount As Float)
Sets the Y position relative to the current position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to translate after those operations.
Vertices() As Float [read only]
Returns the packed vertices, colors, and texture coordinates for this sprite.
Width As Float [read only]
X As Float
Gets or sets the X position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to set the position after those operations. If both position and size are to be changed, it is better to use SetBounds.
Y As Float
Gets or sets the Y position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to set the position after those operations. If both position and size are to be changed, it is better to use SetBounds.
Events:
None
Members:
Begin
Color As lgColor
CreateDefaultShader As lgShaderProgram
DisableBlending
dispose
DrawPolygon (Texture As lgTexture, PolygonVertices() As Float, VerticesOffset As Int, VerticesCount As Int, PolygonTriangles() As Short, TrianglesOffset As Int, TrianglesCount As Int)
DrawRegion (Region As lgPolygonRegion, X As Float, Y As Float)
DrawRegion2 (Region As lgPolygonRegion, X As Float, Y As Float, Width As Float, Height As Float)
DrawRegion3 (Region As lgPolygonRegion, X As Float, Y As Float, OriginX As Float, OriginY As Float, Width As Float, Height As Float, ScaleX As Float, ScaleY As Float, Rotation As Float)
EnableBlending
End
Flush
Initialize
Initialize2 (Size As Int)
Initialize3 (Size As Int, DefaultShader As lgShaderProgram)
InternalObject As com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch [read only]
IsBlendingEnabled As Boolean
MaxTrianglesInBatch As Int [read only]
ProjectionMatrix As lgMathMatrix4
RenderCalls As Int [read only]
SetBlendFunction (srcFunc As Int, dstFunc As Int)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
Shader As lgShaderProgram [write only]
TotalRenderCalls As Int [read only]
TransformMatrix As lgMathMatrix4
Members description:
Begin
Sets up the PolygonSpriteBatch for drawing. This will disable depth buffer writing. It enables blending and texturing. If you have more texture units enabled than the first one you have to disable them before calling this. Uses a screen coordinate system by default where everything is given in pixels. You can specify your own projection and modelview matrices via ProjectionMatrix and TransformMatrix.
Color As lgColor
Gets or sets the color used to tint images when they are added to the PolygonSpriteBatch. Default is White.
CreateDefaultShader As lgShaderProgram
Returns a new instance of the default shader used by PolygonSpriteBatch for GL2 when no shader is specified.
DisableBlending
Disables blending. Calling this within Begin/End will flush the batch.
dispose
Disposes all resources associated with this PolygonSpriteBatch.
DrawPolygon (Texture As lgTexture, PolygonVertices() As Float, VerticesOffset As Int, VerticesCount As Int, PolygonTriangles() As Short, TrianglesOffset As Int, TrianglesCount As Int)
Draws the polygon using the given vertices and triangles. Each vertices must be made up of 5 elements in this order: x, y, color, u, v.
DrawRegion (Region As lgPolygonRegion, X As Float, Y As Float)
Draws a polygon region with the bottom left corner at X,Y having the width and height of the region.
DrawRegion2 (Region As lgPolygonRegion, X As Float, Y As Float, Width As Float, Height As Float)
Draws a polygon region with the bottom left corner at X,Y and stretching the region to cover the given width and height.
DrawRegion3 (Region As lgPolygonRegion, X As Float, Y As Float, OriginX As Float, OriginY As Float, Width As Float, Height As Float, ScaleX As Float, ScaleY As Float, Rotation As Float)
Draws a polygon region with the bottom left corner at X,Y and stretching the region to cover the given width and height. The polygon region is offset by OriginX, OriginY relative to the origin. Scale specifies the scaling factor by which the polygon region should be scaled around OriginX, OriginY. Rotation specifies the angle of counter clockwise rotation of the rectangle around OriginX, OriginY.
EnableBlending
Enables blending. Calling this within Begin/End will flush the batch.
End
Finishes off rendering. Enables depth writes, disables blending and texturing. Must always be called after a call to Begin.
Flush
Causes any pending polygons to be rendered, without ending the PolygonSpriteBatch.
Initialize
Constructs a new PolygonSpriteBatch with a default size of 2000, the default shader (if GL2), and one buffer. Sets the projection matrix to an orthographic projection with y-axis point upwards, x-axis point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect with respect to the current screen resolution.
Initialize2 (Size As Int)
Constructs a PolygonSpriteBatch with the specified size, the default shader (if GL2), and one buffer.
Size: The max number of vertices and number of triangles in a single batch. Max of 10920.
Initialize3 (Size As Int, DefaultShader As lgShaderProgram)
Constructs a PolygonSpriteBatch with the specified size and shader.
Size: The max number of vertices and number of triangles in a single batch. Max of 10920.
DefaultShader: The default shader to use. This is not owned by the PolygonSpriteBatch and must be disposed separately.
InternalObject As com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch [read only]
IsBlendingEnabled As Boolean
Returns whether blending is enabled.
MaxTrianglesInBatch As Int [read only]
Returns the maximum number of triangles rendered in one batch so far.
ProjectionMatrix As lgMathMatrix4
Gets or sets the projection matrix to be used by this PolygonSpriteBatch. If this is called inside a Begin/End block, the current batch is flushed to the GPU.
RenderCalls As Int [read only]
Returns the number of render calls since the last Begin.
SetBlendFunction (srcFunc As Int, dstFunc As Int)
Sets the blending function to be used when rendering polygons.
srcFunc: The source function, e.g. GL10_SRC_ALPHA. If set to -1, PolygonSpriteBatch won't change the blending function.
dstFunc: The destination function, e.g. GL10_ONE_MINUS_SRC_ALPHA
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
Sets the color used to tint images when they are added to the PolygonSpriteBatch. Default is White.
R: Red, from 0 to 1
G: Green, from 0 to 1
B: Blue, from 0 to 1
A: Alpha, from 0 to 1
Shader As lgShaderProgram [write only]
Sets the shader to be used in a GL ES 2.0 environment. The vertex position attribute is called "a_position",
the texture coordinates attribute is called "a_texCoord0" and the color attribute is called "a_color". See the
lgShaderProgram.ATTRIBUTE constants. The texture coordinates attribute gets "0" appended to indicate the use
of the first texture unit. The combined transform and projection matrix is uploaded via a mat4 uniform called
"u_projTrans". The texture sampler is passed via a uniform called "u_texture".
This function will flush the batch before setting the new shader, so you can call it between Begin and End.
TotalRenderCalls As Int [read only]
Returns the number of rendering calls ever. Will not be reset.
TransformMatrix As lgMathMatrix4
Gets or sets the transform matrix to be used by this PolygonSpriteBatch. If this is called inside a Begin/End block, the current batch is flushed to the GPU.
Events:
None
Members:
CalculateScissors (Camera As lgOrthographicCamera, BatchTransform As lgMathMatrix4, Area As lgMathRectangle, Scissor As lgMathRectangle)
PopScissors As lgMathRectangle
PushScissors (Scissor As lgMathRectangle) As Boolean
toWindowCoordinates (Camera As lgOrthographicCamera, TransformMatrix As lgMathMatrix4, Point As lgMathVector2)
Viewport As lgMathRectangle [read only]
Members description:
CalculateScissors (Camera As lgOrthographicCamera, BatchTransform As lgMathMatrix4, Area As lgMathRectangle, Scissor As lgMathRectangle)
Calculates a scissor rectangle in OpenGL ES window coordinates from a Camera, a transformation Matrix4 and an axis aligned Rectangle. The rectangle will get transformed by the camera and transform matrices and is then projected to screen coordinates. Note that only axis aligned rectangles will work with this method. If either the Camera or the Matrix4 have rotational components, the output of this method will not be suitable for GLCommon.glScissor.
camera: the Camera
batchTransform: the transformation Matrix4
area: the Rectangle to transform to window coordinates
scissor: the Rectangle to store the result in
PopScissors As lgMathRectangle
Pops the current scissor rectangle from the stack and sets the new scissor area to the new top of stack rectangle. In case no more rectangles are on the stack, GL10_SCISSOR_TEST is disabled.
PushScissors (Scissor As lgMathRectangle) As Boolean
Pushes a new scissor Rectangle onto the stack, merging it with the current top of the stack. The minimal area of overlap between the top of stack rectangle and the provided rectangle is pushed onto the stack. This will invoke GLCommon.glScissor with the final top of stack rectangle. In case no scissor is yet on the stack this will also enable GL10_SCISSOR_TEST automatically.
Returns True if the scissors were pushed, False if the scissor area was zero, in this case the scissors were not pushed and no drawing should occur.
toWindowCoordinates (Camera As lgOrthographicCamera, TransformMatrix As lgMathMatrix4, Point As lgMathVector2)
Transforms a point to real window coordinates (as opposed to OpenGL ES window coordinates), where the origin is in the top left and the the y-axis is pointing downwards.
camera: the Camera
transformMatrix: the transformation Matrix4
point: the point to be transformed.
Viewport As lgMathRectangle [read only]
Returns the current viewport in OpenGL ES window coordinates based on the currently applied scissor.
Actions attach to an {@link Actor} and perform some task, often over time.
Events:
None
Members:
Actor As lgScn2DActor [read only]
restart
toString As String
Members description:
Actor As lgScn2DActor [read only]
Returns the actor this action is used for, or Null if the action is not attached to an actor.
restart
Sets the state of the action so it can be run again.
toString As String
Static convenience methods for using pooled actions, intended for static import.
Events:
None
Members:
AddActionToActor (action As lgScn2DAction, targetActor As lgScn2DActor) As com.badlogic.gdx.scenes.scene2d.actions.AddAction
AddListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener, capture As Boolean) As com.badlogic.gdx.scenes.scene2d.actions.AddListenerAction
AddListener2 (listener As com.badlogic.gdx.scenes.scene2d.EventListener, capture As Boolean, targetActor As lgScn2DActor) As com.badlogic.gdx.scenes.scene2d.actions.AddListenerAction
After (action As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.AfterAction
Alpha (a As Float) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
Alpha2 (a As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
Alpha3 (a As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
CallSub (SubName As String, Parameter As Object) As com.badlogic.gdx.scenes.scene2d.actions.RunnableAction
Color (color As lgColor) As com.badlogic.gdx.scenes.scene2d.actions.ColorAction
Color2 (color As lgColor, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.ColorAction
Color3 (color As lgColor, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.ColorAction
Delay (duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.DelayAction
Delay2 (duration As Float, delayedAction As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.DelayAction
FadeIn (duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
FadeIn2 (duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
FadeOut (duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
FadeOut2 (duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
Forever (repeatedAction As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.RepeatAction
Hide As com.badlogic.gdx.scenes.scene2d.actions.VisibleAction
MoveBy (amountX As Float, amountY As Float) As com.badlogic.gdx.scenes.scene2d.actions.MoveByAction
MoveBy2 (amountX As Float, amountY As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.MoveByAction
MoveBy3 (amountX As Float, amountY As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.MoveByAction
MoveTo (x As Float, y As Float) As com.badlogic.gdx.scenes.scene2d.actions.MoveToAction
MoveTo2 (x As Float, y As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.MoveToAction
MoveTo3 (x As Float, y As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.MoveToAction
Parallel (actions() As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.ParallelAction
Parallel2 (action1 As lgScn2DAction, action2 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.ParallelAction
Parallel3 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.ParallelAction
Parallel4 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction, action4 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.ParallelAction
Parallel5 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction, action4 As lgScn2DAction, action5 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.ParallelAction
RemoveActionFromActor (action As lgScn2DAction, targetActor As lgScn2DActor) As com.badlogic.gdx.scenes.scene2d.actions.RemoveAction
removeActor As com.badlogic.gdx.scenes.scene2d.actions.RemoveActorAction
RemoveActor2 (removeActor As lgScn2DActor) As com.badlogic.gdx.scenes.scene2d.actions.RemoveActorAction
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener, capture As Boolean) As com.badlogic.gdx.scenes.scene2d.actions.RemoveListenerAction
RemoveListener2 (listener As com.badlogic.gdx.scenes.scene2d.EventListener, capture As Boolean, targetActor As lgScn2DActor) As com.badlogic.gdx.scenes.scene2d.actions.RemoveListenerAction
Repeat (count As Int, repeatedAction As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.RepeatAction
RotateBy (rotationAmount As Float) As com.badlogic.gdx.scenes.scene2d.actions.RotateByAction
RotateBy2 (rotationAmount As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.RotateByAction
RotateBy3 (rotationAmount As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.RotateByAction
RotateTo (rotation As Float) As com.badlogic.gdx.scenes.scene2d.actions.RotateToAction
RotateTo2 (rotation As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.RotateToAction
RotateTo3 (rotation As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.RotateToAction
ScaleBy (amountX As Float, amountY As Float) As com.badlogic.gdx.scenes.scene2d.actions.ScaleByAction
ScaleBy2 (amountX As Float, amountY As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.ScaleByAction
ScaleBy3 (amountX As Float, amountY As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.ScaleByAction
ScaleTo (x As Float, y As Float) As com.badlogic.gdx.scenes.scene2d.actions.ScaleToAction
ScaleTo2 (x As Float, y As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.ScaleToAction
ScaleTo3 (x As Float, y As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.ScaleToAction
Sequence (actions() As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.SequenceAction
Sequence2 (action1 As lgScn2DAction, action2 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.SequenceAction
Sequence3 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.SequenceAction
Sequence4 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction, action4 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.SequenceAction
Sequence5 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction, action4 As lgScn2DAction, action5 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.SequenceAction
Show As com.badlogic.gdx.scenes.scene2d.actions.VisibleAction
SizeBy (amountX As Float, amountY As Float) As com.badlogic.gdx.scenes.scene2d.actions.SizeByAction
SizeBy2 (amountX As Float, amountY As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.SizeByAction
SizeBy3 (amountX As Float, amountY As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.SizeByAction
SizeTo (x As Float, y As Float) As com.badlogic.gdx.scenes.scene2d.actions.SizeToAction
SizeTo2 (x As Float, y As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.SizeToAction
SizeTo3 (x As Float, y As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.SizeToAction
TimeScale (scale As Float, scaledAction As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.TimeScaleAction
Touchable (touchable As com.badlogic.gdx.scenes.scene2d.Touchable) As com.badlogic.gdx.scenes.scene2d.actions.TouchableAction
Visible (visible As Boolean) As com.badlogic.gdx.scenes.scene2d.actions.VisibleAction
Members description:
AddActionToActor (action As lgScn2DAction, targetActor As lgScn2DActor) As com.badlogic.gdx.scenes.scene2d.actions.AddAction
AddListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener, capture As Boolean) As com.badlogic.gdx.scenes.scene2d.actions.AddListenerAction
AddListener2 (listener As com.badlogic.gdx.scenes.scene2d.EventListener, capture As Boolean, targetActor As lgScn2DActor) As com.badlogic.gdx.scenes.scene2d.actions.AddListenerAction
After (action As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.AfterAction
Alpha (a As Float) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
Sets the actor's alpha instantly.
Alpha2 (a As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
Transitions from the alpha at the time this action starts to the specified alpha.
Alpha3 (a As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
Transitions from the alpha at the time this action starts to the specified alpha.
CallSub (SubName As String, Parameter As Object) As com.badlogic.gdx.scenes.scene2d.actions.RunnableAction
Color (color As lgColor) As com.badlogic.gdx.scenes.scene2d.actions.ColorAction
Sets the actor's color instantly.
Color2 (color As lgColor, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.ColorAction
Transitions from the color at the time this action starts to the specified color.
Color3 (color As lgColor, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.ColorAction
Transitions from the color at the time this action starts to the specified color.
Delay (duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.DelayAction
Delay2 (duration As Float, delayedAction As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.DelayAction
FadeIn (duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
Transitions from the alpha at the time this action starts to an alpha of 1.
FadeIn2 (duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
Transitions from the alpha at the time this action starts to an alpha of 1.
FadeOut (duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
Transitions from the alpha at the time this action starts to an alpha of 0.
FadeOut2 (duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.AlphaAction
Transitions from the alpha at the time this action starts to an alpha of 0.
Forever (repeatedAction As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.RepeatAction
Hide As com.badlogic.gdx.scenes.scene2d.actions.VisibleAction
MoveBy (amountX As Float, amountY As Float) As com.badlogic.gdx.scenes.scene2d.actions.MoveByAction
Moves the actor instantly.
MoveBy2 (amountX As Float, amountY As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.MoveByAction
MoveBy3 (amountX As Float, amountY As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.MoveByAction
MoveTo (x As Float, y As Float) As com.badlogic.gdx.scenes.scene2d.actions.MoveToAction
Moves the actor instantly.
MoveTo2 (x As Float, y As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.MoveToAction
MoveTo3 (x As Float, y As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.MoveToAction
Parallel (actions() As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.ParallelAction
Parallel2 (action1 As lgScn2DAction, action2 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.ParallelAction
Parallel3 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.ParallelAction
Parallel4 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction, action4 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.ParallelAction
Parallel5 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction, action4 As lgScn2DAction, action5 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.ParallelAction
RemoveActionFromActor (action As lgScn2DAction, targetActor As lgScn2DActor) As com.badlogic.gdx.scenes.scene2d.actions.RemoveAction
removeActor As com.badlogic.gdx.scenes.scene2d.actions.RemoveActorAction
RemoveActor2 (removeActor As lgScn2DActor) As com.badlogic.gdx.scenes.scene2d.actions.RemoveActorAction
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener, capture As Boolean) As com.badlogic.gdx.scenes.scene2d.actions.RemoveListenerAction
RemoveListener2 (listener As com.badlogic.gdx.scenes.scene2d.EventListener, capture As Boolean, targetActor As lgScn2DActor) As com.badlogic.gdx.scenes.scene2d.actions.RemoveListenerAction
Repeat (count As Int, repeatedAction As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.RepeatAction
RotateBy (rotationAmount As Float) As com.badlogic.gdx.scenes.scene2d.actions.RotateByAction
Rotates the actor instantly.
RotateBy2 (rotationAmount As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.RotateByAction
RotateBy3 (rotationAmount As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.RotateByAction
RotateTo (rotation As Float) As com.badlogic.gdx.scenes.scene2d.actions.RotateToAction
Rotates the actor instantly.
RotateTo2 (rotation As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.RotateToAction
RotateTo3 (rotation As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.RotateToAction
ScaleBy (amountX As Float, amountY As Float) As com.badlogic.gdx.scenes.scene2d.actions.ScaleByAction
Scales the actor instantly.
ScaleBy2 (amountX As Float, amountY As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.ScaleByAction
ScaleBy3 (amountX As Float, amountY As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.ScaleByAction
ScaleTo (x As Float, y As Float) As com.badlogic.gdx.scenes.scene2d.actions.ScaleToAction
Scales the actor instantly.
ScaleTo2 (x As Float, y As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.ScaleToAction
ScaleTo3 (x As Float, y As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.ScaleToAction
Sequence (actions() As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.SequenceAction
Sequence2 (action1 As lgScn2DAction, action2 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.SequenceAction
Sequence3 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.SequenceAction
Sequence4 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction, action4 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.SequenceAction
Sequence5 (action1 As lgScn2DAction, action2 As lgScn2DAction, action3 As lgScn2DAction, action4 As lgScn2DAction, action5 As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.SequenceAction
Show As com.badlogic.gdx.scenes.scene2d.actions.VisibleAction
SizeBy (amountX As Float, amountY As Float) As com.badlogic.gdx.scenes.scene2d.actions.SizeByAction
Sizes the actor instantly.
SizeBy2 (amountX As Float, amountY As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.SizeByAction
SizeBy3 (amountX As Float, amountY As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.SizeByAction
SizeTo (x As Float, y As Float) As com.badlogic.gdx.scenes.scene2d.actions.SizeToAction
Sizes the actor instantly.
SizeTo2 (x As Float, y As Float, duration As Float) As com.badlogic.gdx.scenes.scene2d.actions.SizeToAction
SizeTo3 (x As Float, y As Float, duration As Float, interpolation As lgMathInterpolation) As com.badlogic.gdx.scenes.scene2d.actions.SizeToAction
TimeScale (scale As Float, scaledAction As lgScn2DAction) As com.badlogic.gdx.scenes.scene2d.actions.TimeScaleAction
Touchable (touchable As com.badlogic.gdx.scenes.scene2d.Touchable) As com.badlogic.gdx.scenes.scene2d.actions.TouchableAction
Visible (visible As Boolean) As com.badlogic.gdx.scenes.scene2d.actions.VisibleAction
2D scene graph node. An actor has a position, rectangular size, origin, scale, rotation, Z index, and color. The position
corresponds to the unrotated, unscaled bottom left corner of the actor. The position is relative to the actor's parent. The
origin is relative to the position and is used for scale and rotation.
An actor has a list of in-progress {@link Action actions} that are applied to the actor (over time). These are generally used to
change the presentation of the actor (moving it, resizing it, etc). See {@link #act(float)} and {@link Action}.
An actor has two kinds of listeners associated with it: "capture" and regular. The listeners are notified of events the actor
or its children receive. The capture listeners are designed to allow a parent or container actor to hide events from child
actors. The regular listeners are designed to allow an actor to respond to events that have been delivered. See {@link #fire}
for more details.
An {@link InputListener} can receive all the basic input events, and more complex listeners (like {@link ClickListener} and
{@link ActorGestureListener}) can listen for and combine primitive events and recognize complex interactions like multi-click
or pinch.
Events:
Act(Delta As Float)
Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
clear
clearActions
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetCaptureListenersList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (EvtPrefix As String)
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Name As String
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
remove As Boolean
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
clear
Removes all actions and listeners on this actor.
clearActions
Removes all actions on this actor.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Raises the Draw event to draw the actor. Typically this is called each frame by the Draw function of the actor's parent.
lgSpriteBatch.Begin has already been called. The SpriteBatch is configured to draw in the parent's coordinate system.
ParentAlpha: Should be multiplied with the actor's alpha, allowing a parent's alpha to affect all children.
Example:
Sub MyActor_Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
Dim Actor As lgScn2DActor = Sender
SpriteBatch.SetColorRGBA(Actor.Color.R, Actor.Color.G, Actor.Color.B, Actor.Color.A * ParentAlpha)
SpriteBatch.DrawRegion3(MyTexRegion, Actor.X, Actor.Y, Actor.OriginX, Actor.OriginY, Actor.Width, Actor.Height, Actor.ScaleX, Actor.ScaleY, Actor.Rotation)
End Sub
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Checks whether this actor contains the specified point and is touchable. The point is specified in the actor's local coordinate system.
Returns the actor or Null.
Touchable: If True, the hit detection will respect the touchability.
Initialize (EvtPrefix As String)
Creates a new actor.
EvtPrefix: The prefix of Act and Draw events.
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
Name As String
Gets or sets a name for easier identification of the actor in application code.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
Act(Delta As Float)
Click(CheckedState As Boolean)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
AddActor (Widget As lgScn2DActor) As lgScn2DTableCell
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
AddCell As lgScn2DTableCell
AddLabel (Text As String, Style As lgScn2DLabelStyle) As lgScn2DTableCell
AddLabel2 (Text As String, Font As lgBitmapFont, FontColor As lgColor) As lgScn2DTableCell
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Align As Int
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AlignBottom As lgScn2DTable
AlignCenter As lgScn2DTable
AlignLeft As lgScn2DTable
AlignRight As lgScn2DTable
AlignTop As lgScn2DTable
Checked As Boolean
clear
clearActions
clearChildren
clearListeners
Clip As Boolean [write only]
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
ColumnDefaults (Column As Int) As lgScn2DTableCell
CullingArea As lgMathRectangle [write only]
DebugAll
DebugCell As lgScn2DTable
DebugTable As lgScn2DTable
DebugWidget As lgScn2DTable
Defaults As lgScn2DTableCell
Disabled As Boolean
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
DrawDebug (Stage As lgScn2DStage)
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetActor (Index As Int) As lgScn2DActor
GetCaptureListenersList As lgArray
GetCell (Widget As lgScn2DActor) As lgScn2DTableCell
GetCell2 (Index As Int) As lgScn2DTableCell
GetCellsList (lstCells As List)
GetChildrenList As lgArray
GetListenersList As lgArray
getRow (y As Float) As Int
HasActions As Boolean [read only]
hasChildren As Boolean
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (Style As lgScn2DButtonStyle, EvtPrefix As String)
Initialize2 (Style As lgScn2DButtonStyle, Actor As lgScn2DActor, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
isPressed As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
NewRow As lgScn2DTableCell
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
PadBottom As Float [read only]
PadLeft As Float [read only]
PadRight As Float [read only]
PadTop As Float [read only]
PadX As Float [read only]
PadY As Float [read only]
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
remove As Boolean
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Reset
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
Round As Boolean [write only]
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
Stack (Actors() As lgScn2DActor) As lgScn2DTableCell
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Style As lgScn2DButtonStyle
swapActor (first As Int, second As Int) As Boolean
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Tag As Object
toBack
toFront
toggle
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
AddActor (Widget As lgScn2DActor) As lgScn2DTableCell
Adds a new cell to the table with the specified widget.
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
AddCell As lgScn2DTableCell
Adds a cell without a widget.
AddLabel (Text As String, Style As lgScn2DLabelStyle) As lgScn2DTableCell
Adds a new cell with a label. The label is created with the specified text and style.
AddLabel2 (Text As String, Font As lgBitmapFont, FontColor As lgColor) As lgScn2DTableCell
Adds a new cell with a label. The label is created with the specified text, font and color.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
Align As Int
Sets the alignment of the logical table within the table widget. Set to one of the ALIGN constants, or any combination of those.
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AlignBottom As lgScn2DTable
Adds ALIGN_Bottom and clears ALIGN_Top for the alignment of the logical table within the table widget.
AlignCenter As lgScn2DTable
Sets the alignment of the logical table within the table widget to ALIGN_Center. This clears any other alignment.
AlignLeft As lgScn2DTable
Adds ALIGN_Left and clears ALIGN_Right for the alignment of the logical table within the table widget.
AlignRight As lgScn2DTable
Adds ALIGN_Right and clears ALIGN_Left for the alignment of the logical table within the table widget.
AlignTop As lgScn2DTable
Adds ALIGN_Top and clears ALIGN_Bottom for the alignment of the logical table within the table widget.
Checked As Boolean
clear
Removes all children, actions, and listeners from this group.
clearActions
Removes all actions on this actor.
clearChildren
Removes all actors and cells from the table.
clearListeners
Removes all listeners on this actor.
Clip As Boolean [write only]
Causes the contents to be clipped if they exceed the table widget bounds. Enabling clipping will set Transform to True.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
ColumnDefaults (Column As Int) As lgScn2DTableCell
Gets the cell values that will be used as the defaults for all cells in the specified column. Columns are indexed starting at 0.
CullingArea As lgMathRectangle [write only]
Children completely outside of this rectangle will not be drawn. This is only valid for use with unrotated and unscaled
actors!
DebugAll
Turns on all debug lines.
DebugCell As lgScn2DTable
Turns on cell debug lines.
DebugTable As lgScn2DTable
Turns on table debug lines.
DebugWidget As lgScn2DTable
Turns on widget debug lines.
Defaults As lgScn2DTableCell
Returns the cell values that will be used as the defaults for all cells.
Disabled As Boolean
Gets or sets whether the button is disabled. When True, the button will not toggle the checked state when clicked and will not fire a Click event.
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the button.
DrawDebug (Stage As lgScn2DStage)
Draws the debug lines for all tables in the stage. If this method is not called each frame, no debug lines will be drawn. If
debug is never turned on for any table in the application, calling this method will have no effect. If a table has ever had
debug set, calling this method causes an expensive traversal of all actors in the stage.
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the group.
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetActor (Index As Int) As lgScn2DActor
Returns the actor with the specified index in the group, or Null if index is out of bounds.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetCell (Widget As lgScn2DActor) As lgScn2DTableCell
Returns the cell for the specified widget in this table, or null.
GetCell2 (Index As Int) As lgScn2DTableCell
Returns the cell with the specified index, or Null if index is out of bounds.
GetCellsList (lstCells As List)
Fills the given list with all cells of this table.
GetChildrenList As lgArray
Returns an ordered list of child actors in this group.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
getRow (y As Float) As Int
Returns the row index for the y coordinate.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasChildren As Boolean
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Returns the child actor with the highest z-index that contains the specified point and is touchable and visible, or Null if no actor was hit. The point is specified in the group's coordinate system (0,0 is the bottom left of the group and width,height is the upper right).
This function is used to delegate TouchDown and Enter/Exit events.
Touchable: If True, the hit detection will respect the touchability.
Initialize (Style As lgScn2DButtonStyle, EvtPrefix As String)
Creates a button. A button is a Table with a checked state. Each time a button is clicked, the checked state is toggled. Being a table, a button can contain any other actors.
The preferred size of the button is determined by the background and the button contents.
EvtPrefix: The prefix of Act and Click events.
Initialize2 (Style As lgScn2DButtonStyle, Actor As lgScn2DActor, EvtPrefix As String)
Creates a button that contains the specified actor.
EvtPrefix: The prefix of Act and Click events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
isPressed As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this group to those of a descendant actor. The descendant does not need to be a direct child.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
NewRow As lgScn2DTableCell
Indicates that subsequent cells should be added to a new row.
Returns the cell values that will be used as the defaults for all cells in the new row.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget group to its preferred width and height.
PadBottom As Float [read only]
PadLeft As Float [read only]
PadRight As Float [read only]
PadTop As Float [read only]
PadX As Float [read only]
Returns PadLeft plus PadRight.
PadY As Float [read only]
Returns PadTop plus PadBottom.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
Prints the actor hierarchy recursively for debugging purposes.
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
Removes an actor from this group. If the actor has actions, they are cleared.
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Reset
Removes all actors and cells from the table (same as ClearChildren) and additionally resets all table properties and cell, column, and row defaults.
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
Round As Boolean [write only]
If true (the default), positions and sizes are rounded to integers.
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stack (Actors() As lgScn2DActor) As lgScn2DTableCell
Adds a new cell to the table with the specified actors in a Stack.
Actors: May be null to add a stack without any actors.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Style As lgScn2DButtonStyle
Gets or sets the button's style.
swapActor (first As Int, second As Int) As Boolean
Swaps two actors by index. Returns false if the swap did not occur because the indexes were out of bounds.
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Swaps two actors. Returns false if the swap did not occur because the actors are not children of this group.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
toggle
Toggles the checked state. This method changes the checked state, which fires a Click event, so can be used to simulate a button click.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
When True, the SpriteBatch is transformed so children are drawn in their parent's coordinate system. This has a performance impact because lgSpriteBatch.Flush must be done before and after the transform. If the actors in a group are not rotated or scaled, then the transform for the group can be set to False. In this case, each child's position will be offset by the group's position for drawing, causing the children to appear in the correct location even though the SpriteBatch has not been transformed.
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
Add (Button As lgScn2DButton)
Add2 (Buttons() As lgScn2DButton)
ButtonsList As List [read only]
Checked As lgScn2DButton
CheckedButtonsList As List [read only]
Initialize (Buttons() As lgScn2DButton)
MaxCheckCount As Int [write only]
MinCheckCount As Int [write only]
Remove (Button As lgScn2DButton)
Remove2 (Buttons() As lgScn2DButton)
SetChecked (text As String)
UncheckAll
UncheckLast As Boolean [write only]
Members description:
Add (Button As lgScn2DButton)
Add2 (Buttons() As lgScn2DButton)
ButtonsList As List [read only]
Checked As lgScn2DButton
Returns the first checked button, or null.
CheckedButtonsList As List [read only]
Initialize (Buttons() As lgScn2DButton)
A ButtonGroup manages a group of buttons to enforce a minimum and maximum number of checked buttons. This enables "radio button" functionality and more. A button may only be in one group at a time.
MaxCheckCount As Int [write only]
Sets the maximum number of buttons that can be checked. Set to -1 for no maximum. Default is 1.
MinCheckCount As Int [write only]
Sets the minimum number of buttons that must be checked. Default is 1.
Remove (Button As lgScn2DButton)
Remove2 (Buttons() As lgScn2DButton)
SetChecked (text As String)
Sets the first TextButton with the specified text to checked.
UncheckAll
Sets all buttons' checked state to False, regardless of MinCheckCount.
UncheckLast As Boolean [write only]
If true, when the maximum number of buttons are checked and an additional button is checked, the last button to be checked
is unchecked so that the maximum is not exceeded. If false, additional buttons beyond the maximum are not allowed to be
checked. Default is true.
Events:
None
Members:
checked As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabled As com.badlogic.gdx.scenes.scene2d.utils.Drawable
down As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Initialize (Up As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Down As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DButtonStyle)
pressedOffsetX As Float
pressedOffsetY As Float
SetDrawableSize (Width As Float, Height As Float)
unpressedOffsetX As Float
unpressedOffsetY As Float
up As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Members description:
checked As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabled As com.badlogic.gdx.scenes.scene2d.utils.Drawable
down As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Initialize (Up As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Down As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DButtonStyle)
pressedOffsetX As Float
Optional.
pressedOffsetY As Float
Optional.
SetDrawableSize (Width As Float, Height As Float)
Sets the MinWidth and MinHeight of the Up, Down, Checked and Disabled drawables.
unpressedOffsetX As Float
Optional.
unpressedOffsetY As Float
Optional.
up As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Detects mouse over, mouse or finger touch presses, and clicks on an actor. A touch must go down over the actor and is
considered pressed as long as it is over the actor or within the {@link #setTapSquareSize(float) tap square}. This behavior
makes it easier to press buttons on a touch interface when the initial touch happens near the edge of the actor. Double clicks
can be detected using {@link #getTapCount()}. Any touch (not just the first) will trigger this listener. While pressed, other
touch downs are ignored.
Events:
Click(Event As lgScn2DInputEvent, X As Float, Y As Float)
TouchDown(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
TouchDragged(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
TouchUp(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
Enter(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int, FromActor As lgScn2DActor)
Exit(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int, ToActor As lgScn2DActor)
Members:
cancel
handle (e As lgScn2DEvent) As Boolean
Initialize (EvtPrefix As String) As lgScn2DClickListener
inTapSquare (x As Float, y As Float) As Boolean
invalidateTapSquare
isPressed As Boolean
PressedPointer As Int [read only]
TapCount As Int [read only]
TapCountInterval As Float [write only]
TapSquareSize As Float
TouchDownX As Float [read only]
TouchDownY As Float [read only]
Members description:
cancel
If a touch down is being monitored, the drag and click events are ignored until the next touch up.
handle (e As lgScn2DEvent) As Boolean
Try to handle the given event, if it is applicable.
Returns True if the event should be considered handled by scene2d.
Initialize (EvtPrefix As String) As lgScn2DClickListener
Creates an event listener for detection of clicks on an actor. Returns the created instance.
EvtPrefix: Prefix of the events.
inTapSquare (x As Float, y As Float) As Boolean
invalidateTapSquare
The tap square will not longer be used for the current touch.
isPressed As Boolean
Returns true if a touch is over the actor or within the tap square.
PressedPointer As Int [read only]
Returns the pointer that initially touched the actor.
TapCount As Int [read only]
Returns the number of taps within the tap count interval for the most recent click event.
TapCountInterval As Float [write only]
TapSquareSize As Float
TouchDownX As Float [read only]
TouchDownY As Float [read only]
Events:
SrcDragStart(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int) As lgScn2DDragAndDropPayload
SrcDragStop(Event As lgScn2DInputEvent, DropTarget As lgScn2DActor, X As Float, Y As Float, Pointer As Int)
TgtDrag(Source As lgScn2DActor, Payload As lgScn2DDragAndDropPayload, X As Float, Y As Float, Pointer As Int) As Boolean
TgtReset(Source As lgScn2DActor, Payload As lgScn2DDragAndDropPayload)
TgtDrop(Source As lgScn2DActor, Payload As lgScn2DDragAndDropPayload, X As Float, Y As Float, Pointer As Int)
Members:
AddSource (Source As lgScn2DActor, EvtPrefix As String)
AddTarget (Target As lgScn2DActor, EvtPrefix As String)
DragActor As lgScn2DActor [read only]
DragTime As Int [write only]
Initialize
IsDragging As Boolean
RemoveSource (Source As lgScn2DActor)
RemoveTarget (Target As lgScn2DActor)
SetDragActorPosition (DragActorX As Float, DragActorY As Float)
TapSquareSize As Float [write only]
Members description:
AddSource (Source As lgScn2DActor, EvtPrefix As String)
AddTarget (Target As lgScn2DActor, EvtPrefix As String)
DragActor As lgScn2DActor [read only]
Returns the current drag actor, or null.
DragTime As Int [write only]
Time in milliseconds that a drag must take before a drop will be considered valid. This ignores an accidental drag and drop that was meant to be a click. Default is 250.
Initialize
Initializes a drag and drop operation.
IsDragging As Boolean
RemoveSource (Source As lgScn2DActor)
RemoveTarget (Target As lgScn2DActor)
SetDragActorPosition (DragActorX As Float, DragActorY As Float)
TapSquareSize As Float [write only]
Sets the distance a touch must travel before being considered a drag.
The payload of a drag and drop operation. Actors can be optionally provided to follow the cursor and change when over a
target.
Events:
None
Members:
DragActor As lgScn2DActor
InvalidDragActor As lgScn2DActor
Object As Object
ValidDragActor As lgScn2DActor
Members description:
DragActor As lgScn2DActor
InvalidDragActor As lgScn2DActor
Object As Object
ValidDragActor As lgScn2DActor
The base class for all events.
By default an event will "bubble" up through an actor's parent's handlers (see {@link #setBubbles(boolean)}).
An actor's capture listeners can {@link #stop()} an event to prevent child actors from seeing it.
An Event may be marked as "handled" which will end its propagation outside of the Stage (see {@link #handle()}).
The default {@link Actor#fire(Event)} will mark events handled if an {@link EventListener} returns true.
A cancelled event will be stopped and handled. Additionally, many actors will undo the side-effects of a canceled event. (See {@link #cancel()}.)
Events:
None
Members:
Bubbles As Boolean
cancel
handle
isCancelled As Boolean
isCapture As Boolean
isHandled As Boolean
isStopped As Boolean
ListenerActor As lgScn2DActor [read only]
Stage As lgScn2DStage [read only]
stop
Target As lgScn2DActor [read only]
Members description:
Bubbles As Boolean
If True, after the event is fired on the target actor, it will also be fired on each of the parent actors, all the way to the root.
cancel
Marks this event cancelled. This handles the event and stops the event propagation.
handle
Marks this event as handled. This does not affect event propagation inside Scene2d, but causes the Stage event handlers to return True, which will eat the event so it is not passed on to the application under the stage.
isCancelled As Boolean
isCapture As Boolean
Returns whether the event was fired during the capture phase.
isHandled As Boolean
isStopped As Boolean
ListenerActor As lgScn2DActor [read only]
Returns the actor that this listener is attached to.
Stage As lgScn2DStage [read only]
The stage for the actor the event was fired on.
stop
Marks this event has being stopped. This halts event propagation. Any other listeners on the listener actor are notified. After that, no other listeners are notified.
Target As lgScn2DActor [read only]
Returns the actor that the event originated from.
Detects tap, long press, fling, pan, zoom, and pinch gestures on an actor. If there is only a need to detect tap, use
{@link ClickListener}.
Events:
TouchDown(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
TouchUp(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
Tap(Event As lgScn2DInputEvent, X As Float, Y As Float, Count As Int)
LongPress(Actor As lgScn2DActor, X As Float, Y As Float) As Boolean
Fling(Event As lgScn2DInputEvent, VelocityX As Float, VelocityY As Float)
Pan(Event As lgScn2DInputEvent, X As Float, Y As Float, DeltaX As Float, DeltaY As Float)
Pinch(Event As lgScn2DInputEvent, InitialPointer1 As lgMathVector2, InitialPointer2 As lgMathVector2, Pointer1 As lgMathVector2, Pointer2 As lgMathVector2)
Zoom(Event As lgScn2DInputEvent, InitialDistance As Float, Distance As Float)
Members:
handle (e As lgScn2DEvent) As Boolean
Initialize (EvtPrefix As String) As lgScn2DGestureListener
Initialize2 (HalfTapSquareSize As Float, TapCountInterval As Float, LongPressDuration As Float, MaxFlingDelay As Float, EvtPrefix As String) As lgScn2DGestureListener
TouchDownTarget As lgScn2DActor [read only]
Members description:
handle (e As lgScn2DEvent) As Boolean
Initialize (EvtPrefix As String) As lgScn2DGestureListener
Creates an event listener for detection of gestures. Returns the created instance.
If you return True for the LongPress event, additional gestures will not be triggered.
EvtPrefix: Prefix of the events.
Initialize2 (HalfTapSquareSize As Float, TapCountInterval As Float, LongPressDuration As Float, MaxFlingDelay As Float, EvtPrefix As String) As lgScn2DGestureListener
Creates an event listener for detection of gestures. Returns the created instance.
If you return True for the LongPress event, additional gestures will not be triggered.
EvtPrefix: Prefix of the events.
TouchDownTarget As lgScn2DActor [read only]
2D scene graph node that may contain other actors.
Actors have a z-order equal to the order they were inserted into the group. Actors inserted later will be drawn on top of
actors added earlier. Touch events that hit more than one actor are distributed to topmost actors first.
Events:
Act(Delta As Float)
Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addActor (actor As lgScn2DActor)
addActorAfter (actorAfter As lgScn2DActor, actor As lgScn2DActor)
addActorAt (index As Int, actor As lgScn2DActor)
addActorBefore (actorBefore As lgScn2DActor, actor As lgScn2DActor)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
clear
clearActions
clearChildren
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
CullingArea As lgMathRectangle [write only]
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
findActor (name As String) As lgScn2DActor
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetActor (Index As Int) As lgScn2DActor
GetCaptureListenersList As lgArray
GetChildrenList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasChildren As Boolean
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (EvtPrefix As String)
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Name As String
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
print
remove As Boolean
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
swapActor (first As Int, second As Int) As Boolean
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
translate (x As Float, y As Float)
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addActor (actor As lgScn2DActor)
Adds an actor as a child of this group. The actor is first removed from its parent group, if any.
addActorAfter (actorAfter As lgScn2DActor, actor As lgScn2DActor)
Adds an actor as a child of this group, immediately after another child actor. The actor is first removed from its parent
group, if any.
addActorAt (index As Int, actor As lgScn2DActor)
Adds an actor as a child of this group, at a specific index. The actor is first removed from its parent group, if any.
index: May be greater than the number of children.
addActorBefore (actorBefore As lgScn2DActor, actor As lgScn2DActor)
Adds an actor as a child of this group, immediately before another child actor. The actor is first removed from its parent
group, if any.
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
clear
Removes all children, actions, and listeners from this group.
clearActions
Removes all actions on this actor.
clearChildren
Removes all actors from this group.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
CullingArea As lgMathRectangle [write only]
Children completely outside of this rectangle will not be drawn. This is only valid for use with unrotated and unscaled
actors!
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Raises the Draw event of the group and its children. Typically this is called each frame by Stage.Draw.
lgSpriteBatch.Begin has already been called and the SpriteBatch has been transformed (if Transform was set to True).
ParentAlpha: Should be multiplied with the actor's alpha, allowing a parent's alpha to affect all children.
Example:
Sub MyGroup_Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
Dim Group As lgScn2DGroup = Sender
SpriteBatch.SetColorRGBA(Group.Color.R, Group.Color.G, Group.Color.B, Group.Color.A * ParentAlpha)
SpriteBatch.DrawRegion3(MyTexRegion, Group.X, Group.Y, Group.OriginX, Group.OriginY, Group.Width, Group.Height, Group.ScaleX, Group.ScaleY, Group.Rotation)
End Sub
findActor (name As String) As lgScn2DActor
Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the group.
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetActor (Index As Int) As lgScn2DActor
Returns the actor with the specified index in the group, or Null if index is out of bounds.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetChildrenList As lgArray
Returns an ordered list of child actors in this group.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasChildren As Boolean
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Returns the child actor with the highest z-index that contains the specified point and is touchable and visible, or Null if no actor was hit. The point is specified in the group's coordinate system (0,0 is the bottom left of the group and width,height is the upper right).
This function is used to delegate TouchDown and Enter/Exit events.
Touchable: If True, the hit detection will respect the touchability.
Initialize (EvtPrefix As String)
Creates a new group.
EvtPrefix: The prefix of Act and Draw events.
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this group to those of a descendant actor. The descendant does not need to be a direct child.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
Name As String
Gets or sets a name for easier identification of the actor in application code.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
print
Prints the actor hierarchy recursively for debugging purposes.
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
Removes an actor from this group. If the actor has actions, they are cleared.
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
swapActor (first As Int, second As Int) As Boolean
Swaps two actors by index. Returns false if the swap did not occur because the indexes were out of bounds.
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Swaps two actors. Returns false if the swap did not occur because the actors are not children of this group.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
When True, the SpriteBatch is transformed so children are drawn in their parent's coordinate system. This has a performance impact because lgSpriteBatch.Flush must be done before and after the transform. If the actors in a group are not rotated or scaled, then the transform for the group can be set to False. In this case, each child's position will be offset by the group's position for drawing, causing the children to appear in the correct location even though the SpriteBatch has not been transformed.
translate (x As Float, y As Float)
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
Act(Delta As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Align As Int
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
clear
clearActions
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Drawable As com.badlogic.gdx.scenes.scene2d.utils.Drawable
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetCaptureListenersList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
ImageHeight As Float [read only]
ImageWidth As Float [read only]
ImageX As Float [read only]
ImageY As Float [read only]
Initialize (EvtPrefix As String)
Initialize2 (Patch As lgNinePatch, EvtPrefix As String)
Initialize3 (Region As lgTextureRegion, EvtPrefix As String)
Initialize4 (Texture As lgTexture, EvtPrefix As String)
InitializeWithDrawable (Drawable As com.badlogic.gdx.scenes.scene2d.utils.Drawable, EvtPrefix As String)
InitializeWithDrawable2 (Drawable As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Scaling As com.badlogic.gdx.utils.Scaling, EvtPrefix As String)
InitializeWithDrawable3 (Drawable As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Scaling As com.badlogic.gdx.utils.Scaling, Alignment As Int, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
Scaling As com.badlogic.gdx.utils.Scaling [write only]
SCALING_Fill As com.badlogic.gdx.utils.Scaling
SCALING_FillX As com.badlogic.gdx.utils.Scaling
SCALING_FillY As com.badlogic.gdx.utils.Scaling
SCALING_Fit As com.badlogic.gdx.utils.Scaling
SCALING_None As com.badlogic.gdx.utils.Scaling
SCALING_Stretch As com.badlogic.gdx.utils.Scaling
SCALING_StretchX As com.badlogic.gdx.utils.Scaling
SCALING_StretchY As com.badlogic.gdx.utils.Scaling
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
Align As Int
Gets or sets the image alignment.
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
clear
Removes all actions and listeners on this actor.
clearActions
Removes all actions on this actor.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the image.
Drawable As com.badlogic.gdx.scenes.scene2d.utils.Drawable
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Checks whether this actor contains the specified point and is touchable. The point is specified in the actor's local coordinate system.
Returns the actor or Null.
Touchable: If True, the hit detection will respect the touchability.
ImageHeight As Float [read only]
ImageWidth As Float [read only]
ImageX As Float [read only]
ImageY As Float [read only]
Initialize (EvtPrefix As String)
Creates an image with no region or patch, stretched, and aligned center.
EvtPrefix: The prefix of Act events.
Initialize2 (Patch As lgNinePatch, EvtPrefix As String)
Creates an image stretched, and aligned center.
EvtPrefix: The prefix of Act events.
Initialize3 (Region As lgTextureRegion, EvtPrefix As String)
Creates an image stretched, and aligned center.
EvtPrefix: The prefix of Act events.
Initialize4 (Texture As lgTexture, EvtPrefix As String)
Creates an image stretched, and aligned center.
EvtPrefix: The prefix of Act events.
InitializeWithDrawable (Drawable As com.badlogic.gdx.scenes.scene2d.utils.Drawable, EvtPrefix As String)
Creates an image stretched, and aligned center.
EvtPrefix: The prefix of Act events.
InitializeWithDrawable2 (Drawable As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Scaling As com.badlogic.gdx.utils.Scaling, EvtPrefix As String)
Creates an image aligned center, with the specified scaling.
EvtPrefix: The prefix of Act events.
InitializeWithDrawable3 (Drawable As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Scaling As com.badlogic.gdx.utils.Scaling, Alignment As Int, EvtPrefix As String)
Creates an image with the specified scaling and alignment.
EvtPrefix: The prefix of Act events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget to its preferred width and height.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
Scaling As com.badlogic.gdx.utils.Scaling [write only]
SCALING_Fill As com.badlogic.gdx.utils.Scaling
SCALING_FillX As com.badlogic.gdx.utils.Scaling
SCALING_FillY As com.badlogic.gdx.utils.Scaling
SCALING_Fit As com.badlogic.gdx.utils.Scaling
SCALING_None As com.badlogic.gdx.utils.Scaling
SCALING_Stretch As com.badlogic.gdx.utils.Scaling
SCALING_StretchX As com.badlogic.gdx.utils.Scaling
SCALING_StretchY As com.badlogic.gdx.utils.Scaling
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Event for actor input: touch, mouse, keyboard, and scroll.
Events:
None
Members:
Bubbles As Boolean
cancel
Character As Char
handle
isCancelled As Boolean
isCapture As Boolean
isHandled As Boolean
isStopped As Boolean
isTouchFocusCancel As Boolean
KeyCode As Int
ListenerActor As lgScn2DActor [read only]
Pointer As Int
RelatedActor As lgScn2DActor [read only]
Stage As lgScn2DStage [read only]
StageX As Float
StageY As Float
stop
Target As lgScn2DActor [read only]
toCoordinates (actor As lgScn2DActor, actorCoords As lgMathVector2) As lgMathVector2
toString As String
Type As com.badlogic.gdx.scenes.scene2d.InputEvent.Type
Members description:
Bubbles As Boolean
If True, after the event is fired on the target actor, it will also be fired on each of the parent actors, all the way to the root.
cancel
Marks this event cancelled. This handles the event and stops the event propagation.
Character As Char
Gets or sets the character for the key that was typed. Valid for: keyTyped.
handle
Marks this event as handled. This does not affect event propagation inside Scene2d, but causes the Stage event handlers to return True, which will eat the event so it is not passed on to the application under the stage.
isCancelled As Boolean
isCapture As Boolean
Returns whether the event was fired during the capture phase.
isHandled As Boolean
isStopped As Boolean
isTouchFocusCancel As Boolean
Returns True if this event is a TouchUp triggered by CancelTouchFocus.
KeyCode As Int
Gets or sets the key code of the key that was pressed. Valid for: keyDown and keyUp.
ListenerActor As lgScn2DActor [read only]
Returns the actor that this listener is attached to.
Pointer As Int
Gets or sets the pointer index for the event. The first touch is index 0, second touch is index 1, etc. Valid for: touchDown, touchDragged, touchUp, enter, and exit.
RelatedActor As lgScn2DActor [read only]
The actor related to the event. Valid for: enter and exit. For enter, this is the actor being exited, or null. For exit,
this is the actor being entered, or null.
Stage As lgScn2DStage [read only]
The stage for the actor the event was fired on.
StageX As Float
Gets or sets the stage X coordinate where the event occurred. Valid for: touchDown, touchDragged, touchUp, enter, and exit.
StageY As Float
Gets or sets the stage Y coordinate where the event occurred. Valid for: touchDown, touchDragged, touchUp, enter, and exit.
stop
Marks this event has being stopped. This halts event propagation. Any other listeners on the listener actor are notified. After that, no other listeners are notified.
Target As lgScn2DActor [read only]
Returns the actor that the event originated from.
toCoordinates (actor As lgScn2DActor, actorCoords As lgMathVector2) As lgMathVector2
Sets actorCoords to this event's coordinates relative to the specified actor.
actorCoords: Output for resulting coordinates.
toString As String
Type As com.badlogic.gdx.scenes.scene2d.InputEvent.Type
Gets or sets the type of input event.
EventListener for low-level input events. Unpacks {@link InputEvent}s and calls the appropriate method. By default the methods
here do nothing with the event. Users are expected to override the methods they are interested in, like this:
actor.addListener(new InputListener() {
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
Gdx.app.log("Example", "touch started at (" + x + ", " + y + ")");
}
public void touchUp (InputEvent event, float x, float y, int pointer, int button) {
Gdx.app.log("Example", "touch done at (" + x + ", " + y + ")");
}
});
Events:
Enter(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int, FromActor As lgScn2DActor)
Exit(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int, ToActor As lgScn2DActor)
KeyDown(Event As lgScn2DInputEvent, KeyCode As Int)
KeyUp(Event As lgScn2DInputEvent, KeyCode As Int)
KeyTyped(Event As lgScn2DInputEvent, Character As Char)
TouchDown(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
TouchUp(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
TouchDragged(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
Members:
handle (e As lgScn2DEvent) As Boolean
Initialize (EvtPrefix As String) As lgScn2DInputListener
Members description:
handle (e As lgScn2DEvent) As Boolean
Try to handle the given event, if it is applicable.
Returns True if the event should be considered handled by scene2d.
Initialize (EvtPrefix As String) As lgScn2DInputListener
Creates an event listener for low-level input events. Returns the created instance.
EvtPrefix: Prefix of the input events.
Events:
Act(Delta As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AutoPack As Boolean
clear
clearActions
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Ellipse As Boolean [write only]
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
FontScaleX As Float
FontScaleY As Float
GetActionsList As lgArray
GetCaptureListenersList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (Text As CharSequence, Style As lgScn2DLabelStyle, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
setAlignment (labelAlign As Int, lineAlign As Int)
SetAlignment2 (WrapAlign As Int)
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setFontScale (fontScaleX As Float, fontScaleY As Float)
SetFontScale2 (FontScale As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Style As lgScn2DLabelStyle
Tag As Object
Text As CharSequence
TextBounds As lgBitmapFontTextBounds [read only]
textEquals (other As CharSequence) As Boolean
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
Wrap As Boolean [write only]
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AutoPack As Boolean
Gets or sets whether Pack is automatically called when the text is changed. Default is false.
clear
Removes all actions and listeners on this actor.
clearActions
Removes all actions on this actor.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the label.
Ellipse As Boolean [write only]
When true the text will be truncated with an ellipse if it does not fit within the width of the label. Default is false.
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
FontScaleX As Float
FontScaleY As Float
GetActionsList As lgArray
Gets an array of the actor's actions.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Checks whether this actor contains the specified point and is touchable. The point is specified in the actor's local coordinate system.
Returns the actor or Null.
Touchable: If True, the hit detection will respect the touchability.
Initialize (Text As CharSequence, Style As lgScn2DLabelStyle, EvtPrefix As String)
Creates a label.
EvtPrefix: The prefix of Act events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget to its preferred width and height.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
setAlignment (labelAlign As Int, lineAlign As Int)
labelAlign: Aligns all the text with the label widget.
lineAlign: Aligns each line of text (left, right, or center).
SetAlignment2 (WrapAlign As Int)
WrapAlign: Aligns each line of text horizontally and all the text vertically.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setFontScale (fontScaleX As Float, fontScaleY As Float)
SetFontScale2 (FontScale As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Style As lgScn2DLabelStyle
Gets or sets the label's style.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
Text As CharSequence
TextBounds As lgBitmapFontTextBounds [read only]
textEquals (other As CharSequence) As Boolean
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
Wrap As Boolean [write only]
If false, the text will only wrap where it contains newlines (\n). The preferred size of the label will be the text bounds.
If true, the text will word wrap using the width of the label. The preferred width of the label will be 0, it is expected
that the something external will set the width of the label. Default is false.
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Font As lgBitmapFont [write only]
fontColor As lgColor
Initialize (Font As lgBitmapFont, FontColor As lgColor)
Initialize2 (Style As lgScn2DLabelStyle)
Members description:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
Font As lgBitmapFont [write only]
fontColor As lgColor
Optional.
Initialize (Font As lgBitmapFont, FontColor As lgColor)
Initialize2 (Style As lgScn2DLabelStyle)
Events:
Act(Delta As Float)
Changed(SelectedIndex As Int, SelectedItem As String)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
clear
clearActions
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
CullingArea As lgMathRectangle [write only]
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetCaptureListenersList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (Items() As String, Style As lgScn2DListStyle, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
ItemHeight As Float [read only]
Items() As String
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Selectable As Boolean
SelectedIndex As Int
Selection As String [read only]
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
SetSelection (Item As String) As Int
setSize (width As Float, height As Float)
size (size As Float)
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Style As lgScn2DListStyle
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
clear
Removes all actions and listeners on this actor.
clearActions
Removes all actions on this actor.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
CullingArea As lgMathRectangle [write only]
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the list.
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Checks whether this actor contains the specified point and is touchable. The point is specified in the actor's local coordinate system.
Returns the actor or Null.
Touchable: If True, the hit detection will respect the touchability.
Initialize (Items() As String, Style As lgScn2DListStyle, EvtPrefix As String)
Creates a list box that displays textual items and highlights the selected item.
The preferred size of the list is determined by the text bounds of the items.
EvtPrefix: The prefix of Act and Changed events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
ItemHeight As Float [read only]
Items() As String
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget to its preferred width and height.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
Selectable As Boolean
Gets or sets whether this list's items are selectable. If not selectable, touch events will not be consumed.
SelectedIndex As Int
Gets or sets the index of the currently selected item. The top item has an index of 0. Nothing selected has an index of -1.
Selection As String [read only]
Returns the text of the currently selected item, or null if the list is empty or nothing is selected.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
SetSelection (Item As String) As Int
Sets the selection to the specified item if found, else sets the selection to nothing.
Returns the new selected index.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Style As lgScn2DListStyle
Gets or sets the list's style.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
Font As lgBitmapFont [write only]
fontColorSelected As lgColor
fontColorUnselected As lgColor
Initialize (Font As lgBitmapFont, FontColorSelected As lgColor, FontColorUnselected As lgColor, Selection As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DListStyle)
selection As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Members description:
Font As lgBitmapFont [write only]
fontColorSelected As lgColor
fontColorUnselected As lgColor
Initialize (Font As lgBitmapFont, FontColorSelected As lgColor, FontColorUnselected As lgColor, Selection As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DListStyle)
selection As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Events:
None
Members:
BottomHeight As Float
Draw (Batch As lgSpriteBatch, X As Float, Y As Float, Width As Float, Height As Float)
Initialize
Initialize2 (Patch As lgNinePatch)
Initialize3 (PatchDrw As lgScn2DNinePatchDrawable)
InternalObject As com.badlogic.gdx.scenes.scene2d.utils.NinePatchDrawable [read only]
LeftWidth As Float
MinHeight As Float
MinWidth As Float
NinePatch As lgNinePatch
RightWidth As Float
TopHeight As Float
Members description:
BottomHeight As Float
Draw (Batch As lgSpriteBatch, X As Float, Y As Float, Width As Float, Height As Float)
Draws this drawable at the specified bounds. The drawable should be tinted with lgSpriteBatch.Color, possibly by mixing its own color.
Initialize
Creates a NinePatchDrawable. The ninepatch must be set before use.
Initialize2 (Patch As lgNinePatch)
Creates a NinePatchDrawable.
Initialize3 (PatchDrw As lgScn2DNinePatchDrawable)
Creates a NinePatchDrawable.
InternalObject As com.badlogic.gdx.scenes.scene2d.utils.NinePatchDrawable [read only]
LeftWidth As Float
MinHeight As Float
MinWidth As Float
NinePatch As lgNinePatch
RightWidth As Float
TopHeight As Float
Events:
Act(Delta As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
cancel
CancelTouchFocus As Boolean [write only]
Clamp As Boolean [write only]
clear
clearActions
clearChildren
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
CullingArea As lgMathRectangle [write only]
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
FadeScrollBars As Boolean [write only]
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
fire (event As lgScn2DEvent) As Boolean
FlickScroll As Boolean [write only]
FlingTime As Float [write only]
GetActionsList As lgArray
GetActor (Index As Int) As lgScn2DActor
GetCaptureListenersList As lgArray
GetChildrenList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasChildren As Boolean
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (Widget As lgScn2DActor, Style As lgScn2DScrollPaneStyle, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
isDragging As Boolean
isFlinging As Boolean
isForceScrollX As Boolean
isForceScrollY As Boolean
isPanning As Boolean
isScrollX As Boolean
isScrollY As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MaxX As Float [read only]
MaxY As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
remove As Boolean
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
ScrollBarHeight As Float [read only]
ScrollbarsOnTop As Boolean [write only]
ScrollBarWidth As Float [read only]
ScrollPercentX As Float
ScrollPercentY As Float
scrollTo (x As Float, y As Float, width As Float, height As Float)
scrollToCenter (x As Float, y As Float, width As Float, height As Float)
ScrollX As Float
ScrollY As Float
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setForceScroll (x As Boolean, y As Boolean)
setOrigin (originX As Float, originY As Float)
setOverscroll (overscrollX As Boolean, overscrollY As Boolean)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setScrollingDisabled (x As Boolean, y As Boolean)
setSize (width As Float, height As Float)
setupFadeScrollBars (fadeAlphaSeconds As Float, fadeDelaySeconds As Float)
setupOverscroll (distance As Float, speedMin As Float, speedMax As Float)
size (size As Float)
SmoothScrolling As Boolean [write only]
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Style As lgScn2DScrollPaneStyle
swapActor (first As Int, second As Int) As Boolean
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
translate (x As Float, y As Float)
updateVisualScroll
validate
VelocityX As Float
VelocityY As Float
Visible As Boolean
VisualScrollX As Float [read only]
VisualScrollY As Float [read only]
Widget As lgScn2DActor
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
cancel
If currently scrolling by tracking a touch down, stop scrolling.
CancelTouchFocus As Boolean [write only]
When True (default), the touch focus is cancelled when flick scrolling begins. This causes widgets inside the scrollpane that have received TouchDown to receive TouchUp when flick scrolling begins.
Clamp As Boolean [write only]
For flick scroll, prevents scrolling out of the widget's bounds. Default is true.
clear
Removes all children, actions, and listeners from this group.
clearActions
Removes all actions on this actor.
clearChildren
Removes all actors from this group.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
CullingArea As lgMathRectangle [write only]
Children completely outside of this rectangle will not be drawn. This is only valid for use with unrotated and unscaled
actors!
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the ScrollPane.
FadeScrollBars As Boolean [write only]
When true the scroll bars fade out after some time of not being used.
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the group.
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
FlickScroll As Boolean [write only]
FlingTime As Float [write only]
For flick scroll, sets the amount of time in seconds that a fling will continue to scroll. Default is 1.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetActor (Index As Int) As lgScn2DActor
Returns the actor with the specified index in the group, or Null if index is out of bounds.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetChildrenList As lgArray
Returns an ordered list of child actors in this group.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasChildren As Boolean
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Returns the child actor with the highest z-index that contains the specified point and is touchable and visible, or Null if no actor was hit. The point is specified in the group's coordinate system (0,0 is the bottom left of the group and width,height is the upper right).
This function is used to delegate TouchDown and Enter/Exit events.
Touchable: If True, the hit detection will respect the touchability.
Initialize (Widget As lgScn2DActor, Style As lgScn2DScrollPaneStyle, EvtPrefix As String)
Creates a ScrollPane that scrolls a child widget using scrollbars and/or touch dragging.
Scrolling is automatically enabled when the widget is larger than the scroll pane. If the widget is smaller than the scroll pane in one direction, it is sized to the scroll pane in that direction.
EvtPrefix: The prefix of Act events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
isDragging As Boolean
isFlinging As Boolean
isForceScrollX As Boolean
isForceScrollY As Boolean
isPanning As Boolean
isScrollX As Boolean
isScrollY As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this group to those of a descendant actor. The descendant does not need to be a direct child.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MaxX As Float [read only]
Returns the maximum scroll value in the x direction.
MaxY As Float [read only]
Returns the maximum scroll value in the y direction.
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget group to its preferred width and height.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
Prints the actor hierarchy recursively for debugging purposes.
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
Removes an actor from this group. If the actor has actions, they are cleared.
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
ScrollBarHeight As Float [read only]
ScrollbarsOnTop As Boolean [write only]
When False (the default), the widget is clipped so it is not drawn under the scrollbars. When True, the widget is clipped to the entire scroll pane bounds and the scrollbars are drawn on top of the widget. If FadeScrollBars is True, the scroll bars are always drawn on top.
ScrollBarWidth As Float [read only]
ScrollPercentX As Float
ScrollPercentY As Float
scrollTo (x As Float, y As Float, width As Float, height As Float)
Sets the scroll offset so the specified rectangle is fully in view, if possible. Coordinates are in the scroll pane widget's
coordinate system.
scrollToCenter (x As Float, y As Float, width As Float, height As Float)
Sets the scroll offset so the specified rectangle is fully in view and centered vertically in the scroll pane, if possible.
Coordinates are in the scroll pane widget's coordinate system.
ScrollX As Float
Returns the x scroll position in pixels.
ScrollY As Float
Returns the y scroll position in pixels.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setForceScroll (x As Boolean, y As Boolean)
Forces enabling scrollbars (for non-flick scroll) and overscrolling (for flick scroll) in a direction, even if the contents
do not exceed the bounds in that direction.
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setOverscroll (overscrollX As Boolean, overscrollY As Boolean)
For flick scroll, if true the widget can be scrolled slightly past its bounds and will animate back to its bounds when
scrolling is stopped. Default is true.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setScrollingDisabled (x As Boolean, y As Boolean)
Disables scrolling in a direction. The widget will be sized to the FlickScrollPane in the disabled direction.
setSize (width As Float, height As Float)
Sets the width and height.
setupFadeScrollBars (fadeAlphaSeconds As Float, fadeDelaySeconds As Float)
setupOverscroll (distance As Float, speedMin As Float, speedMax As Float)
For flick scroll, sets the overscroll distance in pixels and the speed it returns to the widget's bounds in seconds. Default
is 50, 30, 200.
size (size As Float)
Adds the specified size to the current size.
SmoothScrolling As Boolean [write only]
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Style As lgScn2DScrollPaneStyle
Gets or sets the ScrollPane's style.
swapActor (first As Int, second As Int) As Boolean
Swaps two actors by index. Returns false if the swap did not occur because the indexes were out of bounds.
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Swaps two actors. Returns false if the swap did not occur because the actors are not children of this group.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
When True, the SpriteBatch is transformed so children are drawn in their parent's coordinate system. This has a performance impact because lgSpriteBatch.Flush must be done before and after the transform. If the actors in a group are not rotated or scaled, then the transform for the group can be set to False. In this case, each child's position will be offset by the group's position for drawing, causing the children to appear in the correct location even though the SpriteBatch has not been transformed.
translate (x As Float, y As Float)
updateVisualScroll
Sets the visual scroll amount equal to the scroll amount. This can be used when setting the scroll amount without animating.
validate
VelocityX As Float
Gets the flick scroll y velocity.
VelocityY As Float
Gets the flick scroll y velocity.
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
VisualScrollX As Float [read only]
VisualScrollY As Float [read only]
Widget As lgScn2DActor
Gets or sets the widget embedded in this scroll pane. Set to Null to remove the current widget.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
corner As com.badlogic.gdx.scenes.scene2d.utils.Drawable
hScroll As com.badlogic.gdx.scenes.scene2d.utils.Drawable
hScrollKnob As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Initialize (Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable, HScroll As com.badlogic.gdx.scenes.scene2d.utils.Drawable, HScrollKnob As com.badlogic.gdx.scenes.scene2d.utils.Drawable, VScroll As com.badlogic.gdx.scenes.scene2d.utils.Drawable, VScrollKnob As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DScrollPaneStyle)
SetScrollbarHeight (Height As Float)
SetScrollbarWidth (Width As Float)
vScroll As com.badlogic.gdx.scenes.scene2d.utils.Drawable
vScrollKnob As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Members description:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
corner As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
hScroll As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
hScrollKnob As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
Initialize (Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable, HScroll As com.badlogic.gdx.scenes.scene2d.utils.Drawable, HScrollKnob As com.badlogic.gdx.scenes.scene2d.utils.Drawable, VScroll As com.badlogic.gdx.scenes.scene2d.utils.Drawable, VScrollKnob As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DScrollPaneStyle)
SetScrollbarHeight (Height As Float)
Sets the MinHeight of the hScroll and hScrollKnob drawables.
SetScrollbarWidth (Width As Float)
Sets the MinWidth of the vScroll and vScrollKnob drawables.
vScroll As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
vScrollKnob As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
Events:
Act(Delta As Float)
Changed(SelectedIndex As Int, SelectedItem As String)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
clear
clearActions
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
Disabled As Boolean [write only]
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetCaptureListenersList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasParent As Boolean
Height As Float
hideList
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (Items() As String, Style As lgScn2DSelectBoxStyle, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
Items() As String
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxListCount As Int
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SelectedIndex As Int
Selection As String [read only]
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
SetSelection (Item As String)
setSize (width As Float, height As Float)
size (size As Float)
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Style As lgScn2DSelectBoxStyle
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
clear
Removes all actions and listeners on this actor.
clearActions
Removes all actions on this actor.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
Disabled As Boolean [write only]
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the SelectBox.
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hideList
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Checks whether this actor contains the specified point and is touchable. The point is specified in the actor's local coordinate system.
Returns the actor or Null.
Touchable: If True, the hit detection will respect the touchability.
Initialize (Items() As String, Style As lgScn2DSelectBoxStyle, EvtPrefix As String)
Creates a drop-down list.
The preferred size of the select box is determined by the maximum text bounds of the items.
EvtPrefix: The prefix of Act and Changed events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
Items() As String
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxListCount As Int
Set the max number of items to display when the select box is opened. Set to 0 (the default) to display as many as fit in
the stage height.
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget to its preferred width and height.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SelectedIndex As Int
Gets or sets the index of the currently selected item. The top item has an index of 0. Nothing selected has an index of -1.
Selection As String [read only]
Returns the string of the currently selected item.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
SetSelection (Item As String)
Sets the selection to the specified item if found, else sets the selection to nothing.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Style As lgScn2DSelectBoxStyle
Gets or sets the SelectBox's style.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
backgroundDisabled As com.badlogic.gdx.scenes.scene2d.utils.Drawable
backgroundOpen As com.badlogic.gdx.scenes.scene2d.utils.Drawable
backgroundOver As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabledFontColor As lgColor
Font As lgBitmapFont [write only]
fontColor As lgColor
Initialize (Font As lgBitmapFont, FontColor As lgColor, Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DSelectBoxStyle)
ListStyle As lgScn2DListStyle [write only]
ScrollStyle As lgScn2DScrollPaneStyle [write only]
Members description:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
backgroundDisabled As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
backgroundOpen As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
backgroundOver As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
disabledFontColor As lgColor
Optional.
Font As lgBitmapFont [write only]
fontColor As lgColor
Initialize (Font As lgBitmapFont, FontColor As lgColor, Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DSelectBoxStyle)
ListStyle As lgScn2DListStyle [write only]
ScrollStyle As lgScn2DScrollPaneStyle [write only]
Events:
Act(Delta As Float)
Changed(NewValue As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
AnimateDuration As Float [write only]
AnimateInterpolation As lgMathInterpolation [write only]
clear
clearActions
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
Disabled As Boolean
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetCaptureListenersList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (Min As Float, Max As Float, StepSize As Float, Vertical As Boolean, Style As lgScn2DSliderStyle, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
isDragging As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxValue As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinValue As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setRange (min As Float, max As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
setSnapToValues (values() As Float, threshold As Float)
SetValue (Value As Float) As Boolean
size (size As Float)
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
StepSize As Float
Style As lgScn2DSliderStyle
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Value As Float
Visible As Boolean
VisualValue As Float [read only]
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
AnimateDuration As Float [write only]
If > 0, changes to the slider value via Value or SetValue will happen over this duration in seconds.
AnimateInterpolation As lgMathInterpolation [write only]
Sets the interpolation to use for AnimateDuration.
clear
Removes all actions and listeners on this actor.
clearActions
Removes all actions on this actor.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
Disabled As Boolean
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the slider.
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Checks whether this actor contains the specified point and is touchable. The point is specified in the actor's local coordinate system.
Returns the actor or Null.
Touchable: If True, the hit detection will respect the touchability.
Initialize (Min As Float, Max As Float, StepSize As Float, Vertical As Boolean, Style As lgScn2DSliderStyle, EvtPrefix As String)
Creates a new slider. Its width is determined by the PrefWidth parameter, and its height is determined by the maximum of the height of either the background NinePatch or the knob TextureRegion.
The Min and Max values determine the range the values of this slider can take on. The StepSize parameter specifies the distance between individual values. E.g. Min could be 4, Max could be 10 and StepSize could be 0.2, giving you a total of 31 values: 4.0, 4.2, 4.4 and so on.
EvtPrefix: The prefix of Act and Changed events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
isDragging As Boolean
Returns true if the slider is being dragged.
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxValue As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinValue As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget to its preferred width and height.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setRange (min As Float, max As Float)
Sets the range of this slider. The slider's current value is reset to min.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
setSnapToValues (values() As Float, threshold As Float)
Will make this slider snap to the specified values, if the knob is within the threshold
SetValue (Value As Float) As Boolean
Sets the slider position, rounded to the nearest step size and clamped to the minimum and maximum values.
Returns False if the value was not changed because the slider already had the value or it was canceled by a listener.
size (size As Float)
Adds the specified size to the current size.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
StepSize As Float
Sets the step size of the slider
Style As lgScn2DSliderStyle
Gets or sets the slider's style.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Value As Float
Gets or sets the slider position, rounded to the nearest step size and clamped to the minimum and maximum values.
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
VisualValue As Float [read only]
If animating the slider value, this returns the value currently displayed.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabledBackground As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabledKnob As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabledKnobAfter As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabledKnobBefore As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Initialize (Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Knob As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DSliderStyle)
knob As com.badlogic.gdx.scenes.scene2d.utils.Drawable
knobAfter As com.badlogic.gdx.scenes.scene2d.utils.Drawable
knobBefore As com.badlogic.gdx.scenes.scene2d.utils.Drawable
SetKnobSize (Width As Float, Height As Float)
Members description:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
The slider background, stretched only in one direction.
disabledBackground As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
disabledKnob As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional, centered on the background.
disabledKnobAfter As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
disabledKnobBefore As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
Initialize (Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Knob As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DSliderStyle)
knob As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional, centered on the background.
knobAfter As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
knobBefore As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
SetKnobSize (Width As Float, Height As Float)
Sets the MinWidth and MinHeight of the Knob, knobAfter and knobBefore drawables.
Events:
TouchDown(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
TouchDragged(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
Act(Delta As Float)
Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
clear
clearActions
clearChildren
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
CullingArea As lgMathRectangle [write only]
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
fire (event As lgScn2DEvent) As Boolean
FirstWidget As lgScn2DActor
GetActionsList As lgArray
GetActor (Index As Int) As lgScn2DActor
GetCaptureListenersList As lgArray
GetChildrenList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasChildren As Boolean
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (FirstWidget As lgScn2DActor, SecondWidget As lgScn2DActor, Vertical As Boolean, Style As lgScn2DSplitPaneStyle, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxSplitAmount As Float
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinSplitAmount As Float
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
remove As Boolean
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SecondWidget As lgScn2DActor
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
SplitAmount As Float
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Style As lgScn2DSplitPaneStyle
swapActor (first As Int, second As Int) As Boolean
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
translate (x As Float, y As Float)
validate
Vertical As Boolean
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
clear
Removes all children, actions, and listeners from this group.
clearActions
Removes all actions on this actor.
clearChildren
Removes all actors from this group.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
CullingArea As lgMathRectangle [write only]
Children completely outside of this rectangle will not be drawn. This is only valid for use with unrotated and unscaled
actors!
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the SplitPane.
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the group.
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
FirstWidget As lgScn2DActor
GetActionsList As lgArray
Gets an array of the actor's actions.
GetActor (Index As Int) As lgScn2DActor
Returns the actor with the specified index in the group, or Null if index is out of bounds.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetChildrenList As lgArray
Returns an ordered list of child actors in this group.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasChildren As Boolean
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Returns the child actor with the highest z-index that contains the specified point and is touchable and visible, or Null if no actor was hit. The point is specified in the group's coordinate system (0,0 is the bottom left of the group and width,height is the upper right).
This function is used to delegate TouchDown and Enter/Exit events.
Touchable: If True, the hit detection will respect the touchability.
Initialize (FirstWidget As lgScn2DActor, SecondWidget As lgScn2DActor, Vertical As Boolean, Style As lgScn2DSplitPaneStyle, EvtPrefix As String)
Creates a container that contains two widgets and is divided either horizontally or vertically. The user may resize the widgets. The child widgets are always sized to fill their half of the splitpane.
The preferred size of a SplitPane is that of the child widgets and the size of the lgScn2DSplitPaneStyle.handle. The widgets are sized depending on the SplitPane's size and the split position.
EvtPrefix: The prefix of Act, Draw and Touch events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this group to those of a descendant actor. The descendant does not need to be a direct child.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxSplitAmount As Float
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinSplitAmount As Float
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget group to its preferred width and height.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
Prints the actor hierarchy recursively for debugging purposes.
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SecondWidget As lgScn2DActor
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
SplitAmount As Float
Gets or sets the split amount between the min and max amount.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Style As lgScn2DSplitPaneStyle
Gets or sets the SplitPane's style.
swapActor (first As Int, second As Int) As Boolean
Swaps two actors by index. Returns false if the swap did not occur because the indexes were out of bounds.
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Swaps two actors. Returns false if the swap did not occur because the actors are not children of this group.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
When True, the SpriteBatch is transformed so children are drawn in their parent's coordinate system. This has a performance impact because lgSpriteBatch.Flush must be done before and after the transform. If the actors in a group are not rotated or scaled, then the transform for the group can be set to False. In this case, each child's position will be offset by the group's position for drawing, causing the children to appear in the correct location even though the SpriteBatch has not been transformed.
translate (x As Float, y As Float)
validate
Vertical As Boolean
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
handle As com.badlogic.gdx.scenes.scene2d.utils.Drawable
HorizontalHandleSize As Float [write only]
Initialize (Handle As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DSplitPaneStyle)
VerticalHandleSize As Float [write only]
Members description:
handle As com.badlogic.gdx.scenes.scene2d.utils.Drawable
HorizontalHandleSize As Float [write only]
Sets the MinWidth of the handle drawable.
Initialize (Handle As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DSplitPaneStyle)
VerticalHandleSize As Float [write only]
Sets the MinHeight of the handle drawable.
Events:
None
Members:
BottomHeight As Float
Draw (Batch As lgSpriteBatch, X As Float, Y As Float, Width As Float, Height As Float)
Initialize
Initialize2 (Sprite As lgSprite)
Initialize3 (SpriteDrw As lgScn2DSpriteDrawable)
InternalObject As com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable [read only]
LeftWidth As Float
MinHeight As Float
MinWidth As Float
RightWidth As Float
Sprite As lgSprite
TopHeight As Float
Members description:
BottomHeight As Float
Draw (Batch As lgSpriteBatch, X As Float, Y As Float, Width As Float, Height As Float)
Draws this drawable at the specified bounds. The drawable should be tinted with lgSpriteBatch.Color, possibly by mixing its own color.
Initialize
Creates a SpriteDrawable. The sprite must be set before use.
Initialize2 (Sprite As lgSprite)
Creates a SpriteDrawable.
Initialize3 (SpriteDrw As lgScn2DSpriteDrawable)
Creates a SpriteDrawable.
InternalObject As com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable [read only]
LeftWidth As Float
MinHeight As Float
MinWidth As Float
RightWidth As Float
Sprite As lgSprite
TopHeight As Float
A stack is a container that sizes its children to its size and positions them at 0,0 on top of each other.
The preferred and min size of the stack is the largest preferred and min size of any children. The max size of the stack is the
smallest max size of any children.
Events:
Act(Delta As Float)
Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addActor (actor As lgScn2DActor)
addActorAfter (actorAfter As lgScn2DActor, actor As lgScn2DActor)
addActorAt (index As Int, actor As lgScn2DActor)
addActorBefore (actorBefore As lgScn2DActor, actor As lgScn2DActor)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
clear
clearActions
clearChildren
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
CullingArea As lgMathRectangle [write only]
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetActor (Index As Int) As lgScn2DActor
GetCaptureListenersList As lgArray
GetChildrenList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasChildren As Boolean
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
remove As Boolean
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
swapActor (first As Int, second As Int) As Boolean
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addActor (actor As lgScn2DActor)
Adds an actor as a child of this group. The actor is first removed from its parent group, if any.
addActorAfter (actorAfter As lgScn2DActor, actor As lgScn2DActor)
Adds an actor as a child of this group, immediately after another child actor. The actor is first removed from its parent
group, if any.
addActorAt (index As Int, actor As lgScn2DActor)
Adds an actor as a child of this group, at a specific index. The actor is first removed from its parent group, if any.
index: May be greater than the number of children.
addActorBefore (actorBefore As lgScn2DActor, actor As lgScn2DActor)
Adds an actor as a child of this group, immediately before another child actor. The actor is first removed from its parent
group, if any.
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
clear
Removes all children, actions, and listeners from this group.
clearActions
Removes all actions on this actor.
clearChildren
Removes all actors from this group.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
CullingArea As lgMathRectangle [write only]
Children completely outside of this rectangle will not be drawn. This is only valid for use with unrotated and unscaled
actors!
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Raises the Draw event of the group and its children. Typically this is called each frame by Stage.Draw.
lgSpriteBatch.Begin has already been called and the SpriteBatch has been transformed (if Transform was set to True).
ParentAlpha: Should be multiplied with the actor's alpha, allowing a parent's alpha to affect all children.
Example:
Sub MyGroup_Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
Dim Group As lgScn2DGroup = Sender
SpriteBatch.SetColorRGBA(Group.Color.R, Group.Color.G, Group.Color.B, Group.Color.A * ParentAlpha)
SpriteBatch.DrawRegion3(MyTexRegion, Group.X, Group.Y, Group.OriginX, Group.OriginY, Group.Width, Group.Height, Group.ScaleX, Group.ScaleY, Group.Rotation)
End Sub
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the group.
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetActor (Index As Int) As lgScn2DActor
Returns the actor with the specified index in the group, or Null if index is out of bounds.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetChildrenList As lgArray
Returns an ordered list of child actors in this group.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasChildren As Boolean
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Returns the child actor with the highest z-index that contains the specified point and is touchable and visible, or Null if no actor was hit. The point is specified in the group's coordinate system (0,0 is the bottom left of the group and width,height is the upper right).
This function is used to delegate TouchDown and Enter/Exit events.
Touchable: If True, the hit detection will respect the touchability.
Initialize (EvtPrefix As String)
Creates a new group.
EvtPrefix: The prefix of Act and Draw events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this group to those of a descendant actor. The descendant does not need to be a direct child.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget group to its preferred width and height.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
Prints the actor hierarchy recursively for debugging purposes.
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
Removes an actor from this group. If the actor has actions, they are cleared.
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
swapActor (first As Int, second As Int) As Boolean
Swaps two actors by index. Returns false if the swap did not occur because the indexes were out of bounds.
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Swaps two actors. Returns false if the swap did not occur because the actors are not children of this group.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
When True, the SpriteBatch is transformed so children are drawn in their parent's coordinate system. This has a performance impact because lgSpriteBatch.Flush must be done before and after the transform. If the actors in a group are not rotated or scaled, then the transform for the group can be set to False. In this case, each child's position will be offset by the group's position for drawing, causing the children to appear in the correct location even though the SpriteBatch has not been transformed.
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
Act
Act2 (Delta As Float)
AddAction (Action As lgScn2DAction)
AddActor (Actor As lgScn2DActor)
AddCaptureListener (CListener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
AddListener (Listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
AddTouchFocus (Listener As com.badlogic.gdx.scenes.scene2d.EventListener, ListenerActor As lgScn2DActor, Target As lgScn2DActor, Pointer As Int)
Camera As lgOrthographicCamera
CancelTouchFocus
CancelTouchFocus2 (Listener As com.badlogic.gdx.scenes.scene2d.EventListener, Actor As lgScn2DActor)
Clear
dispose
Draw
GetActorsList As lgArray
GutterHeight As Float [read only]
GutterWidth As Float [read only]
Height As Float [read only]
Hit (StageX As Float, StageY As Float, Touchable As Boolean) As lgScn2DActor
Initialize (EvtPrefix As String)
Initialize2 (Width As Float, Height As Float, KeepAspectRatio As Boolean, EvtPrefix As String)
Initialize3 (Width As Float, Height As Float, KeepAspectRatio As Boolean, SpriteBatch As lgSpriteBatch, EvtPrefix As String)
InternalObject As com.badlogic.gdx.scenes.scene2d.Stage [read only]
KeyboardFocus As lgScn2DActor
RemoveCaptureListener (CListener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
RemoveListener (Listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
RemoveTouchFocus (Listener As com.badlogic.gdx.scenes.scene2d.EventListener, ListenerActor As lgScn2DActor, Target As lgScn2DActor, Pointer As Int)
Root As lgScn2DGroup [read only]
ScreenToStageCoordinates (ScreenCoords As lgMathVector2) As lgMathVector2
SetViewport (Width As Float, Height As Float, KeepAspectRatio As Boolean)
SpriteBatch As lgSpriteBatch [read only]
StageToScreenCoordinates (StageCoords As lgMathVector2) As lgMathVector2
toScreenCoordinates (Coords As lgMathVector2, TransformMatrix As lgMathMatrix4) As lgMathVector2
Unfocus (Actor As lgScn2DActor)
UnfocusAll
Width As Float [read only]
Members description:
Act
Calls Act2 with lgGraphics.DeltaTime.
Act2 (Delta As Float)
Calls the Act function of each actor in the stage. Typically called each frame. This method also fires Enter and Exit events.
AddAction (Action As lgScn2DAction)
Adds the given action to the root of the stage.
AddActor (Actor As lgScn2DActor)
Adds the given actor to the root of the stage.
AddCaptureListener (CListener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a capture listener to the root.
AddListener (Listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a regular listener to the root.
AddTouchFocus (Listener As com.badlogic.gdx.scenes.scene2d.EventListener, ListenerActor As lgScn2DActor, Target As lgScn2DActor, Pointer As Int)
Adds the listener to be notified for all TouchDragged and TouchUp events for the specified pointer.
ListenerActor: The actor that the listener is attached to.
Target: The actor that events will originate from.
Camera As lgOrthographicCamera
Gets or sets the stage's camera. The camera must be configured properly or SetViewport can be called after the camera is set. Draw will call Camera.Update and use the Camera.Combined matrix for the SpriteBatch projection matrix.
CancelTouchFocus
Sends a TouchUp event to all listeners that are registered to receive TouchDragged and TouchUp events and removes their touch focus. The location of the TouchUp is -2147483648. Listeners can use isTouchFocusCancel to ignore this event if needed.
CancelTouchFocus2 (Listener As com.badlogic.gdx.scenes.scene2d.EventListener, Actor As lgScn2DActor)
Cancels touch focus for all listeners except the specified listener.
Clear
Removes the root's children, actions, and listeners.
dispose
Releases all resources of this stage.
Draw
GetActorsList As lgArray
Gets an array of the child actors of the root group.
GutterHeight As Float [read only]
Returns half the amount in the Y direction that the stage's viewport was lengthened to fill the screen.
GutterWidth As Float [read only]
Returns half the amount in the X direction that the stage's viewport was lengthened to fill the screen.
Height As Float [read only]
Returns the height of the stage's viewport.
Hit (StageX As Float, StageY As Float, Touchable As Boolean) As lgScn2DActor
Returns the Actor with the highest z-index at the specified location in stage coordinates, or Null if no actor was hit.
To get stage coordinates from screen coordinates, use screenToStageCoordinates.
Touchable: If true, the hit detection will respect the touchability.
Initialize (EvtPrefix As String)
Creates a stage with a viewport equal to the device screen resolution. The stage will use its own SpriteBatch, which will be disposed when the stage is disposed.
EvtPrefix: The prefix of the Act and Draw events of the root group.
Initialize2 (Width As Float, Height As Float, KeepAspectRatio As Boolean, EvtPrefix As String)
Creates a stage with the specified viewport. The stage will use its own SpriteBatch, which will be disposed when the stage is disposed.
KeepAspectRatio: False = the stage is stretched to fill the viewport, which may distort the aspect ratio. True = the stage is first scaled to fit the viewport in the longest dimension. Next the shorter dimension is lengthened to fill the viewport, which keeps the aspect ratio from changing.
EvtPrefix: The prefix of the Act and Draw events of the root group.
Initialize3 (Width As Float, Height As Float, KeepAspectRatio As Boolean, SpriteBatch As lgSpriteBatch, EvtPrefix As String)
Creates a stage with the specified viewport and SpriteBatch. This can be used to avoid creating a new SpriteBatch (which can be somewhat slow) if multiple stages are used during an application's life time.
The SpriteBatch will not be disposed if Dispose is called. You have to handle disposal yourself.
KeepAspectRatio: False = the stage is stretched to fill the viewport, which may distort the aspect ratio. True = the stage is first scaled to fit the viewport in the longest dimension. Next the shorter dimension is lengthened to fill the viewport, which keeps the aspect ratio from changing.
EvtPrefix: The prefix of the Act and Draw events of the root group.
InternalObject As com.badlogic.gdx.scenes.scene2d.Stage [read only]
KeyboardFocus As lgScn2DActor
Gets or sets the actor that will receive key events. May be null.
RemoveCaptureListener (CListener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Removes a capture listener from the root.
RemoveListener (Listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Removes a regular listener from the root.
RemoveTouchFocus (Listener As com.badlogic.gdx.scenes.scene2d.EventListener, ListenerActor As lgScn2DActor, Target As lgScn2DActor, Pointer As Int)
Removes the listener from being notified for all TouchDragged and TouchUp events for the specified pointer. Note the listener may never receive a TouchUp event if this method is used.
Root As lgScn2DGroup [read only]
Returns the root group which holds all actors in the stage.
ScreenToStageCoordinates (ScreenCoords As lgMathVector2) As lgMathVector2
Transforms the screen coordinates to stage coordinates.
ScreenCoords: Input screen coordinates and output for resulting stage coordinates.
SetViewport (Width As Float, Height As Float, KeepAspectRatio As Boolean)
Sets up the stage size using a viewport that fills the entire screen.
SpriteBatch As lgSpriteBatch [read only]
StageToScreenCoordinates (StageCoords As lgMathVector2) As lgMathVector2
Transforms the stage coordinates to screen coordinates.
StageCoords: Input stage coordinates and output for resulting screen coordinates.
toScreenCoordinates (Coords As lgMathVector2, TransformMatrix As lgMathMatrix4) As lgMathVector2
Transforms the coordinates to screen coordinates. The coordinates can be anywhere in the stage since the transform matrix
describes how to convert them. The transform matrix is typically obtained from lgSpriteBatch.TransformMatrix during Draw.
Unfocus (Actor As lgScn2DActor)
Removes the touch and keyboard focus for the specified actor and any descendants.
UnfocusAll
Removes the touch and keyboard focus for all focused actors.
Width As Float [read only]
Returns the width of the stage's viewport.
Events:
Act(Delta As Float)
Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
AddActor (Widget As lgScn2DActor) As lgScn2DTableCell
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
AddCell As lgScn2DTableCell
AddLabel (Text As String, Style As lgScn2DLabelStyle) As lgScn2DTableCell
AddLabel2 (Text As String, Font As lgBitmapFont, FontColor As lgColor) As lgScn2DTableCell
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Align As Int
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AlignBottom As lgScn2DTable
AlignCenter As lgScn2DTable
AlignLeft As lgScn2DTable
AlignRight As lgScn2DTable
AlignTop As lgScn2DTable
Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
clear
clearActions
clearChildren
clearListeners
Clip As Boolean [write only]
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
ColumnDefaults (Column As Int) As lgScn2DTableCell
CullingArea As lgMathRectangle [write only]
DebugAll
DebugCell As lgScn2DTable
DebugTable As lgScn2DTable
DebugWidget As lgScn2DTable
Defaults As lgScn2DTableCell
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
DrawDebug (Stage As lgScn2DStage)
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetActor (Index As Int) As lgScn2DActor
GetCaptureListenersList As lgArray
GetCell (Widget As lgScn2DActor) As lgScn2DTableCell
GetCell2 (Index As Int) As lgScn2DTableCell
GetCellsList (lstCells As List)
GetChildrenList As lgArray
GetListenersList As lgArray
getRow (y As Float) As Int
HasActions As Boolean [read only]
hasChildren As Boolean
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
NewRow As lgScn2DTableCell
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
PadBottom As Float [read only]
PadLeft As Float [read only]
PadRight As Float [read only]
PadTop As Float [read only]
PadX As Float [read only]
PadY As Float [read only]
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
remove As Boolean
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Reset
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
Round As Boolean [write only]
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
Stack (Actors() As lgScn2DActor) As lgScn2DTableCell
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
swapActor (first As Int, second As Int) As Boolean
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
AddActor (Widget As lgScn2DActor) As lgScn2DTableCell
Adds a new cell to the table with the specified widget.
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
AddCell As lgScn2DTableCell
Adds a cell without a widget.
AddLabel (Text As String, Style As lgScn2DLabelStyle) As lgScn2DTableCell
Adds a new cell with a label. The label is created with the specified text and style.
AddLabel2 (Text As String, Font As lgBitmapFont, FontColor As lgColor) As lgScn2DTableCell
Adds a new cell with a label. The label is created with the specified text, font and color.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
Align As Int
Sets the alignment of the logical table within the table widget. Set to one of the ALIGN constants, or any combination of those.
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AlignBottom As lgScn2DTable
Adds ALIGN_Bottom and clears ALIGN_Top for the alignment of the logical table within the table widget.
AlignCenter As lgScn2DTable
Sets the alignment of the logical table within the table widget to ALIGN_Center. This clears any other alignment.
AlignLeft As lgScn2DTable
Adds ALIGN_Left and clears ALIGN_Right for the alignment of the logical table within the table widget.
AlignRight As lgScn2DTable
Adds ALIGN_Right and clears ALIGN_Left for the alignment of the logical table within the table widget.
AlignTop As lgScn2DTable
Adds ALIGN_Top and clears ALIGN_Bottom for the alignment of the logical table within the table widget.
Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Gets or sets the background drawable.
The table's padding is set to BottomHeight, TopHeight, LeftWidth, and RightWidth of the drawable.
clear
Removes all children, actions, and listeners from this group.
clearActions
Removes all actions on this actor.
clearChildren
Removes all actors and cells from the table.
clearListeners
Removes all listeners on this actor.
Clip As Boolean [write only]
Causes the contents to be clipped if they exceed the table widget bounds. Enabling clipping will set Transform to True.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
ColumnDefaults (Column As Int) As lgScn2DTableCell
Gets the cell values that will be used as the defaults for all cells in the specified column. Columns are indexed starting at 0.
CullingArea As lgMathRectangle [write only]
Children completely outside of this rectangle will not be drawn. This is only valid for use with unrotated and unscaled
actors!
DebugAll
Turns on all debug lines.
DebugCell As lgScn2DTable
Turns on cell debug lines.
DebugTable As lgScn2DTable
Turns on table debug lines.
DebugWidget As lgScn2DTable
Turns on widget debug lines.
Defaults As lgScn2DTableCell
Returns the cell values that will be used as the defaults for all cells.
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the table.
DrawDebug (Stage As lgScn2DStage)
Draws the debug lines for all tables in the stage. If this method is not called each frame, no debug lines will be drawn. If
debug is never turned on for any table in the application, calling this method will have no effect. If a table has ever had
debug set, calling this method causes an expensive traversal of all actors in the stage.
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the group.
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetActor (Index As Int) As lgScn2DActor
Returns the actor with the specified index in the group, or Null if index is out of bounds.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetCell (Widget As lgScn2DActor) As lgScn2DTableCell
Returns the cell for the specified widget in this table, or null.
GetCell2 (Index As Int) As lgScn2DTableCell
Returns the cell with the specified index, or Null if index is out of bounds.
GetCellsList (lstCells As List)
Fills the given list with all cells of this table.
GetChildrenList As lgArray
Returns an ordered list of child actors in this group.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
getRow (y As Float) As Int
Returns the row index for the y coordinate.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasChildren As Boolean
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Returns the child actor with the highest z-index that contains the specified point and is touchable and visible, or Null if no actor was hit. The point is specified in the group's coordinate system (0,0 is the bottom left of the group and width,height is the upper right).
This function is used to delegate TouchDown and Enter/Exit events.
Touchable: If True, the hit detection will respect the touchability.
Initialize (EvtPrefix As String)
Creates a new table.
EvtPrefix: The prefix of Act and Draw events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this group to those of a descendant actor. The descendant does not need to be a direct child.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
NewRow As lgScn2DTableCell
Indicates that subsequent cells should be added to a new row.
Returns the cell values that will be used as the defaults for all cells in the new row.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget group to its preferred width and height.
PadBottom As Float [read only]
PadLeft As Float [read only]
PadRight As Float [read only]
PadTop As Float [read only]
PadX As Float [read only]
Returns PadLeft plus PadRight.
PadY As Float [read only]
Returns PadTop plus PadBottom.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
Prints the actor hierarchy recursively for debugging purposes.
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
Removes an actor from this group. If the actor has actions, they are cleared.
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Reset
Removes all actors and cells from the table (same as ClearChildren) and additionally resets all table properties and cell, column, and row defaults.
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
Round As Boolean [write only]
If true (the default), positions and sizes are rounded to integers.
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stack (Actors() As lgScn2DActor) As lgScn2DTableCell
Adds a new cell to the table with the specified actors in a Stack.
Actors: May be null to add a stack without any actors.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
swapActor (first As Int, second As Int) As Boolean
Swaps two actors by index. Returns false if the swap did not occur because the indexes were out of bounds.
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Swaps two actors. Returns false if the swap did not occur because the actors are not children of this group.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
When True, the SpriteBatch is transformed so children are drawn in their parent's coordinate system. This has a performance impact because lgSpriteBatch.Flush must be done before and after the transform. If the actors in a group are not rotated or scaled, then the transform for the group can be set to False. In this case, each child's position will be offset by the group's position for drawing, causing the children to appear in the correct location even though the SpriteBatch has not been transformed.
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
A cell in a table.
Events:
None
Members:
Align As Integer
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AlignBottom As lgScn2DTableCell
AlignCenter As lgScn2DTableCell
AlignLeft As lgScn2DTableCell
AlignRight As lgScn2DTableCell
AlignTop As lgScn2DTableCell
clear
Colspan As Integer
Column As Int [read only]
ComputedPadBottom As Float [read only]
ComputedPadLeft As Float [read only]
ComputedPadRight As Float [read only]
ComputedPadTop As Float [read only]
Expand As lgScn2DTableCell
Expand2 (X As Int, Y As Int) As lgScn2DTableCell
Expand3 (X As Boolean, Y As Boolean) As lgScn2DTableCell
ExpandX As Integer
ExpandY As Integer
Fill As lgScn2DTableCell
Fill2 (X As Float, Y As Float) As lgScn2DTableCell
Fill3 (X As Boolean, Y As Boolean) As lgScn2DTableCell
FillX As Float
FillY As Float
free
hasWidget As Boolean
Height As Float [write only]
Ignore As Boolean
isEndRow As Boolean
Layout As com.esotericsoftware.tablelayout.BaseTableLayout
MaxHeight As Float
MaxSize (Size As Float) As lgScn2DTableCell
MaxSize2 (Width As Float, Height As Float) As lgScn2DTableCell
MaxWidth As Float
MinHeight As Float
MinSize (Size As Float) As lgScn2DTableCell
MinSize2 (Width As Float, Height As Float) As lgScn2DTableCell
MinWidth As Float
Pad (Pad As Float) As lgScn2DTableCell
Pad2 (Top As Float, Left As Float, Bottom As Float, Right As Float) As lgScn2DTableCell
PadBottom As Float
PadLeft As Float
PadRight As Float
PadTop As Float
PrefHeight As Float
PrefSize (Size As Float) As lgScn2DTableCell
PrefSize2 (Width As Float, Height As Float) As lgScn2DTableCell
PrefWidth As Float
Row As Int [read only]
Size (Size As Float) As lgScn2DTableCell
Size2 (Width As Float, Height As Float) As lgScn2DTableCell
Space (Space As Float) As lgScn2DTableCell
Space2 (Top As Float, Left As Float, Bottom As Float, Right As Float) As lgScn2DTableCell
SpaceBottom As Float
SpaceLeft As Float
SpaceRight As Float
SpaceTop As Float
Uniform As lgScn2DTableCell
Uniform2 (X As Boolean, Y As Boolean) As lgScn2DTableCell
UniformX As Boolean
UniformY As Boolean
Widget As Object
WidgetHeight As Float
WidgetWidth As Float
WidgetX As Float
WidgetY As Float
Width As Float [write only]
Members description:
Align As Integer
Sets the alignment of the widget within the cell. Set to one of the ALIGN constants, or any combination of those.
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AlignBottom As lgScn2DTableCell
Adds ALIGN_Bottom and clears ALIGN_Top for the alignment of the widget within the cell.
AlignCenter As lgScn2DTableCell
Sets the alignment of the widget within the cell to ALIGN_Center. This clears any other alignment.
AlignLeft As lgScn2DTableCell
Adds ALIGN_Left and clears ALIGN_Right for the alignment of the widget within the cell.
AlignRight As lgScn2DTableCell
Adds ALIGN_Right and clears ALIGN_Left for the alignment of the widget within the cell.
AlignTop As lgScn2DTableCell
Adds ALIGN_Top and clears ALIGN_Bottom for the alignment of the widget within the cell.
clear
Sets all constraint fields to null.
Colspan As Integer
Column As Int [read only]
ComputedPadBottom As Float [read only]
The actual amount of combined padding and spacing from the last layout.
ComputedPadLeft As Float [read only]
The actual amount of combined padding and spacing from the last layout.
ComputedPadRight As Float [read only]
The actual amount of combined padding and spacing from the last layout.
ComputedPadTop As Float [read only]
The actual amount of combined padding and spacing from the last layout.
Expand As lgScn2DTableCell
Sets ExpandX and ExpandY to 1.
Expand2 (X As Int, Y As Int) As lgScn2DTableCell
Sets ExpandX and ExpandY to the specified values.
Expand3 (X As Boolean, Y As Boolean) As lgScn2DTableCell
Sets ExpandX and ExpandY to 1 if True, 0 if False.
ExpandX As Integer
ExpandY As Integer
Fill As lgScn2DTableCell
Sets FillX and FillY to 1.
Fill2 (X As Float, Y As Float) As lgScn2DTableCell
Sets FillX and FillY to the specified values.
Fill3 (X As Boolean, Y As Boolean) As lgScn2DTableCell
Sets FillX and FillY to 1 if True, 0 if False.
FillX As Float
FillY As Float
free
Reset state so the cell can be reused. Doesn't reset the constraint fields.
hasWidget As Boolean
Returns true if the cell's widget is not null.
Height As Float [write only]
Sets the MinHeight, PrefHeight, and MaxHeight to the specified value.
Ignore As Boolean
isEndRow As Boolean
Returns true if this cell is the last cell in the row.
Layout As com.esotericsoftware.tablelayout.BaseTableLayout
MaxHeight As Float
MaxSize (Size As Float) As lgScn2DTableCell
Sets the MaxWidth and MaxHeight to the specified size.
MaxSize2 (Width As Float, Height As Float) As lgScn2DTableCell
Sets the MaxWidth and MaxHeight to the specified values.
MaxWidth As Float
MinHeight As Float
MinSize (Size As Float) As lgScn2DTableCell
Sets the MinWidth and MinHeight to the specified size.
MinSize2 (Width As Float, Height As Float) As lgScn2DTableCell
Sets the MinWidth and MinHeight to the specified values.
MinWidth As Float
Pad (Pad As Float) As lgScn2DTableCell
Sets the PadTop, PadLeft, PadBottom, and PadRight to the specified value.
Pad2 (Top As Float, Left As Float, Bottom As Float, Right As Float) As lgScn2DTableCell
Sets the PadTop, PadLeft, PadBottom, and PadRight to the specified values.
PadBottom As Float
PadLeft As Float
PadRight As Float
PadTop As Float
PrefHeight As Float
PrefSize (Size As Float) As lgScn2DTableCell
Sets the PrefWidth and PrefHeight to the specified size.
PrefSize2 (Width As Float, Height As Float) As lgScn2DTableCell
Sets the PrefWidth and PrefHeight to the specified values.
PrefWidth As Float
Row As Int [read only]
Size (Size As Float) As lgScn2DTableCell
Sets the MinWidth, PrefWidth, MaxWidth, MinHeight, PrefHeight, and MaxHeight to the specified size.
Size2 (Width As Float, Height As Float) As lgScn2DTableCell
Sets the MinWidth, PrefWidth, MaxWidth, MinHeight, PrefHeight, and MaxHeight to the specified values.
Space (Space As Float) As lgScn2DTableCell
Sets the SpaceTop, SpaceLeft, SpaceBottom, and SpaceRight to the specified value.
Space2 (Top As Float, Left As Float, Bottom As Float, Right As Float) As lgScn2DTableCell
Sets the SpaceTop, SpaceLeft, SpaceBottom, and SpaceRight to the specified values.
SpaceBottom As Float
SpaceLeft As Float
SpaceRight As Float
SpaceTop As Float
Uniform As lgScn2DTableCell
Sets UniformX and UniformY to True.
Uniform2 (X As Boolean, Y As Boolean) As lgScn2DTableCell
Sets UniformX and UniformY to the specified values.
UniformX As Boolean
UniformY As Boolean
Widget As Object
Gets or sets the widget in this cell. If set to Null, removes any current widget.
WidgetHeight As Float
WidgetWidth As Float
WidgetX As Float
WidgetY As Float
Width As Float [write only]
Sets the MinWidth, PrefWidth, and MaxWidth to the specified value.
Events:
Act(Delta As Float)
Click(CheckedState As Boolean)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
AddActor (Widget As lgScn2DActor) As lgScn2DTableCell
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
AddCell As lgScn2DTableCell
AddLabel (Text As String, Style As lgScn2DLabelStyle) As lgScn2DTableCell
AddLabel2 (Text As String, Font As lgBitmapFont, FontColor As lgColor) As lgScn2DTableCell
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Align As Int
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AlignBottom As lgScn2DTable
AlignCenter As lgScn2DTable
AlignLeft As lgScn2DTable
AlignRight As lgScn2DTable
AlignTop As lgScn2DTable
Checked As Boolean
clear
clearActions
clearChildren
clearListeners
Clip As Boolean [write only]
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
ColumnDefaults (Column As Int) As lgScn2DTableCell
CullingArea As lgMathRectangle [write only]
DebugAll
DebugCell As lgScn2DTable
DebugTable As lgScn2DTable
DebugWidget As lgScn2DTable
Defaults As lgScn2DTableCell
Disabled As Boolean
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
DrawDebug (Stage As lgScn2DStage)
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetActor (Index As Int) As lgScn2DActor
GetCaptureListenersList As lgArray
GetCell (Widget As lgScn2DActor) As lgScn2DTableCell
GetCell2 (Index As Int) As lgScn2DTableCell
GetCellsList (lstCells As List)
GetChildrenList As lgArray
GetListenersList As lgArray
getRow (y As Float) As Int
HasActions As Boolean [read only]
hasChildren As Boolean
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (Text As String, Style As lgScn2DTextButtonStyle, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
isPressed As Boolean
Label As lgScn2DLabel [read only]
LabelCell As lgScn2DTableCell [read only]
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
NewRow As lgScn2DTableCell
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
PadBottom As Float [read only]
PadLeft As Float [read only]
PadRight As Float [read only]
PadTop As Float [read only]
PadX As Float [read only]
PadY As Float [read only]
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
remove As Boolean
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Reset
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
Round As Boolean [write only]
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
Stack (Actors() As lgScn2DActor) As lgScn2DTableCell
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Style As lgScn2DTextButtonStyle
swapActor (first As Int, second As Int) As Boolean
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Tag As Object
Text As CharSequence
toBack
toFront
toggle
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
AddActor (Widget As lgScn2DActor) As lgScn2DTableCell
Adds a new cell to the table with the specified widget.
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
AddCell As lgScn2DTableCell
Adds a cell without a widget.
AddLabel (Text As String, Style As lgScn2DLabelStyle) As lgScn2DTableCell
Adds a new cell with a label. The label is created with the specified text and style.
AddLabel2 (Text As String, Font As lgBitmapFont, FontColor As lgColor) As lgScn2DTableCell
Adds a new cell with a label. The label is created with the specified text, font and color.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
Align As Int
Sets the alignment of the logical table within the table widget. Set to one of the ALIGN constants, or any combination of those.
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AlignBottom As lgScn2DTable
Adds ALIGN_Bottom and clears ALIGN_Top for the alignment of the logical table within the table widget.
AlignCenter As lgScn2DTable
Sets the alignment of the logical table within the table widget to ALIGN_Center. This clears any other alignment.
AlignLeft As lgScn2DTable
Adds ALIGN_Left and clears ALIGN_Right for the alignment of the logical table within the table widget.
AlignRight As lgScn2DTable
Adds ALIGN_Right and clears ALIGN_Left for the alignment of the logical table within the table widget.
AlignTop As lgScn2DTable
Adds ALIGN_Top and clears ALIGN_Bottom for the alignment of the logical table within the table widget.
Checked As Boolean
clear
Removes all children, actions, and listeners from this group.
clearActions
Removes all actions on this actor.
clearChildren
Removes all actors and cells from the table.
clearListeners
Removes all listeners on this actor.
Clip As Boolean [write only]
Causes the contents to be clipped if they exceed the table widget bounds. Enabling clipping will set Transform to True.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
ColumnDefaults (Column As Int) As lgScn2DTableCell
Gets the cell values that will be used as the defaults for all cells in the specified column. Columns are indexed starting at 0.
CullingArea As lgMathRectangle [write only]
Children completely outside of this rectangle will not be drawn. This is only valid for use with unrotated and unscaled
actors!
DebugAll
Turns on all debug lines.
DebugCell As lgScn2DTable
Turns on cell debug lines.
DebugTable As lgScn2DTable
Turns on table debug lines.
DebugWidget As lgScn2DTable
Turns on widget debug lines.
Defaults As lgScn2DTableCell
Returns the cell values that will be used as the defaults for all cells.
Disabled As Boolean
Gets or sets whether the button is disabled. When True, the button will not toggle the checked state when clicked and will not fire a Click event.
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the button.
DrawDebug (Stage As lgScn2DStage)
Draws the debug lines for all tables in the stage. If this method is not called each frame, no debug lines will be drawn. If
debug is never turned on for any table in the application, calling this method will have no effect. If a table has ever had
debug set, calling this method causes an expensive traversal of all actors in the stage.
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the group.
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetActor (Index As Int) As lgScn2DActor
Returns the actor with the specified index in the group, or Null if index is out of bounds.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetCell (Widget As lgScn2DActor) As lgScn2DTableCell
Returns the cell for the specified widget in this table, or null.
GetCell2 (Index As Int) As lgScn2DTableCell
Returns the cell with the specified index, or Null if index is out of bounds.
GetCellsList (lstCells As List)
Fills the given list with all cells of this table.
GetChildrenList As lgArray
Returns an ordered list of child actors in this group.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
getRow (y As Float) As Int
Returns the row index for the y coordinate.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasChildren As Boolean
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Returns the child actor with the highest z-index that contains the specified point and is touchable and visible, or Null if no actor was hit. The point is specified in the group's coordinate system (0,0 is the bottom left of the group and width,height is the upper right).
This function is used to delegate TouchDown and Enter/Exit events.
Touchable: If True, the hit detection will respect the touchability.
Initialize (Text As String, Style As lgScn2DTextButtonStyle, EvtPrefix As String)
Creates a button that contains a label. lgScn2DTextButton extends lgScn2DButton which extends lgScn2DTable, so widgets can be added to the TextButton using the Table methods.
The preferred size of the TextButton is determined by the background and the button contents.
EvtPrefix: The prefix of Act and Click events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
isPressed As Boolean
Label As lgScn2DLabel [read only]
LabelCell As lgScn2DTableCell [read only]
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this group to those of a descendant actor. The descendant does not need to be a direct child.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
NewRow As lgScn2DTableCell
Indicates that subsequent cells should be added to a new row.
Returns the cell values that will be used as the defaults for all cells in the new row.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget group to its preferred width and height.
PadBottom As Float [read only]
PadLeft As Float [read only]
PadRight As Float [read only]
PadTop As Float [read only]
PadX As Float [read only]
Returns PadLeft plus PadRight.
PadY As Float [read only]
Returns PadTop plus PadBottom.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
Prints the actor hierarchy recursively for debugging purposes.
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
Removes an actor from this group. If the actor has actions, they are cleared.
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Reset
Removes all actors and cells from the table (same as ClearChildren) and additionally resets all table properties and cell, column, and row defaults.
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
Round As Boolean [write only]
If true (the default), positions and sizes are rounded to integers.
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stack (Actors() As lgScn2DActor) As lgScn2DTableCell
Adds a new cell to the table with the specified actors in a Stack.
Actors: May be null to add a stack without any actors.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Style As lgScn2DTextButtonStyle
Gets or sets the TextButton's style.
swapActor (first As Int, second As Int) As Boolean
Swaps two actors by index. Returns false if the swap did not occur because the indexes were out of bounds.
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Swaps two actors. Returns false if the swap did not occur because the actors are not children of this group.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
Text As CharSequence
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
toggle
Toggles the checked state. This method changes the checked state, which fires a Click event, so can be used to simulate a button click.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
When True, the SpriteBatch is transformed so children are drawn in their parent's coordinate system. This has a performance impact because lgSpriteBatch.Flush must be done before and after the transform. If the actors in a group are not rotated or scaled, then the transform for the group can be set to False. In this case, each child's position will be offset by the group's position for drawing, causing the children to appear in the correct location even though the SpriteBatch has not been transformed.
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
checked As com.badlogic.gdx.scenes.scene2d.utils.Drawable
checkedFontColor As lgColor
disabled As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabledFontColor As lgColor
down As com.badlogic.gdx.scenes.scene2d.utils.Drawable
downFontColor As lgColor
Font As lgBitmapFont [write only]
fontColor As lgColor
Initialize (Up As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Down As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Font As lgBitmapFont)
Initialize2 (Style As lgScn2DTextButtonStyle)
pressedOffsetX As Float
pressedOffsetY As Float
SetDrawableSize (Width As Float, Height As Float)
unpressedOffsetX As Float
unpressedOffsetY As Float
up As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Members description:
checked As com.badlogic.gdx.scenes.scene2d.utils.Drawable
checkedFontColor As lgColor
disabled As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabledFontColor As lgColor
down As com.badlogic.gdx.scenes.scene2d.utils.Drawable
downFontColor As lgColor
Font As lgBitmapFont [write only]
fontColor As lgColor
Initialize (Up As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Down As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Font As lgBitmapFont)
Initialize2 (Style As lgScn2DTextButtonStyle)
pressedOffsetX As Float
Optional.
pressedOffsetY As Float
Optional.
SetDrawableSize (Width As Float, Height As Float)
Sets the MinWidth and MinHeight of the Up, Down, Checked and Disabled drawables.
unpressedOffsetX As Float
Optional.
unpressedOffsetY As Float
Optional.
up As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Events:
Act(Delta As Float)
AcceptChar(Key As Char) As Boolean
Changed(Key As Char, Text As String)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
BlinkTime As Float [write only]
clear
clearActions
clearListeners
clearSelection
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
copy
CursorPosition As Int
cut
Disabled As Boolean
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
FocusTraversal As Boolean [write only]
GetActionsList As lgArray
GetCaptureListenersList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (Text As String, Style As lgScn2DTextFieldStyle, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxLength As Int
MaxWidth As Float [read only]
MessageText As String
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
next (up As Boolean)
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OnlyFontChars As Boolean [write only]
OriginX As Float
OriginY As Float
pack
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PasswordCharacter As Char [write only]
PasswordMode As Boolean
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
RightAligned As Boolean [write only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
selectAll
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSelection (selectionStart As Int, selectionEnd As Int)
setSize (width As Float, height As Float)
size (size As Float)
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Style As lgScn2DTextFieldStyle
Tag As Object
Text As String
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
BlinkTime As Float [write only]
clear
Removes all actions and listeners on this actor.
clearActions
Removes all actions on this actor.
clearListeners
Removes all listeners on this actor.
clearSelection
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
copy
Copies the selected contents of this TextField to the clipboard.
CursorPosition As Int
Sets the cursor position and clears any selection.
cut
Copies the selected contents of this TextField to the clipboard, then removes it.
Disabled As Boolean
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the text field.
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
FocusTraversal As Boolean [write only]
If True (the default), Enter will move to the next text field.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Checks whether this actor contains the specified point and is touchable. The point is specified in the actor's local coordinate system.
Returns the actor or Null.
Touchable: If True, the hit detection will respect the touchability.
Initialize (Text As String, Style As lgScn2DTextFieldStyle, EvtPrefix As String)
Creates a single-line text input field.
EvtPrefix: The prefix of Act, AcceptChar and Changed events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxLength As Int
MaxWidth As Float [read only]
MessageText As String
Sets the text that will be drawn in the text field if no text has been entered.
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
next (up As Boolean)
Focuses the next TextField. If none is found, the keyboard is hidden. Does nothing if the text field is not in a stage.
up: If true, the TextField with the same or next smallest y coordinate is found, else the next highest.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OnlyFontChars As Boolean [write only]
When False, if the text set via Text contains characters not in the font, a space is displayed instead.
When True (the default), characters not in the font are stripped.
Characters not in the font are always stripped when typed or pasted.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget to its preferred width and height.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PasswordCharacter As Char [write only]
Sets the password character for the text field. The character must be present in the bitmap font.
PasswordMode As Boolean
If True, the text in this text field will be shown as bullet characters, or the character set via PasswordCharacter. The font must have the character or this will have no effect.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
RightAligned As Boolean [write only]
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
selectAll
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSelection (selectionStart As Int, selectionEnd As Int)
Sets the selected text.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Style As lgScn2DTextFieldStyle
Gets or sets the TextField's style.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
Text As String
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
cursor As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabledBackground As com.badlogic.gdx.scenes.scene2d.utils.Drawable
disabledFontColor As lgColor
focusedBackground As com.badlogic.gdx.scenes.scene2d.utils.Drawable
focusedFontColor As lgColor
Font As lgBitmapFont [write only]
fontColor As lgColor
Initialize (Font As lgBitmapFont, FontColor As lgColor, Cursor As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DTextFieldStyle)
MessageFont As lgBitmapFont [write only]
messageFontColor As lgColor
selection As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Members description:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
cursor As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
disabledBackground As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
disabledFontColor As lgColor
Optional.
focusedBackground As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
focusedFontColor As lgColor
Optional.
Font As lgBitmapFont [write only]
fontColor As lgColor
Initialize (Font As lgBitmapFont, FontColor As lgColor, Cursor As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DTextFieldStyle)
MessageFont As lgBitmapFont [write only]
messageFontColor As lgColor
Optional.
selection As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
Events:
None
Members:
BottomHeight As Float
Draw (Batch As lgSpriteBatch, X As Float, Y As Float, Width As Float, Height As Float)
Initialize
Initialize2 (Region As lgTextureRegion)
Initialize3 (RegionDrw As lgScn2DTextureRegionDrawable)
InternalObject As com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable [read only]
LeftWidth As Float
MinHeight As Float
MinWidth As Float
Region As lgTextureRegion
RightWidth As Float
TopHeight As Float
Members description:
BottomHeight As Float
Draw (Batch As lgSpriteBatch, X As Float, Y As Float, Width As Float, Height As Float)
Draws this drawable at the specified bounds. The drawable should be tinted with lgSpriteBatch.Color, possibly by mixing its own color.
Initialize
Creates a TextureRegionDrawable. The texture region must be set before use.
Initialize2 (Region As lgTextureRegion)
Creates a TextureRegionDrawable. MinWidth and MinHeight are set to the region size.
Initialize3 (RegionDrw As lgScn2DTextureRegionDrawable)
Creates a TextureRegionDrawable.
InternalObject As com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable [read only]
LeftWidth As Float
MinHeight As Float
MinWidth As Float
Region As lgTextureRegion
RightWidth As Float
TopHeight As Float
Events:
None
Members:
BottomHeight As Float
Draw (Batch As lgSpriteBatch, X As Float, Y As Float, Width As Float, Height As Float)
Initialize
Initialize2 (Region As lgTextureRegion)
Initialize3 (RegionDrw As lgScn2DTextureRegionDrawable)
InternalObject As com.badlogic.gdx.scenes.scene2d.utils.TiledDrawable [read only]
LeftWidth As Float
MinHeight As Float
MinWidth As Float
Region As lgTextureRegion
RightWidth As Float
TopHeight As Float
Members description:
BottomHeight As Float
Draw (Batch As lgSpriteBatch, X As Float, Y As Float, Width As Float, Height As Float)
Draws this drawable at the specified bounds. The drawable should be tinted with lgSpriteBatch.Color, possibly by mixing its own color.
Initialize
Creates a TiledDrawable. Its texture region must be set before use.
Initialize2 (Region As lgTextureRegion)
Creates a TiledDrawable.
Initialize3 (RegionDrw As lgScn2DTextureRegionDrawable)
Creates a TiledDrawable.
InternalObject As com.badlogic.gdx.scenes.scene2d.utils.TiledDrawable [read only]
LeftWidth As Float
MinHeight As Float
MinWidth As Float
Region As lgTextureRegion
RightWidth As Float
TopHeight As Float
Events:
Act(Delta As Float)
Changed(KnobX As Float, KnobY As Float, KnobPercentX As Float, KnobPercentY As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
clear
clearActions
clearListeners
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
Deadzone As Float [write only]
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetCaptureListenersList As lgArray
GetListenersList As lgArray
HasActions As Boolean [read only]
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (DeadzoneRadius As Float, Style As lgScn2DTouchpadStyle, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
isTouched As Boolean
KnobPercentX As Float [read only]
KnobPercentY As Float [read only]
KnobX As Float [read only]
KnobY As Float [read only]
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
needsLayout As Boolean
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Style As lgScn2DTouchpadStyle
Tag As Object
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
clear
Removes all actions and listeners on this actor.
clearActions
Removes all actions on this actor.
clearListeners
Removes all listeners on this actor.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
Deadzone As Float [write only]
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the touchpad.
FillParent As Boolean [write only]
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Checks whether this actor contains the specified point and is touchable. The point is specified in the actor's local coordinate system.
Returns the actor or Null.
Touchable: If True, the hit detection will respect the touchability.
Initialize (DeadzoneRadius As Float, Style As lgScn2DTouchpadStyle, EvtPrefix As String)
Creates an on-screen joystick. The movement area of the joystick is circular, centered on the touchpad, and its size determined by the smaller touchpad dimension. The preferred size of the touchpad is determined by its background.
DeadzoneRadius: The distance in pixels from the center of the touchpad required for the knob to be moved.
EvtPrefix: The prefix of Act and Changed events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
isTouched As Boolean
KnobPercentX As Float [read only]
Returns the x-position of the knob as a percentage from the center of the touchpad to the edge of the circular movement
area. The positive direction is right.
KnobPercentY As Float [read only]
Returns the y-position of the knob as a percentage from the center of the touchpad to the edge of the circular movement
area. The positive direction is up.
KnobX As Float [read only]
Returns the x-position of the knob relative to the center of the widget. The positive direction is right.
KnobY As Float [read only]
Returns the y-position of the knob relative to the center of the widget. The positive direction is up.
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget to its preferred width and height.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Style As lgScn2DTouchpadStyle
Gets or sets the touchpad's style.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Initialize (Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Knob As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DTouchpadStyle)
knob As com.badlogic.gdx.scenes.scene2d.utils.Drawable
SetKnobSize (Width As Float, Height As Float)
Members description:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Stretched in both directions. Optional.
Initialize (Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable, Knob As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DTouchpadStyle)
knob As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
SetKnobSize (Width As Float, Height As Float)
Sets the MinWidth and MinHeight of the knob drawable.
Events:
TouchDown(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
TouchUp(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
TouchDragged(Event As lgScn2DInputEvent, X As Float, Y As Float, Pointer As Int)
Act(Delta As Float)
Draw(SpriteBatch As lgSpriteBatch, ParentAlpha As Float)
Members:
act (delta As Float)
addAction (action As lgScn2DAction)
AddActor (Widget As lgScn2DActor) As lgScn2DTableCell
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
AddCell As lgScn2DTableCell
AddLabel (Text As String, Style As lgScn2DLabelStyle) As lgScn2DTableCell
AddLabel2 (Text As String, Font As lgBitmapFont, FontColor As lgColor) As lgScn2DTableCell
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Align As Int
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AlignBottom As lgScn2DTable
AlignCenter As lgScn2DTable
AlignLeft As lgScn2DTable
AlignRight As lgScn2DTable
AlignTop As lgScn2DTable
Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
clear
clearActions
clearChildren
clearListeners
Clip As Boolean [write only]
ClipBegin As Boolean
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
ClipEnd
Color As lgColor
ColumnDefaults (Column As Int) As lgScn2DTableCell
CullingArea As lgMathRectangle [write only]
DebugAll
DebugCell As lgScn2DTable
DebugTable As lgScn2DTable
DebugWidget As lgScn2DTable
Defaults As lgScn2DTableCell
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
DrawDebug (Stage As lgScn2DStage)
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
fire (event As lgScn2DEvent) As Boolean
GetActionsList As lgArray
GetActor (Index As Int) As lgScn2DActor
GetCaptureListenersList As lgArray
GetCell (Widget As lgScn2DActor) As lgScn2DTableCell
GetCell2 (Index As Int) As lgScn2DTableCell
GetCellsList (lstCells As List)
GetChildrenList As lgArray
GetListenersList As lgArray
getRow (y As Float) As Int
HasActions As Boolean [read only]
hasChildren As Boolean
hasParent As Boolean
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Initialize (Title As String, Style As lgScn2DWindowStyle, EvtPrefix As String)
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
isDescendantOf (actor As lgScn2DActor) As Boolean
isDragging As Boolean
KeepWithinStage As Boolean [write only]
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Modal As Boolean
Movable As Boolean
Name As String
needsLayout As Boolean
NewRow As lgScn2DTableCell
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
OriginX As Float
OriginY As Float
pack
PadBottom As Float [read only]
PadLeft As Float [read only]
PadRight As Float [read only]
PadTop As Float [read only]
PadX As Float [read only]
PadY As Float [read only]
Parent As lgScn2DGroup [read only]
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
remove As Boolean
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Reset
Right As Float [read only]
rotate (amountInDegrees As Float)
Rotation As Float
Round As Boolean [write only]
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
SetBounds (x As Float, y As Float, width As Float, height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
setPosition (x As Float, y As Float)
setScale (scaleX As Float, scaleY As Float)
setSize (width As Float, height As Float)
size (size As Float)
Stack (Actors() As lgScn2DActor) As lgScn2DTableCell
Stage As lgScn2DStage
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Style As lgScn2DWindowStyle
swapActor (first As Int, second As Int) As Boolean
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Tag As Object
Title As String
TitleAlignment As Int
toBack
toFront
Top As Float [read only]
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
translate (x As Float, y As Float)
validate
Visible As Boolean
Width As Float
X As Float
Y As Float
ZIndex As Int
Members description:
act (delta As Float)
Updates the actor based on time. Typically this is called each frame by Stage.Act.
The default implementation updates and applies each action attached to this actor, then removes actions that are complete.
You can use the Act event to be notified of the update and do your own changes.
delta: Time in seconds since the last frame.
addAction (action As lgScn2DAction)
AddActor (Widget As lgScn2DActor) As lgScn2DTableCell
Adds a new cell to the table with the specified widget.
addCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Adds a listener that is only notified during the capture phase.
AddCell As lgScn2DTableCell
Adds a cell without a widget.
AddLabel (Text As String, Style As lgScn2DLabelStyle) As lgScn2DTableCell
Adds a new cell with a label. The label is created with the specified text and style.
AddLabel2 (Text As String, Font As lgBitmapFont, FontColor As lgColor) As lgScn2DTableCell
Adds a new cell with a label. The label is created with the specified text, font and color.
addListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Add a regular listener to receive events that hit this actor.
Align As Int
Sets the alignment of the logical table within the table widget. Set to one of the ALIGN constants, or any combination of those.
ALIGN_Bottom As Int
ALIGN_Center As Int
ALIGN_Left As Int
ALIGN_Right As Int
ALIGN_Top As Int
AlignBottom As lgScn2DTable
Adds ALIGN_Bottom and clears ALIGN_Top for the alignment of the logical table within the table widget.
AlignCenter As lgScn2DTable
Sets the alignment of the logical table within the table widget to ALIGN_Center. This clears any other alignment.
AlignLeft As lgScn2DTable
Adds ALIGN_Left and clears ALIGN_Right for the alignment of the logical table within the table widget.
AlignRight As lgScn2DTable
Adds ALIGN_Right and clears ALIGN_Left for the alignment of the logical table within the table widget.
AlignTop As lgScn2DTable
Adds ALIGN_Top and clears ALIGN_Bottom for the alignment of the logical table within the table widget.
Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Gets or sets the background drawable.
The table's padding is set to BottomHeight, TopHeight, LeftWidth, and RightWidth of the drawable.
clear
Removes all children, actions, and listeners from this group.
clearActions
Removes all actions on this actor.
clearChildren
Removes all actors and cells from the table.
clearListeners
Removes all listeners on this actor.
Clip As Boolean [write only]
Causes the contents to be clipped if they exceed the table widget bounds. Enabling clipping will set Transform to True.
ClipBegin As Boolean
Calls ClipBegin2 to clip this actor's bounds.
ClipBegin2 (X As Float, Y As Float, Width As Float, Height As Float) As Boolean
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's SpriteBatch. The transform
matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call to ClipEnd
if True is returned.
Returns False if the clipping area is zero and no drawing should occur.
ClipEnd
Ends clipping begun by ClipBegin2.
Color As lgColor
Gets or sets the color the actor will be tinted when drawn.
ColumnDefaults (Column As Int) As lgScn2DTableCell
Gets the cell values that will be used as the defaults for all cells in the specified column. Columns are indexed starting at 0.
CullingArea As lgMathRectangle [write only]
Children completely outside of this rectangle will not be drawn. This is only valid for use with unrotated and unscaled
actors!
DebugAll
Turns on all debug lines.
DebugCell As lgScn2DTable
Turns on cell debug lines.
DebugTable As lgScn2DTable
Turns on table debug lines.
DebugWidget As lgScn2DTable
Turns on widget debug lines.
Defaults As lgScn2DTableCell
Returns the cell values that will be used as the defaults for all cells.
Draw (Batch As lgSpriteBatch, ParentAlpha As Float)
Draws the window.
DrawDebug (Stage As lgScn2DStage)
Draws the debug lines for all tables in the stage. If this method is not called each frame, no debug lines will be drawn. If
debug is never turned on for any table in the application, calling this method will have no effect. If a table has ever had
debug set, calling this method causes an expensive traversal of all actors in the stage.
FillParent As Boolean [write only]
findActor (name As String) As lgScn2DActor
Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the group.
fire (event As lgScn2DEvent) As Boolean
Sets this actor as the event target and propagates the event to this actor and ancestor actors as necessary. If this actor is not in the stage, the stage must be set before calling this method.
Events are fired in 2 phases:
- The first phase (the "capture" phase) notifies listeners on each actor starting at the root and propagating downward to (and including) this actor.
- The second phase notifies listeners on each actor starting at this actor and, if Bubbles is true, propagating upward to the root.
If the event is stopped at any time, it will not propagate to the next actor.
Returns True if the event was cancelled.
GetActionsList As lgArray
Gets an array of the actor's actions.
GetActor (Index As Int) As lgScn2DActor
Returns the actor with the specified index in the group, or Null if index is out of bounds.
GetCaptureListenersList As lgArray
Gets an array of the actor's capture listeners.
GetCell (Widget As lgScn2DActor) As lgScn2DTableCell
Returns the cell for the specified widget in this table, or null.
GetCell2 (Index As Int) As lgScn2DTableCell
Returns the cell with the specified index, or Null if index is out of bounds.
GetCellsList (lstCells As List)
Fills the given list with all cells of this table.
GetChildrenList As lgArray
Returns an ordered list of child actors in this group.
GetListenersList As lgArray
Gets an array of the actor's regular listeners.
getRow (y As Float) As Int
Returns the row index for the y coordinate.
HasActions As Boolean [read only]
Returns whether actions are attached to this actor.
hasChildren As Boolean
hasParent As Boolean
Returns true if the actor's parent is not null.
Height As Float
hit (x As Float, y As Float, touchable As Boolean) As lgScn2DActor
Returns the child actor with the highest z-index that contains the specified point and is touchable and visible, or Null if no actor was hit. The point is specified in the group's coordinate system (0,0 is the bottom left of the group and width,height is the upper right).
This function is used to delegate TouchDown and Enter/Exit events.
Touchable: If True, the hit detection will respect the touchability.
Initialize (Title As String, Style As lgScn2DWindowStyle, EvtPrefix As String)
Creates a table that can be dragged and act as a modal window. The top padding is used as the window's title height.
The preferred size of a window is the preferred size of the title text and the children as layed out by the table. After adding children to the window, it can be convenient to call Pack to size the window to the size of the children.
EvtPrefix: The prefix of Act, Draw and Touch events.
invalidate
invalidateHierarchy
isAscendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the ascendant of the specified actor.
isDescendantOf (actor As lgScn2DActor) As Boolean
Returns true if this actor is the same as or is the descendant of the specified actor.
isDragging As Boolean
KeepWithinStage As Boolean [write only]
LayoutEnabled As Boolean [write only]
localToAscendantCoordinates (ascendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this actor to those of a parent actor. The ascendant does not need to be a direct parent.
localToDescendantCoordinates (descendant As lgScn2DActor, localCoords As lgMathVector2) As lgMathVector2
Converts coordinates for this group to those of a descendant actor. The descendant does not need to be a direct child.
localToParentCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the parent's coordinates.
localToStageCoordinates (localCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the actor's coordinates to be in the stage's coordinates.
MaxHeight As Float [read only]
MaxWidth As Float [read only]
MinHeight As Float [read only]
MinWidth As Float [read only]
Modal As Boolean
Movable As Boolean
Name As String
Gets or sets a name for easier identification of the actor in application code.
needsLayout As Boolean
Returns true if the widget's layout has been invalidated.
NewRow As lgScn2DTableCell
Indicates that subsequent cells should be added to a new row.
Returns the cell values that will be used as the defaults for all cells in the new row.
notify (event As lgScn2DEvent, capture As Boolean) As Boolean
Notifies this actor's listeners of the event. The event is not propagated to any parents. Before notifying the
listeners, this actor is set as the listener actor. The event target must be set before calling this method. If
this actor is not in the stage, the stage must be set before calling this method.
Returns True if the event was cancelled.
Capture: If True, the capture listeners will be notified instead of the regular listeners.
OriginX As Float
OriginY As Float
pack
Sets the width and height of the widget group to its preferred width and height.
PadBottom As Float [read only]
PadLeft As Float [read only]
PadRight As Float [read only]
PadTop As Float [read only]
PadX As Float [read only]
Returns PadLeft plus PadRight.
PadY As Float [read only]
Returns PadTop plus PadBottom.
Parent As lgScn2DGroup [read only]
Returns the parent actor, or null if not in a stage.
parentToLocalCoordinates (parentCoords As lgMathVector2) As lgMathVector2
Converts the coordinates given in the parent's coordinate system to this actor's coordinate system.
PrefHeight As Float [read only]
PrefWidth As Float [read only]
print
Prints the actor hierarchy recursively for debugging purposes.
remove As Boolean
Removes this actor from its parent, if it has a parent.
removeAction (action As lgScn2DAction)
removeActor (actor As lgScn2DActor) As Boolean
Removes an actor from this group. If the actor has actions, they are cleared.
removeCaptureListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
removeListener (listener As com.badlogic.gdx.scenes.scene2d.EventListener) As Boolean
Reset
Removes all actors and cells from the table (same as ClearChildren) and additionally resets all table properties and cell, column, and row defaults.
Right As Float [read only]
Returns x plus width.
rotate (amountInDegrees As Float)
Adds the specified rotation to the current rotation.
Rotation As Float
Round As Boolean [write only]
If true (the default), positions and sizes are rounded to integers.
ScaleX As Float
ScaleY As Float
screenToLocalCoordinates (screenCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in screen coordinates to the actor's local coordinate system.
SetBounds (x As Float, y As Float, width As Float, height As Float)
Sets the position and size of this actor.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
setOrigin (originX As Float, originY As Float)
Sets the originx and originy.
setPosition (x As Float, y As Float)
Sets the x and y.
setScale (scaleX As Float, scaleY As Float)
Sets the scalex and scaley.
setSize (width As Float, height As Float)
Sets the width and height.
size (size As Float)
Adds the specified size to the current size.
Stack (Actors() As lgScn2DActor) As lgScn2DTableCell
Adds a new cell to the table with the specified actors in a Stack.
Actors: May be null to add a stack without any actors.
Stage As lgScn2DStage
Returns the stage that this actor is currently in, or null if not in a stage.
stageToLocalCoordinates (stageCoords As lgMathVector2) As lgMathVector2
Transforms the specified point in the stage's coordinates to the actor's local coordinate system.
Style As lgScn2DWindowStyle
Gets or sets the window's style.
swapActor (first As Int, second As Int) As Boolean
Swaps two actors by index. Returns false if the swap did not occur because the indexes were out of bounds.
swapActor2 (first As lgScn2DActor, second As lgScn2DActor) As Boolean
Swaps two actors. Returns false if the swap did not occur because the actors are not children of this group.
Tag As Object
Gets or sets the Tag value. This is a place holder which can be used to store additional data.
Title As String
TitleAlignment As Int
toBack
Changes the z-order for this actor so it is in back of all siblings.
toFront
Changes the z-order for this actor so it is in front of all siblings.
Top As Float [read only]
Returns y plus height.
toString As String
Touchable As com.badlogic.gdx.scenes.scene2d.Touchable
Gets or sets how touch events are distributed to this actor. Default is TOUCHABLE_Enabled.
TOUCHABLE_ChildrenOnly As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Disabled As com.badlogic.gdx.scenes.scene2d.Touchable
TOUCHABLE_Enabled As com.badlogic.gdx.scenes.scene2d.Touchable
Transform As Boolean
When True, the SpriteBatch is transformed so children are drawn in their parent's coordinate system. This has a performance impact because lgSpriteBatch.Flush must be done before and after the transform. If the actors in a group are not rotated or scaled, then the transform for the group can be set to False. In this case, each child's position will be offset by the group's position for drawing, causing the children to appear in the correct location even though the SpriteBatch has not been transformed.
translate (x As Float, y As Float)
validate
Visible As Boolean
Gets or sets whether the actor will be drawn and will receive touch events. Default is True.
Width As Float
X As Float
Y As Float
ZIndex As Int
Gets or sets the z-index of this actor. The z-index is the index into the parent's children, where a lower index is below a higher index. Setting a z-index higher than the number of children will move the child to the front. Setting a z-index less than zero is invalid.
Events:
None
Members:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Initialize (TitleFont As lgBitmapFont, TitleFontColor As lgColor, Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DWindowStyle)
stageBackground As com.badlogic.gdx.scenes.scene2d.utils.Drawable
TitleFont As lgBitmapFont [write only]
titleFontColor As lgColor
Members description:
background As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
Initialize (TitleFont As lgBitmapFont, TitleFontColor As lgColor, Background As com.badlogic.gdx.scenes.scene2d.utils.Drawable)
Initialize2 (Style As lgScn2DWindowStyle)
stageBackground As com.badlogic.gdx.scenes.scene2d.utils.Drawable
Optional.
TitleFont As lgBitmapFont [write only]
titleFontColor As lgColor
Optional.
Events:
Show
Hide
Render(Delta As Float)
Resize(Width As Int, Height As Int)
Pause
Resume
Members:
Members description:
Events:
None
Members:
AddScreen (evtPrefix As String) As lgScreen
CurrentScreen As lgScreen
Initialize (LG As LibGDX)
RemoveScreen (Screen As lgScreen) As Boolean
Members description:
AddScreen (evtPrefix As String) As lgScreen
Adds a new screen to the list of screens.
evtPrefix: Prefix of the screen events.
CurrentScreen As lgScreen
Gets or sets the current screen. When set, the Hide event is raised for any old screen, and the Show event is raised for the new screen.
Initialize (LG As LibGDX)
Initializes the list of screens.
RemoveScreen (Screen As lgScreen) As Boolean
Removes the given screen from the list of screens. Removing a screen does not dispose its resources.
Permissions:
android.permission.INTERNET
Events:
NewConnection(ClientSocket As lgSocket)
Timeout
Members:
dispose
InternalObject As com.badlogic.gdx.backends.android.AndroidServerSocket [read only]
Listen (EvtPrefix As String)
Members description:
dispose
InternalObject As com.badlogic.gdx.backends.android.AndroidServerSocket [read only]
Listen (EvtPrefix As String)
Listens to incoming connections in a separate thread.
A NewConnection event is raised when a connection is made.
A Timeout event is raised when the waiting time for a connection has elapsed.
Options for {@link ServerSocket} instances.
Events:
None
Members:
acceptTimeout As Int
backlog As Int
performancePrefBandwidth As Int
performancePrefConnectionTime As Int
performancePrefLatency As Int
receiveBufferSize As Int
reuseAddress As Boolean
Members description:
acceptTimeout As Int
The SO_TIMEOUT in milliseconds for how long to wait. Enter 0 for infinite wait.
backlog As Int
The listen backlog length. Needs to be greater than 0, otherwise the system default is used.
Backlog is the maximum queue length for incoming connection, i.e. maximum number of connections.
If a connection indication arrives when the queue is full, the connection is refused.
performancePrefBandwidth As Int
See performancePrefConnectionTime for details.
performancePrefConnectionTime As Int
Performance preferences are described by three integers whose values indicate the relative
importance of short connection time, low latency, and high bandwidth. The absolute
values of the integers are irrelevant; in order to choose a protocol the values are
simply compared, with larger values indicating stronger preferences.
Negative values represent a lower priority than positive values. If the application
prefers short connection time over both low latency and high bandwidth, for example,
then it could set performancePrefConnectionTime to 1 and the other properties to 0.
If the application prefers high bandwidth above low latency, and low latency above
short connection time, then it could set performancePrefConnectionTime to 0,
performancePrefLatency to 1 and performancePrefBandwidth to 2.
performancePrefLatency As Int
See performancePrefConnectionTime for details.
receiveBufferSize As Int
The SO_RCVBUF (receive buffer) size in bytes.
reuseAddress As Boolean
Enable/disable the SO_REUSEADDR socket option.
Events:
None
Members:
ATTRIBUTE_BINORMAL As String
ATTRIBUTE_COLOR As String
ATTRIBUTE_NORMAL As String
ATTRIBUTE_POSITION_ As String
ATTRIBUTE_TANGENT As String
ATTRIBUTE_TEXCOORD As String
Attributes() As String [read only]
Begin
DisableVertexAttribute (Name As String)
dispose
EnableVertexAttribute (Name As String)
End
FetchUniformLocation (Name As String, Pedantic As Boolean) As Int
FragmentShaderSource As String [read only]
GetAttributeLocation (Name As String) As Int
GetAttributeSize (Name As String) As Int
GetAttributeType (Name As String) As Int
GetManagedStatus As String
GetUniformLocation (Name As String) As Int
GetUniformSize (Name As String) As Int
GetUniformType (Name As String) As Int
HasAttribute (Name As String) As Boolean
HasUniform (Name As String) As Boolean
Initialize (VertexShader As String, FragmentShader As String)
InitializeWithFiles (VertexShader As lgFileHandle, FragmentShader As lgFileHandle)
InternalObject As com.badlogic.gdx.graphics.glutils.ShaderProgram [read only]
IsCompiled As Boolean
Log As String [read only]
Pedantic As Boolean
SetAttributef (Name As String, Value1 As Float, Value2 As Float, Value3 As Float, Value4 As Float)
SetUniform1f (Name As String, Value As Float)
SetUniform1fL (Location As Int, Value As Float)
SetUniform1fV (Name As String, Values() As Float, Offset As Int, Length As Int)
SetUniform1fVL (Location As Int, Values() As Float, Offset As Int, Length As Int)
SetUniform1i (Name As String, Value As Int)
SetUniform1iL (Location As Int, Value As Int)
SetUniform2f (Name As String, Value1 As Float, Value2 As Float)
SetUniform2fL (Location As Int, Value1 As Float, Value2 As Float)
SetUniform2fV (Name As String, Values() As Float, Offset As Int, Length As Int)
SetUniform2fVL (Location As Int, Values() As Float, Offset As Int, Length As Int)
SetUniform2i (Name As String, Value1 As Int, Value2 As Int)
SetUniform2iL (Location As Int, Value1 As Int, Value2 As Int)
SetUniform3f (Name As String, Value1 As Float, Value2 As Float, Value3 As Float)
SetUniform3fL (Location As Int, Value1 As Float, Value2 As Float, Value3 As Float)
SetUniform3fV (Name As String, Values() As Float, Offset As Int, Length As Int)
SetUniform3fVL (Location As Int, Values() As Float, Offset As Int, Length As Int)
SetUniform3i (Name As String, Value1 As Int, Value2 As Int, Value3 As Int)
SetUniform3iL (Location As Int, Value1 As Int, Value2 As Int, Value3 As Int)
SetUniform4f (Name As String, Value1 As Float, Value2 As Float, Value3 As Float, Value4 As Float)
SetUniform4fL (Location As Int, Value1 As Float, Value2 As Float, Value3 As Float, Value4 As Float)
SetUniform4fV (Name As String, Values() As Float, Offset As Int, Length As Int)
SetUniform4fVL (Location As Int, Values() As Float, Offset As Int, Length As Int)
SetUniform4i (Name As String, Value1 As Int, Value2 As Int, Value3 As Int, Value4 As Int)
SetUniform4iL (Location As Int, Value1 As Int, Value2 As Int, Value3 As Int, Value4 As Int)
SetUniformColor (Name As String, Color As lgColor)
SetUniformColorL (Location As Int, Color As lgColor)
SetUniformMatrix3 (Name As String, Matrix As lgMathMatrix3)
SetUniformMatrix3L (Location As Int, Matrix As lgMathMatrix3)
SetUniformMatrix3t (Name As String, Matrix As lgMathMatrix3, Transpose As Boolean)
SetUniformMatrix3tL (Location As Int, Matrix As lgMathMatrix3, Transpose As Boolean)
SetUniformMatrix4 (Name As String, Matrix As lgMathMatrix4)
SetUniformMatrix4fV (Name As String, Values() As Float, Offset As Int, Length As Int)
SetUniformMatrix4fVL (Location As Int, Values() As Float, Offset As Int, Length As Int)
SetUniformMatrix4L (Location As Int, Matrix As lgMathMatrix4)
SetUniformMatrix4t (Name As String, Matrix As lgMathMatrix4, Transpose As Boolean)
SetUniformMatrix4tL (Location As Int, Matrix As lgMathMatrix4, Transpose As Boolean)
SetVertexAttribute (Name As String, Size As Int, Type As Int, Normalize As Boolean, Stride As Int, Buffer As java.nio.Buffer)
SetVertexAttribute2 (Name As String, Size As Int, Type As Int, Normalize As Boolean, Stride As Int, Offset As Int)
SetVertexAttributeL (Location As Int, Size As Int, Type As Int, Normalize As Boolean, Stride As Int, Buffer As java.nio.Buffer)
SetVertexAttributeL2 (Location As Int, Size As Int, Type As Int, Normalize As Boolean, Stride As Int, Offset As Int)
Uniforms() As String [read only]
VertexShaderSource As String [read only]
Members description:
ATTRIBUTE_BINORMAL As String
ATTRIBUTE_COLOR As String
ATTRIBUTE_NORMAL As String
ATTRIBUTE_POSITION_ As String
ATTRIBUTE_TANGENT As String
ATTRIBUTE_TEXCOORD As String
Attributes() As String [read only]
Returns the attributes
Begin
Makes OpenGL ES 2.0 use this vertex and fragment shader pair. When you are done with this shader you have to call End.
DisableVertexAttribute (Name As String)
Disables the vertex attribute with the given name.
dispose
Disposes all resources associated with this shader. Must be called when the shader is no longer used.
EnableVertexAttribute (Name As String)
Enables the vertex attribute with the given name.
End
Disables this shader. Must be called when one is done with the shader. Don't mix it with Dispose, that will release the shader resources.
FetchUniformLocation (Name As String, Pedantic As Boolean) As Int
FragmentShaderSource As String [read only]
Returns the source of the fragment shader.
GetAttributeLocation (Name As String) As Int
Returns the location of the attribute or -1.
GetAttributeSize (Name As String) As Int
Returns the size of the attribute or 0.
GetAttributeType (Name As String) As Int
Returns the type of the attribute, one of lgGL.GL20_FLOAT, lgGL.GL20_FLOAT_VEC2 etc.
GetManagedStatus As String
GetUniformLocation (Name As String) As Int
Returns the location of the uniform or -1.
GetUniformSize (Name As String) As Int
Returns the size of the uniform or 0.
GetUniformType (Name As String) As Int
Returns the type of the uniform, one of lgGL.GL20_FLOAT, lgGL.GL20_FLOAT_VEC2 etc.
HasAttribute (Name As String) As Boolean
Returns whether the attribute is available in the shader
HasUniform (Name As String) As Boolean
Returns whether the uniform is available in the shader
Initialize (VertexShader As String, FragmentShader As String)
Constructs a new ShaderProgram and immediately compiles it.
InitializeWithFiles (VertexShader As lgFileHandle, FragmentShader As lgFileHandle)
Constructs a new ShaderProgram and immediately compiles it.
InternalObject As com.badlogic.gdx.graphics.glutils.ShaderProgram [read only]
IsCompiled As Boolean
Returns whether this ShaderProgram compiled successfully.
Log As String [read only]
Returns the log info for the shader compilation and program linking stage. The shader needs to be bound for this method to have an effect.
Pedantic As Boolean
Gets or sets the flag indicating whether attributes & uniforms must be present at all times.
SetAttributef (Name As String, Value1 As Float, Value2 As Float, Value3 As Float, Value4 As Float)
Sets the given attribute.
Name: the name of the attribute
Value1: the first value
Value2: the second value
Value3: the third value
Value4: the fourth value
SetUniform1f (Name As String, Value As Float)
Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform1fL (Location As Int, Value As Float)
Sets the uniform with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform1fV (Name As String, Values() As Float, Offset As Int, Length As Int)
SetUniform1fVL (Location As Int, Values() As Float, Offset As Int, Length As Int)
SetUniform1i (Name As String, Value As Int)
Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform1iL (Location As Int, Value As Int)
Sets the uniform with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform2f (Name As String, Value1 As Float, Value2 As Float)
Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform2fL (Location As Int, Value1 As Float, Value2 As Float)
Sets the uniform with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform2fV (Name As String, Values() As Float, Offset As Int, Length As Int)
SetUniform2fVL (Location As Int, Values() As Float, Offset As Int, Length As Int)
SetUniform2i (Name As String, Value1 As Int, Value2 As Int)
Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform2iL (Location As Int, Value1 As Int, Value2 As Int)
Sets the uniform with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform3f (Name As String, Value1 As Float, Value2 As Float, Value3 As Float)
Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform3fL (Location As Int, Value1 As Float, Value2 As Float, Value3 As Float)
Sets the uniform with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform3fV (Name As String, Values() As Float, Offset As Int, Length As Int)
SetUniform3fVL (Location As Int, Values() As Float, Offset As Int, Length As Int)
SetUniform3i (Name As String, Value1 As Int, Value2 As Int, Value3 As Int)
Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform3iL (Location As Int, Value1 As Int, Value2 As Int, Value3 As Int)
Sets the uniform with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform4f (Name As String, Value1 As Float, Value2 As Float, Value3 As Float, Value4 As Float)
Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform4fL (Location As Int, Value1 As Float, Value2 As Float, Value3 As Float, Value4 As Float)
Sets the uniform with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform4fV (Name As String, Values() As Float, Offset As Int, Length As Int)
SetUniform4fVL (Location As Int, Values() As Float, Offset As Int, Length As Int)
SetUniform4i (Name As String, Value1 As Int, Value2 As Int, Value3 As Int, Value4 As Int)
Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniform4iL (Location As Int, Value1 As Int, Value2 As Int, Value3 As Int, Value4 As Int)
Sets the uniform with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniformColor (Name As String, Color As lgColor)
Sets the uniform with the given name and color. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniformColorL (Location As Int, Color As lgColor)
Sets the uniform with the given location and color. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniformMatrix3 (Name As String, Matrix As lgMathMatrix3)
Sets the uniform matrix with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniformMatrix3L (Location As Int, Matrix As lgMathMatrix3)
Sets the uniform matrix with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniformMatrix3t (Name As String, Matrix As lgMathMatrix3, Transpose As Boolean)
Sets the uniform matrix with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
Transpose: whether the matrix should be transposed
SetUniformMatrix3tL (Location As Int, Matrix As lgMathMatrix3, Transpose As Boolean)
Sets the uniform matrix with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
Transpose: whether the matrix should be transposed
SetUniformMatrix4 (Name As String, Matrix As lgMathMatrix4)
Sets the uniform matrix with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniformMatrix4fV (Name As String, Values() As Float, Offset As Int, Length As Int)
SetUniformMatrix4fVL (Location As Int, Values() As Float, Offset As Int, Length As Int)
SetUniformMatrix4L (Location As Int, Matrix As lgMathMatrix4)
Sets the uniform matrix with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
SetUniformMatrix4t (Name As String, Matrix As lgMathMatrix4, Transpose As Boolean)
Sets the uniform matrix with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
Transpose: whether the matrix should be transposed
SetUniformMatrix4tL (Location As Int, Matrix As lgMathMatrix4, Transpose As Boolean)
Sets the uniform matrix with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
Transpose: whether the matrix should be transposed
SetVertexAttribute (Name As String, Size As Int, Type As Int, Normalize As Boolean, Stride As Int, Buffer As java.nio.Buffer)
Sets the vertex attribute with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
Name: the attribute name
Size: the number of components, must be >= 1 and <= 4
Type: the type, must be one of lgGL.GL20_BYTE, lgGL.GL20_UNSIGNED_BYTE, lgGL.GL20_SHORT, lgGL.GL20_UNSIGNED_SHORT, lgGL.GL20_FIXED, or lgGL.GL20_FLOAT.
Normalize: whether fixed point data should be normalized. Will not work on the desktop
Stride: the stride in bytes between successive attributes
Buffer: the buffer containing the vertex attributes.
SetVertexAttribute2 (Name As String, Size As Int, Type As Int, Normalize As Boolean, Stride As Int, Offset As Int)
Sets the vertex attribute with the given name. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
Name: the attribute name
Size: the number of components, must be >= 1 and <= 4
Type: the type, must be one of lgGL.GL20_BYTE, lgGL.GL20_UNSIGNED_BYTE, lgGL.GL20_SHORT, lgGL.GL20_UNSIGNED_SHORT, lgGL.GL20_FIXED, or lgGL.GL20_FLOAT.
Normalize: whether fixed point data should be normalized.
Stride: the stride in bytes between successive attributes
Offset: byte offset into the vertex buffer object bound to lgGL.GL20_ARRAY_BUFFER.
SetVertexAttributeL (Location As Int, Size As Int, Type As Int, Normalize As Boolean, Stride As Int, Buffer As java.nio.Buffer)
Sets the vertex attribute with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
Size: the number of components, must be >= 1 and <= 4
Type: the type, must be one of lgGL.GL20_BYTE, lgGL.GL20_UNSIGNED_BYTE, lgGL.GL20_SHORT, lgGL.GL20_UNSIGNED_SHORT, lgGL.GL20_FIXED, or lgGL.GL20_FLOAT.
Normalize: whether fixed point data should be normalized. Will not work on the desktop
Stride: the stride in bytes between successive attributes
Buffer: the buffer containing the vertex attributes.
SetVertexAttributeL2 (Location As Int, Size As Int, Type As Int, Normalize As Boolean, Stride As Int, Offset As Int)
Sets the vertex attribute with the given location. Throws an IllegalArgumentException in case it is not called in between a Begin/End block.
Size: the number of components, must be >= 1 and <= 4
Type: the type, must be one of lgGL.GL20_BYTE, lgGL.GL20_UNSIGNED_BYTE, lgGL.GL20_SHORT, lgGL.GL20_UNSIGNED_SHORT, lgGL.GL20_FIXED, or lgGL.GL20_FLOAT.
Normalize: whether fixed point data should be normalized.
Stride: the stride in bytes between successive attributes
Offset: byte offset into the vertex buffer object bound to lgGL.GL20_ARRAY_BUFFER.
Uniforms() As String [read only]
Returns the uniforms
VertexShaderSource As String [read only]
Returns the source of the vertex shader.
Events:
None
Members:
Arc (X As Float, Y As Float, Radius As Float, Start As Float, Angle As Float)
Arc2 (X As Float, Y As Float, Radius As Float, Start As Float, Angle As Float, Segments As Int)
Begin (ShpType As com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType)
Box (X As Float, Y As Float, Z As Float, Width As Float, Height As Float, Depth As Float)
Circle (X As Float, Y As Float, Radius As Float)
Circle2 (X As Float, Y As Float, Radius As Float, Segments As Int)
Color As lgColor
Cone (X As Float, Y As Float, Z As Float, Radius As Float, Height As Float)
Cone2 (X As Float, Y As Float, Z As Float, Radius As Float, Height As Float, Segments As Int)
CurrentType As com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType [read only]
Curve (X1 As Float, Y1 As Float, cX1 As Float, cY1 As Float, cX2 As Float, cY2 As Float, X2 As Float, Y2 As Float, Segments As Int)
dispose
Ellipse (X As Float, Y As Float, Width As Float, Height As Float)
Ellipse2 (X As Float, Y As Float, Width As Float, Height As Float, Segments As Int)
End
Flush
Identity
Initialize
Initialize2 (MaxVertices As Int)
InternalObject As com.badlogic.gdx.graphics.glutils.ShapeRenderer [read only]
Line (X As Float, Y As Float, X2 As Float, Y2 As Float)
Line2 (X As Float, Y As Float, Z As Float, X2 As Float, Y2 As Float, Z2 As Float)
Line3 (V1 As lgMathVector2, V2 As lgMathVector2)
Line4 (V1 As lgMathVector3, V2 As lgMathVector3)
Line5 (X As Float, Y As Float, X2 As Float, Y2 As Float, C1 As lgColor, C2 As lgColor)
Point (X As Float, Y As Float, Z As Float)
Polygon (Vertices() As Float)
Polygon2 (Vertices() As Float, Offset As Int, Count As Int)
Polyline (Vertices() As Float)
Polyline2 (Vertices() As Float, Offset As Int, Count As Int)
ProjectionMatrix As lgMathMatrix4
Rect (X As Float, Y As Float, Width As Float, Height As Float)
Rect2 (X As Float, Y As Float, Width As Float, Height As Float, Col1 As lgColor, Col2 As lgColor, Col3 As lgColor, Col4 As lgColor)
Rect3 (X As Float, Y As Float, Width As Float, Height As Float, OriginX As Float, OriginY As Float, Rotation As Float)
Rect4 (X As Float, Y As Float, Width As Float, Height As Float, OriginX As Float, OriginY As Float, Rotation As Float, Col1 As lgColor, Col2 As lgColor, Col3 As lgColor, Col4 As lgColor)
Rotate (axisX As Float, axisY As Float, axisZ As Float, Angle As Float)
Scale (scaleX As Float, scaleY As Float, scaleZ As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
SHAPETYPE_Filled As com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType
SHAPETYPE_Line As com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType
SHAPETYPE_Point As com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType
TransformMatrix As lgMathMatrix4
Translate (X As Float, Y As Float, Z As Float)
Triangle (X1 As Float, Y1 As Float, X2 As Float, Y2 As Float, X3 As Float, Y3 As Float)
X (X As Float, Y As Float, Radius As Float)
Members description:
Arc (X As Float, Y As Float, Radius As Float, Start As Float, Angle As Float)
Calls Arc2 by estimating the number of segments needed for a smooth arc.
Arc2 (X As Float, Y As Float, Radius As Float, Start As Float, Angle As Float, Segments As Int)
Draws an arc with the specified number of segments.
Begin (ShpType As com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType)
Starts a new batch of shapes. All shapes within the batch have to have the type specified. The call to this method must be paired with a call to End. In case OpenGL ES 1.x is used, the projection and modelview matrix will be modified.
Box (X As Float, Y As Float, Z As Float, Width As Float, Height As Float, Depth As Float)
Draws a box. The X, Y and Z coordinate specify the bottom left front corner of the rectangle. The ShapeType passed to Begin has to be SHAPETYPE_Line.
Circle (X As Float, Y As Float, Radius As Float)
Calls Circle2 by estimating the number of segments needed for a smooth circle.
Circle2 (X As Float, Y As Float, Radius As Float, Segments As Int)
Draws a circle with the specified number of segments.
Color As lgColor
Gets or sets the color to be used by shapes.
Cone (X As Float, Y As Float, Z As Float, Radius As Float, Height As Float)
Calls Cone2 by estimating the number of segments needed for a smooth circular base.
Cone2 (X As Float, Y As Float, Z As Float, Radius As Float, Height As Float, Segments As Int)
Draws a cone with the specified number of segments.
CurrentType As com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType [read only]
Returns the current ShapeType used.
Curve (X1 As Float, Y1 As Float, cX1 As Float, cY1 As Float, cX2 As Float, cY2 As Float, X2 As Float, Y2 As Float, Segments As Int)
Draws a curve with the specified number of segments.
dispose
Disposes all resources associated with this ShapeRenderer.
Ellipse (X As Float, Y As Float, Width As Float, Height As Float)
Calls Ellipse2 by estimating the number of segments needed for a smooth ellipse.
Ellipse2 (X As Float, Y As Float, Width As Float, Height As Float, Segments As Int)
Draws an ellipse with the specified number of segments.
End
Finishes the batch of shapes and ensures they get rendered.
Flush
Identity
Sets the transformation matrix to identity.
Initialize
Initialize2 (MaxVertices As Int)
InternalObject As com.badlogic.gdx.graphics.glutils.ShapeRenderer [read only]
Line (X As Float, Y As Float, X2 As Float, Y2 As Float)
Draws a line in the X/Y plane. The ShapeType passed to Begin has to be SHAPETYPE_Line.
Line2 (X As Float, Y As Float, Z As Float, X2 As Float, Y2 As Float, Z2 As Float)
Draws a line. The ShapeType passed to Begin has to be SHAPETYPE_Line.
Line3 (V1 As lgMathVector2, V2 As lgMathVector2)
Draws a line. The ShapeType passed to Begin has to be SHAPETYPE_Line.
Line4 (V1 As lgMathVector3, V2 As lgMathVector3)
Draws a line. The ShapeType passed to Begin has to be SHAPETYPE_Line.
Line5 (X As Float, Y As Float, X2 As Float, Y2 As Float, C1 As lgColor, C2 As lgColor)
Draws a line in the X/Y plane. The ShapeType passed to Begin has to be SHAPETYPE_Line. The line is drawn with 2 colors interpolated between start & end point.
C1: Color at start of the line.
C2: Color at end of the line.
Point (X As Float, Y As Float, Z As Float)
Draws a point. The ShapeType passed to Begin has to be SHAPETYPE_Point.
Polygon (Vertices() As Float)
Draws a polygon in the X/Y plane. The vertices must contain at least 3 points (6 floats X,Y). The ShapeType passed to Begin has to be SHAPETYPE_Line.
Polygon2 (Vertices() As Float, Offset As Int, Count As Int)
Draws a polygon in the X/Y plane. The vertices must contain at least 3 points (6 floats X,Y). The ShapeType passed to Begin has to be SHAPETYPE_Line.
Polyline (Vertices() As Float)
Draws a polyline in the X/Y plane.
Polyline2 (Vertices() As Float, Offset As Int, Count As Int)
Draws a polyline in the X/Y plane. The vertices must contain at least 2 points (4 floats X,Y). The ShapeType passed to Begin has to be SHAPETYPE_Line.
ProjectionMatrix As lgMathMatrix4
Gets or sets the projection matrix to be used for rendering. Usually this will be set to Camera.Combined.
Rect (X As Float, Y As Float, Width As Float, Height As Float)
Draws a rectangle in the X/Y plane. The X and Y coordinates specify the bottom left corner of the rectangle. The ShapeType passed to Begin has to be SHAPETYPE_Filled or SHAPETYPE_Line.
Rect2 (X As Float, Y As Float, Width As Float, Height As Float, Col1 As lgColor, Col2 As lgColor, Col3 As lgColor, Col4 As lgColor)
Draws a rectangle in the X/Y plane with the specified colors. The X and Y coordinates specify the bottom left corner of the rectangle. The ShapeType passed to Begin has to be SHAPETYPE_Filled or SHAPETYPE_Line.
Col1: The color at (x, y)
Col2: The color at (x + width, y)
Col3: The color at (x + width, y + height)
Col4: The color at (x, y + height)
Rect3 (X As Float, Y As Float, Width As Float, Height As Float, OriginX As Float, OriginY As Float, Rotation As Float)
Draws a rectangle in the X/Y plane. The X and Y coordinates specify the bottom left corner of the rectangle. The OriginX and OriginY specify the point about which to rotate the rectangle. The rotation is in degrees.
The ShapeType passed to Begin has to be SHAPETYPE_Filled or SHAPETYPE_Line.
Rect4 (X As Float, Y As Float, Width As Float, Height As Float, OriginX As Float, OriginY As Float, Rotation As Float, Col1 As lgColor, Col2 As lgColor, Col3 As lgColor, Col4 As lgColor)
Draws a rectangle in the X/Y plane with the specified colors. The X and Y coordinates specify the bottom left corner of the rectangle. The OriginX and OriginY specify the point about which to rotate the rectangle. The rotation is in degrees.
The ShapeType passed to Begin has to be SHAPETYPE_Filled or SHAPETYPE_Line.
Col1: The color at (x, y)
Col2: The color at (x + width, y)
Col3: The color at (x + width, y + height)
Col4: The color at (x, y + height)
Rotate (axisX As Float, axisY As Float, axisZ As Float, Angle As Float)
Multiplies the current transformation matrix by a rotation matrix.
Angle: Angle in degrees.
Scale (scaleX As Float, scaleY As Float, scaleZ As Float)
Multiplies the current transformation matrix by a scale matrix.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
Sets the color to be used by shapes.
R: Red, from 0 to 1
G: Green, from 0 to 1
B: Blue, from 0 to 1
A: Alpha, from 0 to 1
SHAPETYPE_Filled As com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType
SHAPETYPE_Line As com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType
SHAPETYPE_Point As com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType
TransformMatrix As lgMathMatrix4
Gets or sets the transformation matrix.
Translate (X As Float, Y As Float, Z As Float)
Multiplies the current transformation matrix by a translation matrix.
Triangle (X1 As Float, Y1 As Float, X2 As Float, Y2 As Float, X3 As Float, Y3 As Float)
X (X As Float, Y As Float, Radius As Float)
Draws two crossed lines.
Socket implementation using java.net.Socket.
Permissions:
android.permission.INTERNET
Events:
None
Members:
dispose
InputStream As java.io.InputStream [read only]
isConnected As Boolean
OutputStream As java.io.OutputStream [read only]
Members description:
dispose
InputStream As java.io.InputStream [read only]
isConnected As Boolean
OutputStream As java.io.OutputStream [read only]
Options for {@link Socket} instances.
Events:
None
Members:
keepAlive As Boolean
linger As Boolean
lingerDuration As Int
performancePrefBandwidth As Int
performancePrefConnectionTime As Int
performancePrefLatency As Int
receiveBufferSize As Int
sendBufferSize As Int
tcpNoDelay As Boolean
trafficClass As Int
Members description:
keepAlive As Boolean
True to enable SO_KEEPALIVE.
linger As Boolean
Enable/disable SO_LINGER with the specified linger time in seconds. Only affects socket close.
lingerDuration As Int
The linger duration in seconds (NOT milliseconds!). Only used if linger is true!
performancePrefBandwidth As Int
performancePrefConnectionTime As Int
Performance preferences are described by three integers whose values indicate the relative
importance of short connection time, low latency, and high bandwidth. The absolute
values of the integers are irrelevant; in order to choose a protocol the values are
simply compared, with larger values indicating stronger preferences.
Negative values represent a lower priority than positive values. If the application
prefers short connection time over both low latency and high bandwidth, for example,
then it could set performancePrefConnectionTime to 1 and the other properties to 0.
If the application prefers high bandwidth above low latency, and low latency above
short connection time, then it could set performancePrefConnectionTime to 0,
performancePrefLatency to 1 and performancePrefBandwidth to 2.
performancePrefLatency As Int
receiveBufferSize As Int
The SO_RCVBUF (receive buffer) size in bytes.
sendBufferSize As Int
The SO_SNDBUF (send buffer) size in bytes.
tcpNoDelay As Boolean
True to enable TCP_NODELAY (disable/enable Nagle's algorithm).
trafficClass As Int
The traffic class describes the type of connection that shall be established.
The traffic class must be in the range 0 <= trafficClass <= 255.
The traffic class is bitset created by bitwise-or'ing values such the following :
- IPTOS_LOWCOST (0x02) - cheap!
- IPTOS_RELIABILITY (0x04) - reliable connection with little package loss.
- IPTOS_THROUGHPUT (0x08) - lots of data being sent.
- IPTOS_LOWDELAY (0x10) - low delay.
Events:
None
Members:
dispose
Initialize (Internal As String)
Initialize2 (File As lgFileHandle)
InternalObject As com.badlogic.gdx.audio.Sound [read only]
Loop As Long
Loop2 (Volume As Float) As Long
Loop3 (Volume As Float, Pitch As Float, Pan As Float) As Long
Pause
Pause2 (SoundId As Long)
Play As Long
Play2 (Volume As Float) As Long
Play3 (Volume As Float, Pitch As Float, Pan As Float) As Long
Resume
Resume2 (SoundId As Long)
SetLooping (SoundId As Long, Looping As Boolean)
SetPan (SoundId As Long, Pan As Float, Volume As Float)
SetPitch (SoundId As Long, Pitch As Float)
SetPriority (SoundId As Long, Priority As Int)
SetVolume (SoundId As Long, Volume As Float)
Stop
Stop2 (SoundId As Long)
Members description:
dispose
Releases all the resources.
Initialize (Internal As String)
Creates a new Sound which is used to play back audio effects such as gun shots or explosions. The Sound's audio data is retrieved from the file specified. Note that the complete audio data is loaded into RAM. The current upper limit for decoded audio is 1 MB. Currently supported formats are WAV, MP3 and OGG. The Sound has to be disposed if it is no longer used via the Dispose method.
Internal: Internal file path.
Initialize2 (File As lgFileHandle)
Creates a new Sound which is used to play back audio effects such as gun shots or explosions. The Sound's audio data is retrieved from the file specified. Note that the complete audio data is loaded into RAM. The current upper limit for decoded audio is 1 MB. Currently supported formats are WAV, MP3 and OGG. The Sound has to be disposed if it is no longer used via the Dispose method.
File: The file handle.
InternalObject As com.badlogic.gdx.audio.Sound [read only]
Loop As Long
Plays the sound, looping. If the sound is already playing, it will be played again, concurrently.
Returns the id of the sound instance if successful, or -1 on failure.
Loop2 (Volume As Float) As Long
Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. You need to stop the sound via a call to Stop2 using the returned id.
Returns the id of the sound instance if successful, or -1 on failure.
Volume: The volume in the range [0,1]
Loop3 (Volume As Float, Pitch As Float, Pan As Float) As Long
Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. You need to stop the sound via a call to Stop2 using the returned id.
Returns the id of the sound instance if successful, or -1 on failure.
Volume: The volume in the range [0,1].
Pitch: The pitch multiplier, 1 = default, >1 = faster, <1 = slower, the value has to be between 0.5 and 2.0.
Pan: Panning in the range -1 (full left) to 1 (full right). 0 is center position.
Pause
Pauses all instances of this sound.
Pause2 (SoundId As Long)
Pauses the sound instance with the given id as returned by Play or Loop. If the sound is no longer playing, this has no effect.
Play As Long
Plays the sound. If the sound is already playing, it will be played again, concurrently.
Returns the id of the sound instance if successful, or -1 on failure.
Play2 (Volume As Float) As Long
Plays the sound. If the sound is already playing, it will be played again, concurrently.
Returns the id of the sound instance if successful, or -1 on failure.
Volume: The volume in the range [0,1].
Play3 (Volume As Float, Pitch As Float, Pan As Float) As Long
Plays the sound. If the sound is already playing, it will be played again, concurrently.
Returns the id of the sound instance if successful, or -1 on failure.
Volume: The volume in the range [0,1].
Pitch: The pitch multiplier, 1 = default, >1 = faster, <1 = slower, the value has to be between 0.5 and 2.0.
Pan: Panning in the range -1 (full left) to 1 (full right). 0 is center position.
Resume
Resumes all paused instances of this sound.
Resume2 (SoundId As Long)
Resumes the sound instance with the given id as returned by Play or Loop. If the sound is not paused, this has no effect.
SetLooping (SoundId As Long, Looping As Boolean)
Sets the sound instance with the given id to be looping. If the sound is no longer playing this has no effect.
SetPan (SoundId As Long, Pan As Float, Volume As Float)
Sets the panning and volume of the sound instance with the given id as returned by Play or Loop. If the sound is no longer playing, this has no effect.
Pan: Panning in the range -1 (full left) to 1 (full right). 0 is center position.
Volume: The volume in the range [0,1].
SetPitch (SoundId As Long, Pitch As Float)
Changes the pitch multiplier of the sound instance with the given id as returned by Play or Loop. If the sound is no longer playing, this has no effect.
Pitch: The pitch multiplier, 1 = default, >1 = faster, <1 = slower, the value has to be between 0.5 and 2.0.
SetPriority (SoundId As Long, Priority As Int)
Sets the priority of a sound currently being played back. Higher priority sounds will be considered last if the maximum number of concurrently playing sounds is exceeded. This is only a hint and might not be honored by a backend implementation.
Priority: The priority (0 = lowest)
SetVolume (SoundId As Long, Volume As Float)
Changes the volume of the sound instance with the given id as returned by Play or Loop. If the sound is no longer playing, this has no effect.
Volume: The volume in the range 0 (silent) to 1 (max volume).
Stop
Stops playing all instances of this sound.
Stop2 (SoundId As Long)
Stops the sound instance with the given id as returned by Play or Loop. If the sound is no longer playing, this has no effect.
Events:
None
Members:
BoundingRectangle As lgMathRectangle [read only]
Color As lgColor
Draw (SpriteBatch As lgSpriteBatch)
DrawAlpha (SpriteBatch As lgSpriteBatch, AlphaModulation As Float)
Flip (X As Boolean, Y As Boolean)
Height As Float [read only]
Initialize
InitializeWithRegion (TextureRegion As lgTextureRegion)
InitializeWithRegion2 (TextureRegion As lgTextureRegion, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int)
InitializeWithSprite (Sprite As lgSprite)
InitializeWithTexture (Texture As lgTexture)
InitializeWithTexture2 (Texture As lgTexture, srcWidth As Int, srcHeight As Int)
InitializeWithTexture3 (Texture As lgTexture, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int)
InternalObject As com.badlogic.gdx.graphics.g2d.Sprite [read only]
OriginX As Float [read only]
OriginY As Float [read only]
Rotate (Degrees As Float)
Rotate90 (Clockwise As Boolean)
Rotation As Float
Scale (Amount As Float)
ScaleX As Float [read only]
ScaleY As Float [read only]
Scroll (xAmount As Float, yAmount As Float)
Set (Sprite As lgSprite)
SetBounds (X As Float, Y As Float, Width As Float, Height As Float)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
SetOrigin (originX As Float, originY As Float)
SetPosition (X As Float, Y As Float)
SetRegion (U As Float, V As Float, U2 As Float, V2 As Float)
SetScale (scaleX As Float, scaleY As Float)
SetSize (Width As Float, Height As Float)
Translate (xAmount As Float, yAmount As Float)
TranslateX (xAmount As Float)
TranslateY (yAmount As Float)
U As Float [write only]
U2 As Float [write only]
V As Float [write only]
V2 As Float [write only]
Vertices() As Float [read only]
Width As Float [read only]
X As Float
Y As Float
Members description:
BoundingRectangle As lgMathRectangle [read only]
Returns the bounding axis aligned Rectangle that bounds this sprite. The rectangles x and y coordinates describe its bottom left corner. If you change the position or size of the sprite, you have to fetch the triangle again for it to be recomputed.
Color As lgColor
Gets or sets the color used to tint this sprite. Default is White.
Draw (SpriteBatch As lgSpriteBatch)
DrawAlpha (SpriteBatch As lgSpriteBatch, AlphaModulation As Float)
Flip (X As Boolean, Y As Boolean)
Height As Float [read only]
Returns the height of the sprite, not accounting for scale.
Initialize
Creates a sprite. It will need a texture region and bounds set before it can be drawn.
InitializeWithRegion (TextureRegion As lgTextureRegion)
Creates a sprite based on a specific TextureRegion. The new sprite region is a copy of the given region; altering one does not affect the other.
InitializeWithRegion2 (TextureRegion As lgTextureRegion, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int)
Creates a sprite with width, height, and texture region equal to the specified size, relative to specified sprite's texture region.
srcWidth: The width of the texture region. May be negative to flip the sprite when drawn.
srcHeight: The height of the texture region. May be negative to flip the sprite when drawn.
InitializeWithSprite (Sprite As lgSprite)
Creates a sprite that is a copy in every way of the specified sprite.
InitializeWithTexture (Texture As lgTexture)
Creates a sprite with width, height, and texture region equal to the size of the given texture.
InitializeWithTexture2 (Texture As lgTexture, srcWidth As Int, srcHeight As Int)
Creates a sprite with width, height, and texture region equal to the specified size. The texture region's upper left corner will be 0,0.
srcWidth: The width of the texture region. May be negative to flip the sprite when drawn.
srcHeight: The height of the texture region. May be negative to flip the sprite when drawn.
InitializeWithTexture3 (Texture As lgTexture, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int)
Creates a sprite with width, height, and texture region equal to the specified size.
srcWidth: The width of the texture region. May be negative to flip the sprite when drawn.
srcHeight: The height of the texture region. May be negative to flip the sprite when drawn.
InternalObject As com.badlogic.gdx.graphics.g2d.Sprite [read only]
OriginX As Float [read only]
OriginY As Float [read only]
Rotate (Degrees As Float)
Sets the sprite rotation in degrees relative to the current rotation. Rotation is centered on the origin set with SetOrigin.
Rotate90 (Clockwise As Boolean)
Rotates this sprite 90 degrees in-place by rotating the texture coordinates. This rotation is unaffected by Rotation and Rotate.
Rotation As Float
Gets or sets the rotation of the sprite in degrees. Rotation is centered on the origin set with SetOrigin.
Scale (Amount As Float)
Sets the sprite scale relative to the current scale. For example: original scale 2 -> sprite.scale(4) -> final scale 6.
The sprite scales out from the origin. This will not affect the Width and Height values.
ScaleX As Float [read only]
Gets the X scale of the sprite, independent of the size set by SetSize.
ScaleY As Float [read only]
Gets the Y scale of the sprite, independent of the size set by SetSize.
Scroll (xAmount As Float, yAmount As Float)
Offsets the region relative to the current region. Generally the region's size should be the entire size of the texture in the direction(s) it is scrolled.
xAmount: The percentage to offset horizontally.
yAmount: The percentage to offset vertically. This is done in texture space, so up is negative.
Set (Sprite As lgSprite)
Makes this sprite a copy in every way of the specified sprite.
SetBounds (X As Float, Y As Float, Width As Float, Height As Float)
Sets the position and size of the sprite when drawn, before scaling and rotation are applied. If origin, rotation, or scale are changed, it is slightly more efficient to set the bounds after those operations.
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
Sets the color of this sprite.
R: Red, from 0 to 1
G: Green, from 0 to 1
B: Blue, from 0 to 1
A: Alpha, from 0 to 1
SetOrigin (originX As Float, originY As Float)
Sets the origin in relation to the sprite position for scaling and rotation.
SetPosition (X As Float, Y As Float)
Sets the position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to set the position after those operations. If both position and size are to be changed, it is better to use SetBounds.
SetRegion (U As Float, V As Float, U2 As Float, V2 As Float)
SetScale (scaleX As Float, scaleY As Float)
Sets the sprite scale for both X and Y. The sprite scales out from the origin. This will not affect the Width and Height values.
SetSize (Width As Float, Height As Float)
Sets the size of the sprite when drawn, before scaling and rotation are applied. If origin, rotation, or scale are changed, it is slightly more efficient to set the size after those operations. If both position and size are to be changed, it is better to use SetBounds.
Translate (xAmount As Float, yAmount As Float)
Sets the position relative to the current position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to translate after those operations.
TranslateX (xAmount As Float)
Sets the X position relative to the current position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to translate after those operations.
TranslateY (yAmount As Float)
Sets the Y position relative to the current position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to translate after those operations.
U As Float [write only]
U2 As Float [write only]
V As Float [write only]
V2 As Float [write only]
Vertices() As Float [read only]
Returns the packed vertices, colors, and texture coordinates for this sprite.
Width As Float [read only]
Returns the width of the sprite, not accounting for scale.
X As Float
Gets or sets the X position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to set the position after those operations. If both position and size are to be changed, it is better to use SetBounds.
Y As Float
Gets or sets the Y position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to set the position after those operations. If both position and size are to be changed, it is better to use SetBounds.
Events:
None
Members:
Begin
BlendDstFunc As Int [read only]
BlendSrcFunc As Int [read only]
Color As lgColor
CreateDefaultShader As lgShaderProgram
DisableBlending
dispose
DrawRegion (Region As lgTextureRegion, X As Float, Y As Float)
DrawRegion2 (Region As lgTextureRegion, X As Float, Y As Float, Width As Float, Height As Float)
DrawRegion3 (Region As lgTextureRegion, X As Float, Y As Float, originX As Float, originY As Float, Width As Float, Height As Float, scaleX As Float, scaleY As Float, Rotation As Float)
DrawTex (Texture As lgTexture, X As Float, Y As Float)
DrawTex2 (Texture As lgTexture, X As Float, Y As Float, Width As Float, Height As Float)
DrawTex3 (Texture As lgTexture, X As Float, Y As Float, Width As Float, Height As Float, U As Float, V As Float, U2 As Float, V2 As Float)
DrawTex4 (Texture As lgTexture, X As Float, Y As Float, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int)
DrawTex5 (Texture As lgTexture, X As Float, Y As Float, originX As Float, originY As Float, Width As Float, Height As Float, scaleX As Float, scaleY As Float, Rotation As Float, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int, flipX As Boolean, flipY As Boolean)
DrawTexVert (Texture As lgTexture, SpriteVertices() As Float, Offset As Int, Count As Int)
EnableBlending
End
Flush
Initialize
Initialize2 (Size As Int)
Initialize3 (Size As Int, DefaultShader As lgShaderProgram)
InternalObject As com.badlogic.gdx.graphics.g2d.SpriteBatch [read only]
IsBlendingEnabled As Boolean
MaxSpritesInBatch As Int [read only]
ProjectionMatrix As lgMathMatrix4
RenderCalls As Int [read only]
SetBlendFunction (srcFunc As Int, dstFunc As Int)
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
Shader As lgShaderProgram [write only]
TotalRenderCalls As Int [read only]
TransformMatrix As lgMathMatrix4
Members description:
Begin
Sets up the SpriteBatch for drawing. This will disable depth buffer writing. It enables blending and texturing. If you have more texture units enabled than the first one you have to disable them before calling this. Uses a screen coordinate system by default where everything is given in pixels. You can specify your own projection and modelview matrices via ProjectionMatrix and TransformMatrix.
BlendDstFunc As Int [read only]
BlendSrcFunc As Int [read only]
Color As lgColor
Gets or sets the color used to tint images when they are added to the SpriteBatch. Default is White.
CreateDefaultShader As lgShaderProgram
Returns a new instance of the default shader used by SpriteBatch for GL2 when no shader is specified.
DisableBlending
Disables blending for drawing sprites. Calling this within Begin/End will flush the batch.
dispose
Disposes all resources associated with this SpriteBatch.
DrawRegion (Region As lgTextureRegion, X As Float, Y As Float)
Draws a rectangle with the bottom left corner at X,Y having the width and height of the region.
X: The x-coordinate in screen space
Y: The y-coordinate in screen space
DrawRegion2 (Region As lgTextureRegion, X As Float, Y As Float, Width As Float, Height As Float)
Draws a rectangle with the bottom left corner at X,Y and stretching the region to cover the given width and height.
X: The x-coordinate in screen space
Y: The y-coordinate in screen space
DrawRegion3 (Region As lgTextureRegion, X As Float, Y As Float, originX As Float, originY As Float, Width As Float, Height As Float, scaleX As Float, scaleY As Float, Rotation As Float)
Draws a rectangle with the bottom left corner at X,Y and stretching the region to cover the given width and height. The rectangle is offset by originX, originY relative to the origin. Scale specifies the scaling factor by which the rectangle should be scaled around originX, originY. Rotation specifies the angle of counter clockwise rotation of the rectangle around originX, originY.
DrawTex (Texture As lgTexture, X As Float, Y As Float)
Draws a rectangle with the bottom left corner at X,Y having the width and height of the texture.
X: The X-coordinate in screen space
Y: The Y-coordinate in screen space
DrawTex2 (Texture As lgTexture, X As Float, Y As Float, Width As Float, Height As Float)
Draws a rectangle with the bottom left corner at X,Y and stretching the region to cover the given width and height.
X: The X-coordinate in screen space
Y: The Y-coordinate in screen space
DrawTex3 (Texture As lgTexture, X As Float, Y As Float, Width As Float, Height As Float, U As Float, V As Float, U2 As Float, V2 As Float)
Draws a rectangle with the bottom left corner at X,Y having the given width and height in pixels. The portion of the Texture given by U, V and U2, V2 are used. These coordinates and sizes are given in texture size percentage. The rectangle will have the given tint Color.
X: The X-coordinate in screen space
Y: The Y-coordinate in screen space
DrawTex4 (Texture As lgTexture, X As Float, Y As Float, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int)
Draws a rectangle with the bottom left corner at X,Y having the given width and height in pixels. The portion of the Texture given by srcX, srcY and srcWidth, srcHeight are used. These coordinates and sizes are given in texels.
X: The X-coordinate in screen space
Y: The Y-coordinate in screen space
srcX: The X-coordinate in texel space
srcY: The Y-coordinate in texel space
srcWidth: The source width in texels
srcHeight: The source height in texels
DrawTex5 (Texture As lgTexture, X As Float, Y As Float, originX As Float, originY As Float, Width As Float, Height As Float, scaleX As Float, scaleY As Float, Rotation As Float, srcX As Int, srcY As Int, srcWidth As Int, srcHeight As Int, flipX As Boolean, flipY As Boolean)
Draws a rectangle with the bottom left corner at X,Y having the given width and height in pixels. The rectangle is offset by originX, originY relative to the origin. Scale specifies the scaling factor by which the rectangle should be scaled around originX, originY. Rotation specifies the angle of counter clockwise rotation of the rectangle around originX, originY. The portion of the Texture given by srcX, srcY and srcWidth, srcHeight is used. These coordinates and sizes are given in texels. flipX and flipY specify whether the texture portion should be flipped horizontally or vertically.
X: The X-coordinate in screen space
Y: The Y-coordinate in screen space
originX: The x-coordinate of the scaling and rotation origin relative to the screen space coordinates
originY: The y-coordinate of the scaling and rotation origin relative to the screen space coordinates
Width: The width in pixels
Height: The height in pixels
scaleX: The scale of the rectangle around originX/originY in x
scaleY: The scale of the rectangle around originX/originY in y
Rotation: The angle of counter clockwise rotation of the rectangle around originX/originY
srcX: The x-coordinate in texel space
srcY: The y-coordinate in texel space
srcWidth: The source width in texels
srcHeight: The source height in texels
flipX: Whether to flip the sprite horizontally
flipY: Whether to flip the sprite vertically
DrawTexVert (Texture As lgTexture, SpriteVertices() As Float, Offset As Int, Count As Int)
Draws a rectangle using the given vertices. There must be 4 vertices, each made up of 5 elements in this order: x, y, color, u, v. The Color from the SpriteBatch is not applied.
EnableBlending
Enables blending for sprites. Calling this within Begin/End will flush the batch.
End
Finishes off rendering. Enables depth writes, disables blending and texturing. Must always be called after a call to Begin.
Flush
Causes any pending sprites to be rendered, without ending the SpriteBatch.
Initialize
Constructs a new SpriteBatch with a size of 1000, one buffer, and (if GL2) the default shader. Sets the projection matrix to an orthographic projection with y-axis point upwards, x-axis point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect with respect to the screen resolution.
Initialize2 (Size As Int)
Constructs a SpriteBatch with the specified size, one buffer, and (if GL2) the default shader.
Size: The max number of sprites in a single batch. Max of 5460.
Initialize3 (Size As Int, DefaultShader As lgShaderProgram)
Constructs a SpriteBatch with the specified size and shader. Sets the projection matrix to an orthographic projection with y-axis point upwards, x-axis point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect with respect to the screen resolution.
Size: The max number of sprites in a single batch. Max of 5460.
DefaultShader: The default shader to use. This is not owned by the SpriteBatch and must be disposed separately.
InternalObject As com.badlogic.gdx.graphics.g2d.SpriteBatch [read only]
IsBlendingEnabled As Boolean
Returns whether blending for sprites is enabled.
MaxSpritesInBatch As Int [read only]
Returns the maximum number of sprites rendered in one batch so far.
ProjectionMatrix As lgMathMatrix4
Gets or sets the projection matrix to be used by this SpriteBatch. If this is called inside a Begin/End block, the current batch is flushed to the GPU.
RenderCalls As Int [read only]
Returns the number of render calls since the last Begin.
SetBlendFunction (srcFunc As Int, dstFunc As Int)
Sets the blending function to be used when rendering sprites.
srcFunc: The source function, e.g. GL10_SRC_ALPHA. If set to -1, SpriteBatch won't change the blending function.
dstFunc: The destination function, e.g. GL10_ONE_MINUS_SRC_ALPHA
SetColorRGBA (R As Float, G As Float, B As Float, A As Float)
Sets the color used to tint images when they are added to the SpriteBatch. Default is White.
R: Red, from 0 to 1
G: Green, from 0 to 1
B: Blue, from 0 to 1
A: Alpha, from 0 to 1
Shader As lgShaderProgram [write only]
Sets the shader to be used in a GL ES 2.0 environment. The vertex position attribute is called "a_position",
the texture coordinates attribute is called "a_texCoord0" and the color attribute is called "a_color". See the
lgShaderProgram.ATTRIBUTE constants. The texture coordinates attribute gets "0" appended to indicate the use
of the first texture unit. The combined transform and projection matrix is uploaded via a mat4 uniform called
"u_projTrans". The texture sampler is passed via a uniform called "u_texture".
This function will flush the batch before setting the new shader, so you can call it between Begin and End.
TotalRenderCalls As Int [read only]
Returns the number of rendering calls ever. Will not be reset.
TransformMatrix As lgMathMatrix4
Gets or sets the transform matrix to be used by this SpriteBatch. If this is called inside a Begin/End block, the current batch is flushed to the GPU.
Events:
None
Members:
Bind
Bind2 (Unit As Int)
CreateGLHandle As Int
dispose
Draw (Pixmap As lgPixmap, X As Int, Y As Int)
EnforcePowerOfTwoImages As Boolean [write only]
FILTER_Linear As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_MipMap As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_MipMapLinearLinear As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_MipMapLinearNearest As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_MipMapNearestLinear As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_MipMapNearestNearest As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_Nearest As com.badlogic.gdx.graphics.Texture.TextureFilter
GetTextureData As lgTextureData
Height As Int [read only]
Initialize (InternalPath As String)
InitializeWithData (Data As lgTextureData)
InitializeWithFile (File As lgFileHandle)
InitializeWithFile2 (File As lgFileHandle, UseMipMaps As Boolean)
InitializeWithPixmap (Pixmap As lgPixmap)
InitializeWithPixmap2 (Pixmap As lgPixmap, UseMipMaps As Boolean)
InternalObject As com.badlogic.gdx.graphics.Texture [read only]
IsManaged As Boolean
Load (Data As lgTextureData)
MagFilter As com.badlogic.gdx.graphics.Texture.TextureFilter [read only]
ManagedStatus As String [read only]
MinFilter As com.badlogic.gdx.graphics.Texture.TextureFilter [read only]
NumManagedTextures As Int [read only]
SetAssetManager (AssetMgr As lgAssetManager)
SetFilter (MinFilter As com.badlogic.gdx.graphics.Texture.TextureFilter, MagFilter As com.badlogic.gdx.graphics.Texture.TextureFilter)
SetWrap (U As com.badlogic.gdx.graphics.Texture.TextureWrap, V As com.badlogic.gdx.graphics.Texture.TextureWrap)
TextureObjectHandle As Int [read only]
UWrap As com.badlogic.gdx.graphics.Texture.TextureWrap [read only]
VWrap As com.badlogic.gdx.graphics.Texture.TextureWrap [read only]
Width As Int [read only]
WRAP_ClampToEdge As com.badlogic.gdx.graphics.Texture.TextureWrap
WRAP_MirroredRepeat As com.badlogic.gdx.graphics.Texture.TextureWrap
WRAP_Repeat As com.badlogic.gdx.graphics.Texture.TextureWrap
Members description:
Bind
Binds this texture. The texture will be bound to the currently active texture unit specified via glActiveTexture.
Bind2 (Unit As Int)
Binds the texture to the given texture unit. Sets the currently active texture unit via glActiveTexture.
CreateGLHandle As Int
dispose
Disposes all resources associated with the texture.
Draw (Pixmap As lgPixmap, X As Int, Y As Int)
Draws the given Pixmap to the texture at position X, Y. No clipping is performed so you have to make sure that you draw only inside the texture region. Note that this will only draw to mipmap level 0!
EnforcePowerOfTwoImages As Boolean [write only]
Sets whether to enforce power of two images in OpenGL ES 1.0 or not.
FILTER_Linear As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_MipMap As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_MipMapLinearLinear As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_MipMapLinearNearest As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_MipMapNearestLinear As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_MipMapNearestNearest As com.badlogic.gdx.graphics.Texture.TextureFilter
FILTER_Nearest As com.badlogic.gdx.graphics.Texture.TextureFilter
GetTextureData As lgTextureData
Height As Int [read only]
Returns the height of the texture in pixels.
Initialize (InternalPath As String)
InitializeWithData (Data As lgTextureData)
InitializeWithFile (File As lgFileHandle)
InitializeWithFile2 (File As lgFileHandle, UseMipMaps As Boolean)
InitializeWithPixmap (Pixmap As lgPixmap)
InitializeWithPixmap2 (Pixmap As lgPixmap, UseMipMaps As Boolean)
InternalObject As com.badlogic.gdx.graphics.Texture [read only]
IsManaged As Boolean
Returns whether this texture is managed or not.
Load (Data As lgTextureData)
New data must have the same managed status as the old data.
MagFilter As com.badlogic.gdx.graphics.Texture.TextureFilter [read only]
ManagedStatus As String [read only]
MinFilter As com.badlogic.gdx.graphics.Texture.TextureFilter [read only]
NumManagedTextures As Int [read only]
Returns the number of managed textures currently loaded.
SetAssetManager (AssetMgr As lgAssetManager)
Sets the AssetManager. When the context is lost, textures managed by the asset manager are reloaded by the manager on a separate thread. Textures not managed by the AssetManager are reloaded via the usual means on the rendering thread.
SetFilter (MinFilter As com.badlogic.gdx.graphics.Texture.TextureFilter, MagFilter As com.badlogic.gdx.graphics.Texture.TextureFilter)
SetWrap (U As com.badlogic.gdx.graphics.Texture.TextureWrap, V As com.badlogic.gdx.graphics.Texture.TextureWrap)
Sets the TextureWrap for this texture on the U and V axis. This will bind this texture!
U: The U wrap
V: The V wrap
TextureObjectHandle As Int [read only]
UWrap As com.badlogic.gdx.graphics.Texture.TextureWrap [read only]
VWrap As com.badlogic.gdx.graphics.Texture.TextureWrap [read only]
Width As Int [read only]
Returns the width of the texture in pixels.
WRAP_ClampToEdge As com.badlogic.gdx.graphics.Texture.TextureWrap
WRAP_MirroredRepeat As com.badlogic.gdx.graphics.Texture.TextureWrap
WRAP_Repeat As com.badlogic.gdx.graphics.Texture.TextureWrap
Events:
None
Members:
AddRegion (Name As String, Region As lgTextureRegion) As lgTextureAtlasRegion
AddRegion2 (Name As String, Texture As lgTexture, X As Int, Y As Int, Width As Int, Height As Int) As lgTextureAtlasRegion
Create9Patch (Name As String) As lgNinePatch
CreateRegionDrawable (Name As String) As lgScn2DTextureRegionDrawable
CreateSprite (Name As String) As lgSprite
CreateSprite2 (Name As String, Index As Int) As lgSprite
CreateSprites As List
CreateSprites2 (Name As String) As List
dispose
FindRegion (Name As String) As lgTextureAtlasRegion
FindRegion2 (Name As String, Index As Int) As lgTextureAtlasRegion
FindRegions (Name As String) As List
FindRegions2 (Name As String) As lgTextureAtlasRegion()
GetAllRegions As List
GetAllTextures As List
Initialize
InitializeWithFile (Internal As String)
InitializeWithFile2 (PackFile As lgFileHandle)
InitializeWithFile3 (PackFile As lgFileHandle, ImagesDir As lgFileHandle)
InternalObject As com.badlogic.gdx.graphics.g2d.TextureAtlas [read only]
Members description:
AddRegion (Name As String, Region As lgTextureRegion) As lgTextureAtlasRegion
Adds a region to the atlas. The texture for the specified region will be disposed when the atlas is disposed.
AddRegion2 (Name As String, Texture As lgTexture, X As Int, Y As Int, Width As Int, Height As Int) As lgTextureAtlasRegion
Adds a region to the atlas. The specified texture will be disposed when the atlas is disposed.
Create9Patch (Name As String) As lgNinePatch
Returns the first region found with the specified name as a NinePatch. The region must have been packed with ninepatch splits. This method uses string comparison to find the region and constructs a new ninepatch, so the result should be cached rather than calling this method multiple times.
CreateRegionDrawable (Name As String) As lgScn2DTextureRegionDrawable
Returns the first region found with the specified name as a TextureRegionDrawable. This method uses string comparison to find the region and constructs a new TextureRegionDrawable, so the result should be cached rather than calling this method multiple times.
MinWidth and MinHeight are set to the region size.
CreateSprite (Name As String) As lgSprite
Returns the first region found with the specified name as a sprite. If whitespace was stripped from the region when it was packed, the sprite is automatically positioned as if whitespace had not been stripped. This method uses string comparison to find the region and constructs a new sprite, so the result should be cached rather than calling this method multiple times.
CreateSprite2 (Name As String, Index As Int) As lgSprite
Returns the first region found with the specified name and index as a sprite. This method uses string comparison to find the region and constructs a new sprite, so the result should be cached rather than calling this method multiple times.
CreateSprites As List
Returns all regions in the atlas as sprites. This method uses string comparison to find the regions and constructs new sprites, so the result should be cached rather than calling this method multiple times.
CreateSprites2 (Name As String) As List
Returns all regions with the specified name as sprites, ordered by smallest to largest index. This method uses string comparison to find the regions and constructs new sprites, so the result should be cached rather than calling this method multiple times.
dispose
Releases all resources associated with this TextureAtlas instance. This releases all the textures backing all TextureRegions and Sprites, which should no longer be used after calling Dispose.
FindRegion (Name As String) As lgTextureAtlasRegion
Returns the first region found with the specified name. This method uses string comparison to find the region, so the result should be cached rather than calling this method multiple times.
FindRegion2 (Name As String, Index As Int) As lgTextureAtlasRegion
Returns the first region found with the specified name and index. This method uses string comparison to find the region, so the result should be cached rather than calling this method multiple times.
FindRegions (Name As String) As List
Returns all regions with the specified name, ordered by smallest to largest index, in a list. This method uses string comparison to find the regions, so the result should be cached rather than calling this method multiple times.
FindRegions2 (Name As String) As lgTextureAtlasRegion()
Returns all regions with the specified name, ordered by smallest to largest index, in an array. This method uses string comparison to find the regions, so the result should be cached rather than calling this method multiple times.
GetAllRegions As List
Returns all regions in the atlas.
GetAllTextures As List
Returns the textures of the pages, unordered.
Initialize
Creates an empty atlas to which regions can be added.
InitializeWithFile (Internal As String)
Loads the specified pack file, using the internal path to find the page images.
InitializeWithFile2 (PackFile As lgFileHandle)
Loads the specified pack file, using the parent directory of the pack file to find the page images.
InitializeWithFile3 (PackFile As lgFileHandle, ImagesDir As lgFileHandle)
Loads the specified pack file and find the page images in the specified directory.
InternalObject As com.badlogic.gdx.graphics.g2d.TextureAtlas [read only]
Events:
None
Members:
Flip (X As Boolean, Y As Boolean)
Index As Int [read only]
Initialize (Region As lgTextureAtlasRegion)
InternalObject As com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion [read only]
IsFlipX As Boolean
IsFlipY As Boolean
Name As String [read only]
OffsetX As Float [read only]
OffsetY As Float [read only]
OriginalHeight As Int [read only]
OriginalWidth As Int [read only]
PackedHeight As Int [read only]
PackedWidth As Int [read only]
Pads() As Int [read only]
RegionHeight As Int
RegionWidth As Int
RegionX As Int
RegionY As Int
Scroll (xAmount As Float, yAmount As Float)
SetRegion (X As Int, Y As Int, Width As Int, Height As Int)
SetRegion2 (U As Float, V As Float, U2 As Float, V2 As Float)
Split (TileWidth As Int, TileHeight As Int) As lgTextureRegion(,)
Splits() As Int [read only]
Texture As lgTexture
U As Float
U2 As Float
V As Float
V2 As Float
Members description:
Flip (X As Boolean, Y As Boolean)
Flips the region, adjusting the offset so the image appears to be flip as if no whitespace has been removed for packing.
Index As Int [read only]
Gets the number at the end of the original image file name, or -1 if none.
When sprites are packed, if the original file name ends with a number, it is stored as the index and is not considered as part of the sprite's name. This is useful for keeping animation frames in order.
Initialize (Region As lgTextureAtlasRegion)
Creates a new TextureAtlasRegion by copying the region and the properties of another TextureAtlasRegion.
InternalObject As com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion [read only]
IsFlipX As Boolean
IsFlipY As Boolean
Name As String [read only]
Gets the name of the original image file, up to the first underscore. Underscores denote special instructions to the texture packer.
OffsetX As Float [read only]
Gets the offset from the left of the original image to the left of the packed image, after whitespace was removed for packing.
OffsetY As Float [read only]
Gets the offset from the bottom of the original image to the bottom of the packed image, after whitespace was removed for packing.
OriginalHeight As Int [read only]
Gets the height of the image, before whitespace was removed for packing.
OriginalWidth As Int [read only]
Gets the width of the image, before whitespace was removed and rotation was applied for packing.
PackedHeight As Int [read only]
Gets the height of the image, after whitespace was removed for packing.
PackedWidth As Int [read only]
Gets the width of the image, after whitespace was removed for packing.
Pads() As Int [read only]
Gets the ninepatch pads, or null if not a ninepatch or has no padding. Returns 4 elements: left, right, top, bottom.
RegionHeight As Int
RegionWidth As Int
RegionX As Int
RegionY As Int
Scroll (xAmount As Float, yAmount As Float)
Offsets the region relative to the current region. Generally the region's size should be the entire size of the texture in the direction(s) it is scrolled.
xAmount: The percentage to offset horizontally.
yAmount: The percentage to offset vertically. This is done in texture space, so up is negative.
SetRegion (X As Int, Y As Int, Width As Int, Height As Int)
SetRegion2 (U As Float, V As Float, U2 As Float, V2 As Float)
Split (TileWidth As Int, TileHeight As Int) As lgTextureRegion(,)
Creates tiles out of this TextureRegion starting from the top left corner going to the left and ending at the bottom right corner. Only complete tiles will be returned so if the region's width or height are not a multiple of the tile width and height not all of the region will be used. This will not work on texture regions returned from a TextureAtlas that have whitespace removed.
Returns a 2D array of TextureRegions indexed by (row,column).
TileWidth: A tile's width in pixels
TileHeight: A tile's height in pixels
Splits() As Int [read only]
Gets the ninepatch splits, or null if not a ninepatch. Returns 4 elements: left, right, top, bottom.
Texture As lgTexture
U As Float
U2 As Float
V As Float
V2 As Float
Events:
None
Members:
consumeCompressedData
consumePixmap As lgPixmap
DATATYPE_Compressed As com.badlogic.gdx.graphics.TextureData.TextureDataType
DATATYPE_Float As com.badlogic.gdx.graphics.TextureData.TextureDataType
DATATYPE_Pixmap As com.badlogic.gdx.graphics.TextureData.TextureDataType
disposePixmap As Boolean
Format As com.badlogic.gdx.graphics.Pixmap.Format [read only]
Height As Int [read only]
isManaged As Boolean
isPrepared As Boolean
prepare
Type As com.badlogic.gdx.graphics.TextureData.TextureDataType [read only]
useMipMaps As Boolean
Width As Int [read only]
Members description:
consumeCompressedData
Uploads the pixel data to the OpenGL ES texture. The caller must bind an OpenGL ES texture. A call to Prepare must preceed a call to this method.
consumePixmap As lgPixmap
Returns the Pixmap for upload by Texture. A call to Prepare must preceed a call to this method. Any internal datastructures created in Prepare should be disposed of here.
DATATYPE_Compressed As com.badlogic.gdx.graphics.TextureData.TextureDataType
DATATYPE_Float As com.badlogic.gdx.graphics.TextureData.TextureDataType
DATATYPE_Pixmap As com.badlogic.gdx.graphics.TextureData.TextureDataType
disposePixmap As Boolean
Returns whether the caller of ConsumePixmap should dispose the Pixmap returned by ConsumePixmap.
Format As com.badlogic.gdx.graphics.Pixmap.Format [read only]
Returns the format of the pixel data.
Height As Int [read only]
Returns the height of the pixel data.
isManaged As Boolean
Returns whether this implementation can cope with a EGL context loss.
isPrepared As Boolean
Returns whether the TextureData is prepared or not.
prepare
Prepares the TextureData for a call to ConsumePixmap or ConsumeCompressedData. This method can be called from a non OpenGL thread and should thus not interact with OpenGL.
Type As com.badlogic.gdx.graphics.TextureData.TextureDataType [read only]
Returns the TextureData type.
useMipMaps As Boolean
Returns whether to generate mipmaps or not.
Width As Int [read only]
Returns the width of the pixel data.
Defines a rectangular area of a texture. The coordinate system used has its origin in the upper left corner with the x-axis pointing to the right and the y axis pointing downwards.
Events:
None
Members:
Flip (X As Boolean, Y As Boolean)
Initialize
InitializeWithRegion (Region As lgTextureRegion)
InitializeWithRegion2 (Region As lgTextureRegion, X As Int, Y As Int, Width As Int, Height As Int)
InitializeWithTexture (Texture As lgTexture)
InitializeWithTexture2 (Texture As lgTexture, Width As Int, Height As Int)
InitializeWithTexture3 (Texture As lgTexture, X As Int, Y As Int, Width As Int, Height As Int)
InitializeWithTexture4 (Texture As lgTexture, U As Float, V As Float, U2 As Float, V2 As Float)
InternalObject As com.badlogic.gdx.graphics.g2d.TextureRegion [read only]
IsFlipX As Boolean
IsFlipY As Boolean
RegionHeight As Int
RegionWidth As Int
RegionX As Int
RegionY As Int
Scroll (xAmount As Float, yAmount As Float)
SetRegion (X As Int, Y As Int, Width As Int, Height As Int)
SetRegion2 (U As Float, V As Float, U2 As Float, V2 As Float)
Split (TileWidth As Int, TileHeight As Int) As lgTextureRegion(,)
Texture As lgTexture
U As Float
U2 As Float
V As Float
V2 As Float
Members description:
Flip (X As Boolean, Y As Boolean)
Initialize
Constructs a region with no texture and no coordinates defined.
InitializeWithRegion (Region As lgTextureRegion)
Constructs a region with the same texture and coordinates of the specified region.
InitializeWithRegion2 (Region As lgTextureRegion, X As Int, Y As Int, Width As Int, Height As Int)
Constructs a region with the same texture as the specified region and sets the coordinates relative to the specified region.
Width: The width of the texture region. May be negative to flip the sprite when drawn.
Height: The height of the texture region. May be negative to flip the sprite when drawn.
InitializeWithTexture (Texture As lgTexture)
Constructs a region the size of the specified texture.
InitializeWithTexture2 (Texture As lgTexture, Width As Int, Height As Int)
Constructs a region with the specified texture.
Width: The width of the texture region. May be negative to flip the sprite when drawn.
Height: The height of the texture region. May be negative to flip the sprite when drawn.
InitializeWithTexture3 (Texture As lgTexture, X As Int, Y As Int, Width As Int, Height As Int)
Constructs a region with the specified texture.
Width: The width of the texture region. May be negative to flip the sprite when drawn.
Height: The height of the texture region. May be negative to flip the sprite when drawn.
InitializeWithTexture4 (Texture As lgTexture, U As Float, V As Float, U2 As Float, V2 As Float)
Constructs a region with the specified texture.
InternalObject As com.badlogic.gdx.graphics.g2d.TextureRegion [read only]
IsFlipX As Boolean
IsFlipY As Boolean
RegionHeight As Int
RegionWidth As Int
RegionX As Int
RegionY As Int
Scroll (xAmount As Float, yAmount As Float)
Offsets the region relative to the current region. Generally the region's size should be the entire size of the texture in the direction(s) it is scrolled.
xAmount: The percentage to offset horizontally.
yAmount: The percentage to offset vertically. This is done in texture space, so up is negative.
SetRegion (X As Int, Y As Int, Width As Int, Height As Int)
SetRegion2 (U As Float, V As Float, U2 As Float, V2 As Float)
Split (TileWidth As Int, TileHeight As Int) As lgTextureRegion(,)
Creates tiles out of this TextureRegion starting from the top left corner going to the left and ending at the bottom right corner. Only complete tiles will be returned so if the region's width or height are not a multiple of the tile width and height not all of the region will be used. This will not work on texture regions returned from a TextureAtlas that have whitespace removed.
Returns a 2D array of TextureRegions indexed by (row,column).
TileWidth: A tile's width in pixels
TileHeight: A tile's height in pixels
Texture As lgTexture
U As Float
U2 As Float
V As Float
V2 As Float
A single vertex attribute defined by its {@link Usage}, its number of components and its shader alias. The Usage is needed for
the fixed function pipeline of OpenGL ES 1.x. Generic attributes are not supported in the fixed function pipeline. The number
of components defines how many components the attribute has. The alias defines to which shader attribute this attribute should
bind. The alias is used by a {@link Mesh} when drawing with a {@link ShaderProgram}. The alias can be changed at any time.
Events:
None
Members:
alias As String
Binormal As lgVertexAttribute
BoneWeight (unit As Int) As lgVertexAttribute
Color As lgVertexAttribute
ColorUnpacked As lgVertexAttribute
equals (obj As Object) As Boolean
equals2 (other As lgVertexAttribute) As Boolean
Initialize (Usage As Int, NumComponents As Int, Alias As String)
Initialize2 (Usage As Int, NumComponents As Int, Alias As String, Index As Int)
Key As Int [read only]
Normal As lgVertexAttribute
NumComponents As Int [read only]
Offset As Int [read only]
Position As lgVertexAttribute
Tangent As lgVertexAttribute
TexCoords (unit As Int) As lgVertexAttribute
unit As Int
Usage As Int [read only]
Members description:
alias As String
the alias for the attribute used in a ShaderProgram
Binormal As lgVertexAttribute
BoneWeight (unit As Int) As lgVertexAttribute
Color As lgVertexAttribute
ColorUnpacked As lgVertexAttribute
equals (obj As Object) As Boolean
Tests to determine if the passed object was created with the same parameters
equals2 (other As lgVertexAttribute) As Boolean
Initialize (Usage As Int, NumComponents As Int, Alias As String)
Constructs a new VertexAttribute.
Usage: one of the lgVertexAttributesUsage constants, used for the fixed function pipeline. Generic attributes are not supported in the fixed function pipeline.
NumComponents: the number of components of this attribute, must be between 1 and 4.
Alias: the alias used in a shader for this attribute. Can be changed after construction.
Initialize2 (Usage As Int, NumComponents As Int, Alias As String, Index As Int)
Constructs a new VertexAttribute.
Usage: one of the lgVertexAttributesUsage constants, used for the fixed function pipeline. Generic attributes are not supported in the fixed function pipeline.
NumComponents: the number of components of this attribute, must be between 1 and 4.
Alias: the alias used in a shader for this attribute. Can be changed after construction.
Index: unit/index of the attribute, used for boneweights and texture coordinates.
Key As Int [read only]
Returns an unique number specifying the usage index (3 MSB) and unit (1 LSB).
Normal As lgVertexAttribute
NumComponents As Int [read only]
the number of components this attribute has
Offset As Int [read only]
the offset of this attribute in bytes
Position As lgVertexAttribute
Tangent As lgVertexAttribute
TexCoords (unit As Int) As lgVertexAttribute
unit As Int
optional unit/index specifier, used for texture coordinates and bone weights
Usage As Int [read only]
the attribute usage (one of the lgVertexAttributesUsage constants)
Instances of this class specify the vertex attributes of a mesh. VertexAttributes are used by {@link Mesh} instances to define
its vertex structure. Vertex attributes have an order. The order is specified by the order they are added to this class.
Events:
None
Members:
equals (obj As Object) As Boolean
findByUsage (usage As Int) As lgVertexAttribute
get (index As Int) As lgVertexAttribute
getOffset (usage As Int) As Int
Initialize (attributes() As lgVertexAttribute)
Mask As Long [read only]
size As Int
toString As String
VertexSize As Int [read only]
Members description:
equals (obj As Object) As Boolean
findByUsage (usage As Int) As lgVertexAttribute
Returns the first VertexAttribute for the given usage.
usage: The usage of the VertexAttribute to find.
get (index As Int) As lgVertexAttribute
Returns the VertexAttribute at the given index.
getOffset (usage As Int) As Int
Returns the offset for the first VertexAttribute with the specified usage.
usage: The usage of the VertexAttribute.
Initialize (attributes() As lgVertexAttribute)
Sets the vertex attributes in a specific order.
Mask As Long [read only]
Calculates a mask based on the contained VertexAttribute instances. The mask is a bit-wise OR of each lgVertexAttribute.Usage.
Returns the mask.
size As Int
Return type: @return:the number of attributes
toString As String
VertexSize As Int [read only]
the size of a single vertex in bytes
The usage of a vertex attribute.
Events:
None
Members:
BiNormal As Int
BoneWeight As Int
Color As Int
ColorPacked As Int
Generic As Int
Normal As Int
Position As Int
Tangent As Int
TextureCoordinates As Int
Members description:
BiNormal As Int
BoneWeight As Int
Color As Int
ColorPacked As Int
Generic As Int
Normal As Int
Position As Int
Tangent As Int
TextureCoordinates As Int
libGDX for B4A
based on the nightly builds of v0.9.9
This is an 'Activity Object', it cannot be declared under Sub Process_Globals.
Events:
Create
Dispose
Render
Resize(Width As Int, Height As Int)
Pause
Resume
Members:
Audio As lgAudio
CallSubUI (SubName As String, Parameter As Object)
Clipboard As lgClipboard
exit
Files As lgFiles
Graphics As lgGraphics
Initialize (UseGL2IfAvailable As Boolean, evtPrefix As String)
Initialize2 (Configuration As lgConfiguration, evtPrefix As String)
InitializeView (UseGL2IfAvailable As Boolean, evtPrefix As String) As ConcreteViewWrapper
InitializeView2 (Configuration As lgConfiguration, evtPrefix As String) As ConcreteViewWrapper
Input As lgInput
IsInitialized As Boolean
JavaHeap As Long [read only]
LibGDXVersion As String
LogLevel As Int
LOGLEVEL_Debug As Int
LOGLEVEL_Error As Int
LOGLEVEL_Info As Int
LOGLEVEL_None As Int
NativeHeap As Long [read only]
Net As lgNet
Pause
Resume
Version As Int [read only]
Members description:
Audio As lgAudio
CallSubUI (SubName As String, Parameter As Object)
Calls a sub in the UI thread with the given parameter. This allows to change the properties of other views, show a MsgBox, etc.
Clipboard As lgClipboard
exit
Files As lgFiles
Graphics As lgGraphics
Initialize (UseGL2IfAvailable As Boolean, evtPrefix As String)
This function has to be called in Activity_Create. It sets up all the things necessary to get input, render via OpenGL and so on, with a default configuration. The created view fills the entire activity. To get it, use Graphics.View.
If UseGL20IfAvailable is True, libGDX will try to create an OpenGL ES 2.0 context which can then be used via Graphics.GL20. The GL10 and GL11 interfaces should not be used when OpenGL ES 2.0 is enabled. To query whether enabling OpenGL ES 2.0 was successful use the Graphics.IsGL20Available function.
Initialize2 (Configuration As lgConfiguration, evtPrefix As String)
This function has to be called in Activity_Create. It sets up all the things necessary to get input, render via OpenGL and so on, with the specified configuration. The created view fills the entire activity. To get it, use Graphics.View.
InitializeView (UseGL2IfAvailable As Boolean, evtPrefix As String) As ConcreteViewWrapper
This function has to be called in Activity_Create. It sets up all the things necessary to get input, render via OpenGL and so on, with a default configuration. It returns the created view.
If UseGL20IfAvailable is True, libGDX will try to create an OpenGL ES 2.0 context which can then be used via Graphics.GL20. The GL10 and GL11 interfaces should not be used when OpenGL ES 2.0 is enabled. To query whether enabling OpenGL ES 2.0 was successful use the Graphics.IsGL20Available function.
InitializeView2 (Configuration As lgConfiguration, evtPrefix As String) As ConcreteViewWrapper
This function has to be called in Activity_Create. It sets up all the things necessary to get input, render via OpenGL and so on, with the specified configuration. It returns the created view.
Input As lgInput
IsInitialized As Boolean
JavaHeap As Long [read only]
Returns the Java heap memory use in bytes.
LibGDXVersion As String
LogLevel As Int
LOGLEVEL_Debug As Int
LOGLEVEL_Error As Int
LOGLEVEL_Info As Int
LOGLEVEL_None As Int
NativeHeap As Long [read only]
Returns the Native heap memory use in bytes.
Net As lgNet
Pause
This function has to be called in Activity_Pause. It will inform the library that a Pause event has been raised.
Example:
Sub Activity_Pause (UserClosed As Boolean)
If lGdx.IsInitialized Then lGdx.Pause
End Sub
Resume
This function has to be called in Activity_Resume. It will inform the library that a Resume event has been raised.
Note: The Resume event after a Create event is ignored. The library will consider only the Resume event after a pause.
Example:
Sub Activity_Resume
If lGdx.IsInitialized Then lGdx.Resume
End Sub
Version As Int [read only]
Returns the Android API level.
Top