-
Notifications
You must be signed in to change notification settings - Fork 0
StyleBoxFlat
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.StyleBoxFlat |
| Namespace | Electron2D |
| Kind | class |
| Category | UI and Text |
Provides a rectangle style box with a fill color and optional borders.
public class Electron2D.StyleBoxFlat : Electron2D.StyleBoxProfile: Electron2D 0.1.0 2D
Status: Supported / Parity verified
Out of profile: no
Godot reference: StyleBoxFlat
Flat style-box resource with background color, border color and border-width drawing.
StyleBoxFlat is the lightweight style resource used by the preview UI
theme system for panels, buttons and tooltip backgrounds.
This type is not synchronized. Create and mutate style boxes on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.StyleBoxElectron2D.Theme.SetStyleBox(System.String,System.String,Electron2D.StyleBox)
| Member | Kind | Summary |
|---|---|---|
BgColor |
Property | Gets or sets the background color. |
BorderColor |
Property | Gets or sets the border color. |
BorderWidthBottom |
Property | Gets or sets the bottom border width. |
BorderWidthLeft |
Property | Gets or sets the left border width. |
BorderWidthRight |
Property | Gets or sets the right border width. |
BorderWidthTop |
Property | Gets or sets the top border width. |
Electron2D.StyleBoxFlat() |
Constructor | Initializes a new instance of the Electron2D.StyleBoxFlat class. |
Draw(Electron2D.CanvasItem, Electron2D.Rect2) |
Method | Draws the flat background and borders into a canvas item. |
Kind: Property
public Electron2D.Color BgColor { get; set; }Gets or sets the background color.
The default value is an opaque neutral gray.
The fill color drawn over the target rectangle.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.StyleBoxFlat.Draw(Electron2D.CanvasItem,Electron2D.Rect2)
Kind: Property
public Electron2D.Color BorderColor { get; set; }Gets or sets the border color.
Border rectangles are drawn after the background.
The color used for every non-zero border side.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.StyleBoxFlat.BorderWidthLeft
Kind: Property
public System.Int32 BorderWidthBottom { get; set; }Gets or sets the bottom border width.
A value of 0 disables the bottom border.
The bottom border width in UI units. The value must be non-negative.
-
System.ArgumentOutOfRangeException: Thrown when the assigned value is negative.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.StyleBoxFlat.BorderColor
Kind: Property
public System.Int32 BorderWidthLeft { get; set; }Gets or sets the left border width.
A value of 0 disables the left border.
The left border width in UI units. The value must be non-negative.
-
System.ArgumentOutOfRangeException: Thrown when the assigned value is negative.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.StyleBoxFlat.BorderColor
Kind: Property
public System.Int32 BorderWidthRight { get; set; }Gets or sets the right border width.
A value of 0 disables the right border.
The right border width in UI units. The value must be non-negative.
-
System.ArgumentOutOfRangeException: Thrown when the assigned value is negative.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.StyleBoxFlat.BorderColor
Kind: Property
public System.Int32 BorderWidthTop { get; set; }Gets or sets the top border width.
A value of 0 disables the top border.
The top border width in UI units. The value must be non-negative.
-
System.ArgumentOutOfRangeException: Thrown when the assigned value is negative.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.StyleBoxFlat.BorderColor
Kind: Constructor
public Electron2D.StyleBoxFlat()Initializes a new instance of the Electron2D.StyleBoxFlat class.
The new style box uses a neutral gray background, a light border color and zero border widths.
This constructor is not synchronized. Call it from the main scene thread.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.StyleBoxFlat
Kind: Method
public System.Void Draw(Electron2D.CanvasItem, Electron2D.Rect2)(Electron2D.CanvasItem canvasItem, Electron2D.Rect2 rect)Draws the flat background and borders into a canvas item.
The background is drawn first, then each non-zero border side is drawn as a filled rectangle.
-
canvasItem: The canvas item that receives draw commands. -
rect: The local rectangle to draw into.
-
System.ArgumentNullException: Thrown whencanvasItemisnull. -
System.ArgumentOutOfRangeException: Thrown whenrectcontains non-finite components.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.CanvasItem.DrawRect(Electron2D.Rect2,Electron2D.Color,System.Boolean,System.Single,System.Boolean)
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.