diff options
author | Diego MartÃnez <kaeza@users.sf.net> | 2013-04-22 06:53:55 -0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2013-04-23 09:34:10 +0300 |
commit | 7c37b1891adcddc0e7d11e5faafddaa554443318 (patch) | |
tree | 4abc3352ba67a5e43a1aeaf29bff7e54ecac0906 /doc | |
parent | 58ded5cd27dd6e5ba740b22d8a3b0917f3d98150 (diff) | |
download | minetest-7c37b1891adcddc0e7d11e5faafddaa554443318.tar.gz minetest-7c37b1891adcddc0e7d11e5faafddaa554443318.tar.bz2 minetest-7c37b1891adcddc0e7d11e5faafddaa554443318.zip |
Added support for alignment in HUD items
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index aa4503879..774448778 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -409,6 +409,9 @@ ranging in value from 0 to 1. The name field is not yet used, but should contain a description of what the HUD element represents. The direction field is the direction in which something is drawn. 0 draws from left to right, 1 draws from right to left, 2 draws from top to bottom, and 3 draws from bottom to top. +The alignment field specifies how the item will be aligned. It ranges from -1 to 1, +with 0 being the center, -1 is moved to the left/up, and 1 is to the right/down. Fractional +values can be used. Below are the specific uses for fields in each type; fields not listed for that type are ignored. Note: Future revisions to the HUD API may be incompatible; the HUD API is still in the experimental stages. @@ -418,6 +421,7 @@ Note: Future revisions to the HUD API may be incompatible; the HUD API is still - scale: The scale of the image, with 1 being the original texture size. Only the X coordinate scale is used. - text: The name of the texture that is displayed. + - alignment: The alignment of the image. - text Displays text on the HUD. - scale: Defines the bounding rectangle of the text. @@ -425,6 +429,7 @@ Note: Future revisions to the HUD API may be incompatible; the HUD API is still - text: The text to be displayed in the HUD element. - number: An integer containing the RGB value of the color used to draw the text. Specify 0xFFFFFF for white text, 0xFF0000 for red, and so on. + - alignment: The alignment of the text. - statbar Displays a horizontal bar made up of half-images. - text: The name of the texture that is used. @@ -1857,4 +1862,6 @@ HUD Definition (hud_add, hud_get) ^ Selected item in inventory. 0 for no item selected. direction = 0, ^ Direction: 0: left-right, 1: right-left, 2: top-bottom, 3: bottom-top + alignment = {x=0, y=0}, + ^ See "HUD Element Types" } |