Fix models and buttons, and let containers handle inventories properly.

This commit is contained in:
Signal 2026-01-26 15:28:26 -05:00
parent 1040034efa
commit 2b55ca9abf
2 changed files with 58 additions and 27 deletions

View file

@ -278,9 +278,9 @@ Creates a model element.
Methods:
* `:style([state, ]props)`: Applies the styling properties `props` to the model when in the `state` state. If omitted, `state` is `"default"`.
* `:rotation(rotation[, continuous])`: Set the rotation of the model in the view, and optionally whether it is continuous.
* `:rotation(rotation_x[, rotation_y[, continuous]])`: Set the X and Y rotation of the model in the view, and optionally whether it is continuous.
* `:mouse_control(state)`: Passing `false` will prevent the user from changing the model's rotation by clicking and dragging.
* `:animated(frames, speed)`: Sets an animation on the model defined by the given frame range and speed.
* `:animated(start, end_, speed)`: Sets an animation on the model defined by the given frame range and speed.
### `imfs.button(x, y, width, height, label)`
@ -295,7 +295,7 @@ Methods:
### `imfs.list(x, y, width, height, location = "current_player", list = "main"[, start])`
Creates an inventory element.
Creates an inventory element. Note that `width` and `height` are in units of inventory slots; when set to flex ratios, however, they will resolve to the maximum number of slots that can be displayed in their assigned width.
`imfs.inventory` is an alias for this element.