Skip to main content

UIAlignmentUtils

Utility methods for working with horizontal and vertical alignment

Functions

toNumber

UIAlignmentUtils.toNumber(alignmentHorizontalAlignment | VertialAlignment) → number

Converts alignment to 0, 0.5 or 1

verticalToHorizontalAlignment

UIAlignmentUtils.verticalToHorizontalAlignment(verticalAlignmentHorizontalAlignment) → HorizontalAlignment

Converts the HorizontalAlignment to a HorizontalAlignment

horizontalToVerticalAlignment

UIAlignmentUtils.horizontalToVerticalAlignment(horizontalAlignmentHorizontalAlignment) → VertialAlignment

Converts the HorizontalAlignment to a VertialAlignment

toBias

UIAlignmentUtils.toBias(alignmentHorizontalAlignment | VertialAlignment) → number

Converts alignment to bias, as -1, 0, or 1

horizontalAlignmentToNumber

UIAlignmentUtils.horizontalAlignmentToNumber(horizontalAlignmentHorizontalAlignment) → number

Converts alignment to a number from 0 to 1

horizontalAlignmentToBias

UIAlignmentUtils.horizontalAlignmentToBias(horizontalAlignmentHorizontalAlignment) → number

Converts alignment to a number from -1 to 1

verticalAlignmentToNumber

UIAlignmentUtils.verticalAlignmentToNumber(verticalAlignmentVerticalAlignment) → number

Converts alignment to a number from 0 to 1

verticalAlignmentToBias

UIAlignmentUtils.verticalAlignmentToBias(verticalAlignmentVerticalAlignment) → number

Converts alignment to a number from -1 to 1

Show raw api
{
    "functions": [
        {
            "name": "toNumber",
            "desc": "Converts alignment to 0, 0.5 or 1",
            "params": [
                {
                    "name": "alignment",
                    "desc": "",
                    "lua_type": "HorizontalAlignment | VertialAlignment"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 50,
                "path": "src/uiobjectutils/src/Client/UIAlignmentUtils.lua"
            }
        },
        {
            "name": "verticalToHorizontalAlignment",
            "desc": "Converts the HorizontalAlignment to a HorizontalAlignment",
            "params": [
                {
                    "name": "verticalAlignment",
                    "desc": "",
                    "lua_type": "HorizontalAlignment"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "HorizontalAlignment"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 67,
                "path": "src/uiobjectutils/src/Client/UIAlignmentUtils.lua"
            }
        },
        {
            "name": "horizontalToVerticalAlignment",
            "desc": "Converts the HorizontalAlignment to a VertialAlignment",
            "params": [
                {
                    "name": "horizontalAlignment",
                    "desc": "",
                    "lua_type": "HorizontalAlignment"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "VertialAlignment"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 82,
                "path": "src/uiobjectutils/src/Client/UIAlignmentUtils.lua"
            }
        },
        {
            "name": "toBias",
            "desc": "Converts alignment to bias, as -1, 0, or 1",
            "params": [
                {
                    "name": "alignment",
                    "desc": "",
                    "lua_type": "HorizontalAlignment | VertialAlignment"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 99,
                "path": "src/uiobjectutils/src/Client/UIAlignmentUtils.lua"
            }
        },
        {
            "name": "horizontalAlignmentToNumber",
            "desc": "Converts alignment to a number from 0 to 1",
            "params": [
                {
                    "name": "horizontalAlignment",
                    "desc": "",
                    "lua_type": "HorizontalAlignment"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 117,
                "path": "src/uiobjectutils/src/Client/UIAlignmentUtils.lua"
            }
        },
        {
            "name": "horizontalAlignmentToBias",
            "desc": "Converts alignment to a number from -1 to 1",
            "params": [
                {
                    "name": "horizontalAlignment",
                    "desc": "",
                    "lua_type": "HorizontalAlignment"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 133,
                "path": "src/uiobjectutils/src/Client/UIAlignmentUtils.lua"
            }
        },
        {
            "name": "verticalAlignmentToNumber",
            "desc": "Converts alignment to a number from 0 to 1",
            "params": [
                {
                    "name": "verticalAlignment",
                    "desc": "",
                    "lua_type": "VerticalAlignment"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 149,
                "path": "src/uiobjectutils/src/Client/UIAlignmentUtils.lua"
            }
        },
        {
            "name": "verticalAlignmentToBias",
            "desc": "Converts alignment to a number from -1 to 1",
            "params": [
                {
                    "name": "verticalAlignment",
                    "desc": "",
                    "lua_type": "VerticalAlignment"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 165,
                "path": "src/uiobjectutils/src/Client/UIAlignmentUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "UIAlignmentUtils",
    "desc": "Utility methods for working with horizontal and vertical alignment",
    "source": {
        "line": 5,
        "path": "src/uiobjectutils/src/Client/UIAlignmentUtils.lua"
    }
}