Module guih.lib.sevensh
Lib used for loading custom fonts and adding segmented displays
Functions
create_display (terminal, x, y[, the[, font[, bg[, symbol[, fg]]]]]) | makes a new segmented display |
display:update () | updates the display on the screeen to the current values |
display:reposition (x, y) | repositions the display |
display:set_background (bg) | sets a new background color to the display |
display:set_color (fg) | sets a new foreground color to the display |
display:set_symbol (symbol) | sets a new symbol to draw the display with |
display:set_value (value) | sets a new value to the display |
display:set_font (font) | changes the font of the display |
display:set_term (terminal) | sets a new terminal to display the display on |
Functions
- create_display (terminal, x, y[, the[, font[, bg[, symbol[, fg]]]]])
-
makes a new segmented display
Parameters:
- terminal terminal the terminal object to make the new display on
- x number the x position of the display
- y number the y position of the display
- the string/number value to display from the fonts dictionary (optional)
- font string the font used for this display (optional)
- bg number the background color of the display (optional)
- symbol string the symbol to draw the display with (optional)
- fg number the foreground color of the display (optional)
Returns:
-
display
table with all the functions needed for interacting with the display
- display:update ()
- updates the display on the screeen to the current values
- display:reposition (x, y)
-
repositions the display
Parameters:
- x number the new x position of the display
- y number the new y position of the display
- display:set_background (bg)
-
sets a new background color to the display
Parameters:
- bg number the new background color
- display:set_color (fg)
-
sets a new foreground color to the display
Parameters:
- fg number the new foreground color
- display:set_symbol (symbol)
-
sets a new symbol to draw the display with
Parameters:
- symbol string the new symbol
- display:set_value (value)
-
sets a new value to the display
Parameters:
- value string/number the new value to display
- display:set_font (font)
-
changes the font of the display
Parameters:
- font string the new font to use
- display:set_term (terminal)
-
sets a new terminal to display the display on
Parameters:
- terminal terminal the new terminal to display the display on