Skip to content

OryUITextCard

Kevin Cross edited this page Sep 11, 2019 · 8 revisions

Available Functions

OryUICreateTextCard(parameters$)

Creates a text card and returns a text card ID. See Available Parameters section below for the options.

OryUIDeleteTextCard(textCardID)

Deletes a text card.

OryUIGetTextCardHeight(textCardID)

Returns the height of the text card.

OryUIGetTextCardWidth(textCardID)

Returns the width of the text card.

OryUIGetTextCardX(textCardID)

Returns the X position of the text card.

OryUIGetTextCardY(textCardID)

Returns the Y position of the text card.

OryUIUpdateTextCard(textCardID, parameters$)

Updates a text card. See Available Parameters section below for the options.

Available Parameters (all optional)

Parameter Description
autoHeight If true the card will resize to fit the content text. Accepts the values true, false, 0, and 1.
color The background colour of the card. Accepts RGB values, and RGBA values (comma delimited) Also accepts MakeColor() value/id, and hex color codes.
depth The depth of the card.
fixToScreen Fixes the card to the screen.
headerText The text shown in the header of the card.
headerTextAlignment The alignment of the header text. Accepts left, center, and right. Also accepts the numeric values 0, 1, and 2.
headerTextColor The colour of the header text. Accepts RGB values, and RGBA values (comma delimited) Also accepts MakeColor() value/id, and hex color codes.
headerTextSize The size of the header text. Accepts decimals.
height The height of the card. Accepts decimals.
imageID Apply an image to the whole card background. Requires a LoadImage() value/id.
offset The x and y position where the offset should be placed, comma delimited. Also accepts a single value 'center'. Accepts decimals.
position The x and y position where the card should be placed, comma delimited.
size The width and height of the card, comma delimited. Also accepts -1 in either one to create a square card. Accepts decimals.
supportingText The text shown in the body of the card.
supportingTextAlignment The alignment of the supporting text. Accepts left, center, and right. Also accepts the numeric values 0, 1, and 2.
supportingTextColor The colour of the supporting text. Accepts RGB values, and RGBA values (comma delimited) Also accepts MakeColor() value/id, and hex color codes.
supportingTextSize The size of the supporting text. Accepts decimals.
width The width of the card. Accepts decimals.
x The x position where the card should be placed.
y The y position where the card should be placed.

Example Code

To create an empty card with no styling

crdExample = OryUICreateTextCard("")

To update an existing button

OryUIUpdateTextCard(crdExample, "width:90;headerText:Lorem Ipsum;headerTextColor:41,128,185;headerTextSize:4;headerTextAlignment:center;supportingText:" + OryUIWrapText("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tortor arcu, interdum ac interdum eget, feugiat sed odio. Proin eu risus bibendum, varius turpis nec, euismod odio. Aliquam vel tortor erat. In hac habitasse platea dictumst. Ut in eros ut erat scelerisque sodales a eu diam. Ut sit amet libero dui. Morbi faucibus magna vel tortor porttitor, quis porta augue venenatis.", 3, 86) + ";supportingTextSize:3;position:5,10;authoHeight:true")

You can also create a text card with the required settings with the OryUICreateTextCard function

crdExample = OryUICreateTextCard("width:90;headerText:Lorem Ipsum;headerTextColor:41,128,185;headerTextSize:4;headerTextAlignment:center;supportingText:" + OryUIWrapText("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tortor arcu, interdum ac interdum eget, feugiat sed odio. Proin eu risus bibendum, varius turpis nec, euismod odio. Aliquam vel tortor erat. In hac habitasse platea dictumst. Ut in eros ut erat scelerisque sodales a eu diam. Ut sit amet libero dui. Morbi faucibus magna vel tortor porttitor, quis porta augue venenatis.", 3, 86) + ";supportingTextSize:3;position:5,10;authoHeight:true")

Example

crdExample = OryUICreateTextCard("width:90;headerText:Lorem Ipsum;headerTextColor:41,128,185;headerTextSize:4;headerTextAlignment:center;supportingText:" + OryUIWrapText("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin tortor arcu, interdum ac interdum eget, feugiat sed odio. Proin eu risus bibendum, varius turpis nec, euismod odio. Aliquam vel tortor erat. In hac habitasse platea dictumst. Ut in eros ut erat scelerisque sodales a eu diam. Ut sit amet libero dui. Morbi faucibus magna vel tortor porttitor, quis porta augue venenatis.", 3, 86) + ";supportingTextSize:3;position:5,10;authoHeight:true")

do

    Sync()
loop

Clone this wiki locally