GuiBase2d

GuiBase2d : Instance

Overview

The GuiBase2d class provides a set of core properties, methods, and events that are essential for defining the behavior and appearance of 2D GUI elements.

Description

The GuiBase2d class is an abstract base class for all 2D graphical user interface (GUI) objects. It serves as a foundation for creating and managing 2D UI elements within the OVERDARE UGV. Since it is abstract, instances of GuiBase2d cannot be created directly. Instead, it is inherited by other specific GUI classes like Frame, TextLabel, and ImageLabel, which implement its properties and methods.

Properties

AbsolutePosition

Vector2

AbsolutePosition provides the screen position of a GUI element in pixels. It reflects the actual pixel position after accounting for the sizes and positions of ancestor elements

Code Samples

local ScreenGui = script.Parent
local TextLabel = ScreenGui.TextLabel

print("AbsolutePosition : ", TextLabel.AbsolutePosition)

AbsoluteSize

Vector2

AbsoluteSize specifies the rendered size of a GUI element in pixels, determined by its ancestors' sizes and its own size settings.

Code Samples

local ScreenGui = script.Parent
local TextLabel = ScreenGui.TextLabel

print("AbsoluteSize : ", TextLabel.AbsoluteSize)

Methods

Events