Documentation > Graphics > Panel
Parent du composant : Base
Version: 2.0.4
Constructor Panel(X, Y, Width, Height, BorderColor, BackColor, Z, Thickness)
This function creates a new Panel object.
X
Position on the X axis of the panel.
Y
Position on the Y axis of the panel.
Width
Width of the space occupied by the panel.
Height
Height of the space occupied by the panel.
BorderColor
Border color of the panel.
BackColor
Back color of the panel.
Z
Z-Order of the panel.
Thickness
Thickness of the panel border.
Return
Return an instance of Panel object.
Panel:draw()
This function draw the panel if visible.
Panel:drawPanel()
This function draw the panel (mainly used for child elements in components).
Panel:getWidth(Original)
This functions returns the width of the panel.
Original
Indicates if the original dimensions should be used.
Return
Returns the width of the panel.
Panel:getHeight(Original)
This functions returns the height of the panel.
Original
Indicates if the original dimensions should be used.
Return
Returns the height of the panel.
Panel:getDimensions(Original)
This function returns the width and height.
Original
Indicates whether to return the original dimensions.
Return
Returns the width and height.
Panel:setDimensions(Width, Height)
This function defines the new dimensions of the panel.
Width
Width of the space occupied by the panel.
Height
Height of the space occupied by the panel.
Panel:getThickness()
This functions returns the thickness of the border of the panel.
Return
Returns the border thickness of the panel.
Panel:setThickness(Thickness)
This functions sets the thickness (in pixels) of the border of the panel.
Thickness
New value for the thickness of the border (default: 1).
Panel:getBorderColor()
This functions returns the border color of the panel.
Return
Returns the border color of the panel.
Panel:setBorderColor(Color)
This function sets the border color of the panel.
Color
Color for the border (default : white).
Panel:getBackColor()
This functions returns the back color of the panel.
Return
Returns the back color of the text.
Panel:setBackColor(Color)
This function sets the back color of the panel.
Color
Color for the back of the panel
Panel:getZOrder()
This function returns the z-order of the panel.
Return
Returns the z-order of the panel.
Panel:isZOrderChanged()
This function returns if the z-order has been changed.
Return
Returns if the z-order changed.
Panel:setZOrder(Z)
This function sets the z-order of the panel.
Z
Z-order of the panel (default: 1).
Panel:setEvent(EventName, EventFunction)
This function sets an event by the given name with a given function.
Panel:getScale()
This function returns the scales of the current Panel.
Return
Returns the scale on X-axis and Y-axis.
Panel:setScale(ScaleX, ScaleY)
This function sets the scale to apply to the image and update the width and height of the panel.
Panel:update(dt)
This funtion launches all updates needed for the current panel.
dt
Delta time.
Panel:updatePanel(dt)
This function launches the hover event for the panel.
Panel:toString(NoTitle)
This function display all variables containing in the current Panel instance (tables and functions are excluded).
NoTitle
Indicates if the title must be displayed (false) or not (true).
Me contacter