

GUI system concept
==================

Objects
-------

**div** - generic container with the following attributes, can act like a button:
- `width`, `height`
- `margin`
- `padding`
- `color`
- `font_color`
- `bordered`
- `center_outside`
- `center_inside`
- `grid_horizontal_elems`
- `on_tab`
- `clickable_surface`
- `z_extrusion`

**text** - generic text element with the following attributes:
- `font_size`
- `font_color`
- `margin`
- `center_outside`

**text_field** - just a text field with the following attributes:
- `default_text`
- `on_enter`
- `on_tab`
- `width`, `height`
- `margin`
- `padding`
- `color`
- `font_color`
- `border`
- `center_outside`
- `center_inside`
- `grid_horizontal_elems`
- `z_extrusion`

**img** - image
- `width`, `height`
- `asset_name`
- `margin`
- `padding`
- `font_color`
- `border`
- `center_outside`
- `center_inside`
- `color`
- `grid_horizontal_elems`
- `z_extrusion`

**dropdown** - dropdown menu with selectable elements
- `text_objects`
- `width`, `height`
- `on_tab`
- `margin`
- `padding`
- `color`
- `font_color`
- `font_size`
- `border`
- `center_outside`
- `center_inside`
- `z_extrusion`

**checkbox** - just a checkbox
- `checkbox_size`
- `on_tab`
- `margin`
- `color`
- `check_color`
- `border`
- `center_outside`
- `z_extrusion`

Attributes and Their Parameters
-------------------------------

- `width`, `height`
  - % value relative to the parent element / auto

- `padding`, `margin`
  - % value relative to the parent element

- `default_text`
  - self-explanatory

- `color`, `font_color`
  - rgb / rgba / hex rgb / hex alpha + rgb color value
  - (alpha / hex alpha value for img exclusively)
  - sets the background color of the current element

- `border`
  - false / int (0 is interpreted as false)
  - disabled / border thickness value in pixels
  - final value = value * OS screen scaling

- `center_inside`
  - true / false
  - centers all child elements in a container

- `center_outside`
  - true / false
  - centers the element relative to the parent
  - acts like `center_inside` applied to the parent but only affecting the current element

- `grid_horizontal_elems`
  - int
  - defines how many elements can be horizontally in a grid before it forms a new row

- `font_size`
  - (unit unknown, depends on truetype)

- `on_enter`, `on_tab`
  - function
  - target action on specific key press when the element is active

- `clickable_surface`
  - true / false
  - makes the entire surface clickable instead of only the child elements' surfaces

- `text_objects`
  - list of text objects

- `z_extrusion`
  - "down" or "d" / "up" or "u" / false
  - creates a 3D extrusion effect in the desired direction if the element border is non-zero, like from Microsoft Windows 95/98 or Valve Source Engine GUI

- `checkbox_size`
  - int
  - size of the checkbox in pixels (gets multiplied by OS screen scaling)
