Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
FillMode
TextureProgressBar.swift:13enum FillMode
Cases
case leftToRight
The
textureProgress
fills from left to right.case rightToLeft
The
textureProgress
fills from right to left.case topToBottom
The
textureProgress
fills from top to bottom.case bottomToTop
The
textureProgress
fills from bottom to top.case clockwise
Turns the node into a radial bar. The
textureProgress
fills clockwise. SeeradialCenterOffset
,radialInitialAngle
andradialFillDegrees
to control the way the bar fills up.case counterClockwise
Turns the node into a radial bar. The
textureProgress
fills counterclockwise. SeeradialCenterOffset
,radialInitialAngle
andradialFillDegrees
to control the way the bar fills up.case bilinearLeftAndRight
The
textureProgress
fills from the center, expanding both towards the left and the right.case bilinearTopAndBottom
The
textureProgress
fills from the center, expanding both towards the top and the bottom.case clockwiseAndCounterClockwise
Turns the node into a radial bar. The
textureProgress
fills radially from the center, expanding both clockwise and counterclockwise. SeeradialCenterOffset
,radialInitialAngle
andradialFillDegrees
to control the way the bar fills up.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (17) members.
Type members
Instance members
var fillMode: Int32
The fill direction. See
FillMode
for possible values.var ninePatchStretch: Bool
If
true
, Godot treats the bar’s textures like inNinePatchRect
. Use thestretch_margin_*
properties likestretchMarginBottom
to set up the nine patch’s 3×3 grid. When using a radialfillMode
, this setting will enable stretching.var radialCenterOffset: Vector2
Offsets
textureProgress
iffillMode
is .fillClockwise or .fillCounterClockwise.var radialFillDegrees: Double
Upper limit for the fill of
textureProgress
iffillMode
is .fillClockwise or .fillCounterClockwise. When the node’svalue
is equal to itsmax_value
, the texture fills up to this angle.var radialInitialAngle: Double
Starting angle for the fill of
textureProgress
iffillMode
is .fillClockwise or .fillCounterClockwise. When the node’svalue
is equal to itsmin_value
, the texture doesn’t show up at all. When thevalue
increases, the texture fills and tends towardsradialFillDegrees
.var stretchMarginBottom: Int32
The height of the 9-patch’s bottom row. A margin of 16 means the 9-slice’s bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.
var stretchMarginLeft: Int32
The width of the 9-patch’s left column.
var stretchMarginRight: Int32
The width of the 9-patch’s right column.
var stretchMarginTop: Int32
The height of the 9-patch’s top row.
var textureOver: Texture2D?
Texture2D
that draws over the progress bar. Use it to add highlights or an upper-frame that hides part oftextureProgress
.var textureProgress: Texture2D?
Texture2D
that clips based on the node’svalue
andfillMode
. Asvalue
increased, the texture fills up. It shows entirely whenvalue
reachesmax_value
. It doesn’t show at all ifvalue
is equal tomin_value
.var textureProgressOffset: Vector2
The offset of
textureProgress
. Useful fortextureOver
andtextureUnder
with fancy borders, to avoid transparent margins in your progress texture.var textureUnder: Texture2D?
Texture2D
that draws under the progress bar. The bar’s background.var tintOver: Color
Multiplies the color of the bar’s
textureOver
texture. The effect is similar tomodulate
, except it only affects this specific texture instead of the entire node.var tintProgress: Color
Multiplies the color of the bar’s
textureProgress
texture.var tintUnder: Color
Multiplies the color of the bar’s
textureUnder
texture.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.