Kraken Logo

Kraken Engine

DocumentationGuidesShowcaseCommunity
Ctrl
K
Navigating the Docs
Building Docs
Overview
Anchor
AnimationController
Audio
Batcher
Body
Camera
Capsule
CastHit
CharacterBody
Circle
Collision
Color
DistanceJoint
Effect
Event
FilterJoint
Flip (Texture)
Font
ImageLayer
InputAction
Joint
Layer
Line
Map
MapObject
Mask
MotorJoint
MouseJoint
ObjectGroup
Orchestrator
PixelArray
PolarCoordinate
Polygon
PrismaticJoint
Rect
RevoluteJoint
RigidBody
Sample
Sampler
Shader
SheetStrip
StaticBody
Stream
Style
Terrain (TileSet)
Text
TextProperties
Texture
Tile (TileLayer)
Tile (TileSet)
TileLayer
TileResult (TileLayer)
TileSet
Timer
Transform
Tween
Vec2
Vertex
WeldJoint
WheelJoint
World

Built bydurkisneer1.Kraken Engine is open source and available onGitHub.

  1. Docs
  2. Classes
  3. Style

Style

Container for UI appearance, layout, and sizing settings. Access via the 'ui' submodule.

Experimental API:

The ui submodule is an experimental and new API that is highly susceptible to breaking changes in the future.

Constructor

  • Style(background_color: Color | None = None, texture: Texture | None = None, slice: Rect = ..., offset: Vec2 = ..., font: Font | None = None, text_color: Color | None = None, padding: float = 0.0, margin: float = 0.0, gap: float = 0.0, border_width: int = 0, border_radius: float = 0.0, border_color: Color | None = None, width: float | None = None, height: float | None = None) → StyleStyle(background_color: Color | None = None, texture: Texture | None = None, slice: Rect = ..., offset: Vec2 = ..., font: Font | None = None, text_color: Color | None = None, padding: float = 0.0, margin: float = 0.0, gap: float = 0.0, border_width: int = 0, border_radius: float = 0.0, border_color: Color | None = None, width: float | None = None, height: float | None = None) → Style

Container for UI appearance, layout, and sizing settings.

Properties


NameDescriptionType
background_colorThe background color of the element (if no texture is provided).Color | None
textureThe texture to use for the element.Texture
sliceThe region of the texture to use.Rect
offsetThe offset of the element within its parent.Vec2
fontThe font to use for text rendering.Font
text_colorThe color of the text.Color | None
paddingThe padding around the element.float
marginThe margin around the element.float
gapThe gap between child elements.float
border_widthThe width of the border.int
border_radiusThe radius of the border corners.float
border_colorThe color of the border.Color | None
widthThe width of the element.float | None
heightThe height of the element.float | None
PreviousStream
NextTerrain (TileSet)

On this page

ConstructorProperties