Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

v0.0.1-unstable

Pre-release
Pre-release

Choose a tag to compare

@flipfloppy1 flipfloppy1 released this 08 Jul 19:33
· 17 commits to master since this release

0.0.1 Unstable

Features

Lua Script Global Variables:

  • VUI_dt: The time between the last frame and the current one (deltatime).
  • VUI_winX: The length of the viewport, in pixels.
  • VUI_winY: The height of the viewport, in pixels.
  • VUI_nextScript: The Lua script to be run on the next frame.

Specifying UI Elements in Lua:

  • The base class for UI Elements is ui.buttons.

The objects under "ui" are soon to be categories, but for now "buttons" is the only one. This will be changing soon; note that the category doesn't change the behaviour of UI elements.

  • Specify a new element using ui.buttons.x where "x" is the name of the element you want to create. Take a look at the provided scripts in the win-demo to see how elements can be created and modified.

Element Properties:

  • position: the top-left corner of the box that forms the element, in normalised screen coordinates; (0,0) is the top-left corner, whereas (1,1) is the bottom-right. fields: x, y.
  • dimensions: the bottom-right corner of the box that forms the element, in normalised screen coordinates; (0,0) is the top-left corner, whereas (1,1) is the bottom-right. fields: x,y.
  • texture: a string that contains a path to an image file to be used for the element, relative to the current working directory.
  • layer: an integer representing the z-index, or order of the element. For elements that overlap, elements with a higher layer are drawn on top of elements with a lower one.
  • color: a field representing the rgba values that an element is drawn with. If a texture is set, the color is multiplied by the texture color. fields: r,g,b,a.