GuiElement
Base class for creating GUI elements
Located in /gui-toolkit/standard.php (line 173)
GuiComponent | --GuiElement
Class | Description |
---|---|
Spacer | A blank element, useful to place gaps between elements when using layouts |
Quad | Quad |
IncludeManialink | Include |
Format | Format |
Music | Music |
Manialink element default constructor. It's common to specify the size of the element in the constructor.
- float $sizeX: Width of the element
- float $sizeY: Height of the element
- Panel::__construct()
- DialogCard::__construct()
- TwoButtonsDialogCard::__construct()
- NavigationButton::__construct()
- Navigation::__construct()
- BulletCard::__construct()
- ChallengeCard::__construct()
- Icon::__construct()
- IncludeManialink::__construct()
- Format::__construct()
- Label::__construct()
- Button::__construct()
- Music::__construct()
- Video::__construct()
Imports links and actions from another Manialink element
- GuiElement $object: The source object
Adds the player information parameters ("playerlogin", "nickname",
"path", "lang") to the URL when you click on the link
Returns whether the elements adds player information parameter to the URL
when it's clicked
Returns the image placed in the element in its highlighted state
Returns whether the object has a link or an action (either Manialink,
Maniazones link, hyperlink or action)
Saves the object in the Manialink object stack for further rendering.
Thanks to the use of GuiElement::preFilter() and GuiElement:: postFilter(), you shouldn't have to override this method
Sets the action of the element. For example, if you use the action "0" in the explorer, it closes the explorer when you click on the element.
- int $action
Sets the action key associated to the element. Only works on dedicated servers.
- int $actionKey
Sets the alignment of the element
- string $halign: Horizontal alignement can be eithe "left", "center" or "right"
- string $valign: Vertical alignment can be either "top", "center" or "bottom"
Sets the background color of the element using a 3-digit RGB hexadecimal
value. For example, "fff" is white and "000" is black
- string $bgcolor: 3-digit RGB hexadecimal value
Sets the horizontal alignment of the element
- string $halign: Horizontal alignement can be eithe "left", "center" or "right"
Applies an image to the element. If you don't specify the second
parameter, it will look for the image in the path defined by the APP_IMAGE_DIR_URL constant
- string $image: The image filename (or URL)
- string $absoluteUrl: The URL that will be appended to the image. Use null if you want to specify an absolute URL as first parameter
Applies an image to the highlighter state of the element. The second
parameter works just like GuiElement::setImage()
- string $imageFocus: The image filename (or URL)
- string $absoluteUrl: The URL that will be appended to the image. Use null if you want to specify an absolute URL as first parameter
Set the image focus id of the element, used for internationalization
- $imageFocusid
Set the image id of the element, used for internationalization
- $imageid
Sets the Manialink of the element. It works as a hyperlink.
- string $manialink: Can be either a short Manialink or an URL pointing to a Manialink
Sets the Maniazones link of the element
- string $maniazone
Sets the style of the element. See http://fish.stabb.de/styles/ of the manialink 'example' for more information on Manialink styles.
- string $style
Sets the sub-style of the element. See http://fish.stabb.de/styles/ of the manialink 'example' for more information on Manialink styles.
- string $substyle
Sets the vertical alignment of the element.
- string $valign: Vertical alignment can be either "top", "center" or "bottom"
Inherited Methods
Inherited From GuiComponent
GuiComponent::getPosX()
GuiComponent::getPosY()
GuiComponent::getPosZ()
GuiComponent::getScale()
GuiComponent::getSizeX()
GuiComponent::getSizeY()
GuiComponent::setPosition()
GuiComponent::setPositionX()
GuiComponent::setPositionY()
GuiComponent::setPositionZ()
GuiComponent::setScale()
GuiComponent::setSize()
GuiComponent::setSizeX()
GuiComponent::setSizeY()