Class ContainerElement
Implements
Inherited Members
Namespace: GTA.UI
Assembly: ScriptHookVDotNet3.dll
Syntax
public class ContainerElement : IElement
Constructors
| Improve this Doc View SourceContainerElement()
Initializes a new instance of the ContainerElement class used for grouping items on screen.
Declaration
public ContainerElement()
ContainerElement(PointF, SizeF)
Initializes a new instance of the ContainerElement class used for grouping items on screen.
Declaration
public ContainerElement(PointF position, SizeF size)
Parameters
Type | Name | Description |
---|---|---|
PointF | position | Set the Position on screen where to draw the ContainerElement. |
SizeF | size | Set the Size of the ContainerElement. |
ContainerElement(PointF, SizeF, Color)
Initializes a new instance of the ContainerElement class used for grouping items on screen.
Declaration
public ContainerElement(PointF position, SizeF size, Color color)
Parameters
Type | Name | Description |
---|---|---|
PointF | position | Set the Position on screen where to draw the ContainerElement. |
SizeF | size | Set the Size of the ContainerElement. |
Color | color | Set the Color used to draw the ContainerElement. |
ContainerElement(PointF, SizeF, Color, Boolean)
Initializes a new instance of the ContainerElement class used for grouping items on screen.
Declaration
public ContainerElement(PointF position, SizeF size, Color color, bool centered)
Parameters
Type | Name | Description |
---|---|---|
PointF | position | Set the Position on screen where to draw the ContainerElement. |
SizeF | size | Set the Size of the ContainerElement. |
Color | color | Set the Color used to draw the ContainerElement. |
Boolean | centered | Position the ContainerElement based on its center instead of top left corner, see also Centered. |
Properties
| Improve this Doc View SourceCentered
Gets or sets a value indicating whether this ContainerElement should be positioned based on its center or top left corner
Declaration
public virtual bool Centered { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true if centered; otherwise, false. |
Color
Gets or sets the color of this ContainerElement.
Declaration
public virtual Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color | The color. |
Enabled
Gets or sets a value indicating whether this ContainerElement will be drawn.
Declaration
public virtual bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true if enabled; otherwise, false. |
Items
The IElements Contained inside this ContainerElement
Declaration
public List<IElement> Items { get; }
Property Value
Type | Description |
---|---|
List<IElement> |
Position
Gets or sets the position of this ContainerElement.
Declaration
public virtual PointF Position { get; set; }
Property Value
Type | Description |
---|---|
PointF | The position scaled on a 1280*720 pixel base. |
Remarks
If ScaledDraw is called, the position will be scaled by the width returned in ScaledWidth.
Size
Gets or sets the size to draw the ContainerElement
Declaration
public SizeF Size { get; set; }
Property Value
Type | Description |
---|---|
SizeF | The size on a 1280*720 pixel base |
Remarks
If ScaledDraw is called, the size will be scaled by the width returned in ScaledWidth.
Methods
| Improve this Doc View SourceDraw()
Draws this ContainerElement this frame.
Declaration
public virtual void Draw()
Draw(SizeF)
Draws this ContainerElement this frame at the specified offset.
Declaration
public virtual void Draw(SizeF offset)
Parameters
Type | Name | Description |
---|---|---|
SizeF | offset | The offset to shift the draw position of this ContainerElement using a 1280*720 pixel base. |
ScaledDraw()
Draws this ContainerElement this frame using the width returned in ScaledWidth.
Declaration
public virtual void ScaledDraw()
ScaledDraw(SizeF)
Draws this ContainerElement this frame at the specified offset using the width returned in ScaledWidth.
Declaration
public virtual void ScaledDraw(SizeF offset)
Parameters
Type | Name | Description |
---|---|---|
SizeF | offset | The offset to shift the draw position of this ContainerElement using a ScaledWidth*720 pixel base. |