Module guih.presets.rect

Rectangle style presets

Functions

preset.border (border_color, background_color) make a new border symbol set borders can be used to put an outline around objects such as a progressbar or a switch.
preset.frame (border_color, background_color) make a new frame symbol set frames are basically inverted borders with almost no changes
preset.frame_thick (border_color, background_color) make a new thick frame symbol set these are pretty much unfilled squares with no drawing chars
preset.window (border_color, background_color) make a new borderless window symbol set pretty much just a line with a background box under it
preset.framed_window (border_color, background_color) same as a window but with drawing char border around the edges

Fields

preset.example showcase of how to attach an symbol preset to an rectangle


Functions

preset.border (border_color, background_color)
make a new border symbol set borders can be used to put an outline around objects such as a progressbar or a switch. by drawing rectangle behind them

Parameters:

  • border_color number
  • background_color number

Returns:

    table
preset.frame (border_color, background_color)
make a new frame symbol set frames are basically inverted borders with almost no changes

Parameters:

  • border_color number
  • background_color number

Returns:

    table rectangle symbol set
preset.frame_thick (border_color, background_color)
make a new thick frame symbol set these are pretty much unfilled squares with no drawing chars

Parameters:

  • border_color number
  • background_color number

Returns:

    table rectangle symbol set
preset.window (border_color, background_color)
make a new borderless window symbol set pretty much just a line with a background box under it

Parameters:

  • border_color number
  • background_color number

Returns:

    table rectangle symbol set
preset.framed_window (border_color, background_color)
same as a window but with drawing char border around the edges

Parameters:

  • border_color number
  • background_color number

Returns:

    table rectangle symbol set

Fields

preset.example
showcase of how to attach an symbol preset to an rectangle

Usage:

    local GuiH = require("GuiH")
    local gui = guih.new(term.current())
    local preset = guih.presets.rect.framed_window(colors.black,colors.white)
    gui.new.rectangle{
        x=2,y=2,width=10,height=5,
        symbols=preset
    }
    gui.execute()
generated by LDoc 1.4.6 Last updated 2022-06-23 16:51:50