Categorygithub.com/supercom32/dosktop
modulepackage
0.0.0-20211004051450-622b23354be7
Repository: https://github.com/supercom32/dosktop.git
Documentation: pkg.go.dev

# README

Build codecov Go Reference

Dosktop

Dosktop is a package which allow users to easily create rich text-based terminal applications and games. Dosktop differs from other terminal packages by providing an extremely simple API that abstracts out all low-level terminal operations, while avoiding complicated event-driven TUI designs.

Features

  • Straight forward BASIC-like API and syntax!
  • Access to an unlimited number of independent text layers, allowing for modal dialogs, windows, parallax scrolling, forgrounds, backgrounds, and more!
  • Automatic calculation of shadows and colored transparencies effects!
  • High level support for buttons, selection menus, lines, frames, and other TUI controls!
  • Full manual and automatic mouse support with TUI integration!
  • Dialog text printing with automatic word wrapping, typewriter effects, and dynamic style markup!
  • Virtual File System (ZIP & RAR) support, with password protection to ensure resource integrity!
  • Automatic conversion and rendering of bitmap images directly to text layers in ansi graphics!

Screenshots

Create windows and menus with full mouse support!

alt text

Ability to scale and draw bitmapped images directly to terminal with dialog printing!

alt text

Support for dynamic text layer transparencies!

alt text

Fully manipulable and independent text layers!

alt text

Project status

While Dosktop is currently being actively developed, it is at a point where practical use will determine further areas of usability, existing gaps, and deficiency improvements. If you like what this package has to offer, have ideas on how to improve it, or just want to experiment, consider giving Dosktop a try!

Future Roadmap

  • More examples and documentation. (see tests for basic examples)
  • More TUI controls (Progress bars, loading icons, etc).
  • Bulk addition of images and selections.
  • Saving and loading of terminal screenshots.
  • Fully text-based sprite system.
  • Digital audio and sound integration.

# Packages

No description provided by the author

# Functions

AddButton allows you to add a button to a text layer.
AddLayer allows you to add a text layer to the current terminal display.
AddTextStyle allows you to add a new printing style which can be used for writing dialog text with.
Clear allows you to empty the default text layer of all its contents.
Clear allows you to empty the specified text layer of all its contents.
Color allows you to set default colors on your text layer for printing with.
ColorLayer allows you to set default colors on your specified text layer for printing with.
ColorLayerRGB allows you to set default colors on your specified text layer for printing with.
ColorRGB allows you to set default colors on your text layer for printing with.
DeleteButton allows you to remove a button from a text layer.
DeleteLayer allows you to remove a text layer.
DeleteTextStyle allows you to remove a text style that was added previously.
DrawBar allows you to draw a horizontal bar on a given text layer row.
DrawBorder allows you to draw a border on a given text layer.
DrawFrame allows you to draw a frame on a given text layer.
DrawFrameLabel allows you to draw a label for a frame.
DrawHorizontalLine allows you to draw a horizontal line on a text layer.
DrawImageToLayer allows you to draw a loaded image to the specified layer.
DrawLayerToScreen allows you to render a text layer to the visible terminal screen.
DrawShadow allows you to draw shadows on a given text layer.
DrawVerticalLine allows you to draw a vertical line on a text layer.
DrawVerticalMenu allows you to obtain a user selection from a horizontal menu.
DrawWindow allows you to draw a window on a given text layer.
FillArea allows you to fill an area of a given text layer with characters of your choice.
FillLayer allows you to fill an entire layer with characters of your choice.
GetCellIdUnderMouseLocation allows you to obtain the cell ID for the text directly under your mouse cursor.
GetColor allows you to obtain an RGB color from a predefined color palette list.
GetCurrentTimeInMilliseconds allows you to get the current epoch time in milliseconds.
fillLayer allows you to fill an entire layer with characters of your choice.
GetDarkenedColor allows you to obtain a color that has been darkened uniformly by a specific amount.
GetInput allows you to obtain keyboard input from the user.
GetRGBColor allows you to obtain a specific RGB color based on the red, green, and blue index values provided.
GetRGBColorComponents allows you to obtain RGB color component indexes for red, green, an blue color channels.
GetScrambledPassword allows you to scramble a password with a simple XOR algorithm.
GetSelectionFromHorizontalMenu allows you to obtain a user selection from a horizontal menu.
GetSelectionFromHorizontalMenuByIndex allows you to obtain a user selection from a horizontal menu.
GetSelectionFromProportionalHorizontalMenu allows you to obtain a user selection from a proportional horizontal menu.
GetSelectionFromProportionalHorizontalMenuByIndex allows you to obtain a user selection from a proportional horizontal menu.
GetSelectionFromVerticalMenu allows you to obtain a user selection from a vertical menu.
GetSelectionFromVerticalMenuByIndex allows you to obtain a user selection from a vertical menu.
GetTransitionedColor allows you to obtain a color that has been transitioned to another color by a specific percent.
InitializeTerminal allows you to initialize Dosktop for the first time.
Inkey allows you to read keyboard input from the user's terminal.
IsTimerExpired allows you to check if a created timer has expired or not.
Layer allows you to specify a default layer alias that you wish to use when interacting with methods which have a non-layer alias method signature.
LoadBase64Image allows you to load a base64 encoded image into memory without performing any ansi conversions ahead of time.
LoadImage allows you to load an image into memory without performing any ansi conversions ahead of time.
LoadImagesInBulk allows you to load multiple images into memory at once.
LoadPreRenderedBase64Image allows you to pre-render an image before loading it into memory.
LoadPreRenderedImage allows you to pre-render an image before loading it into memory.
Locate allows you to set the default cursor location on your specified text layer for printing with.
Locate allows you to set the default cursor location on your specified text layer for printing with.
MoveLayerByAbsoluteValue allows you to move a text layer by an absolute value.
MoveLayerByRelativeValue allows you to move a text layer by a relative value.
NewAssetList allows you to obtain a list for storing asset information with.
NewSelectionEntry allows you to obtain an entry used for specifying what options you want to make available for a given menu prompt.
NewTextStyle allows you to obtain a new text style entry which can be used when printing dialog text.
NewTuiStyleEntry allows you to obtain a new style entry which can be used for specifying how TUI controls and other TUI drawing operations should occur.
Print allows you to write text to the default text layer.
PrintDialog allows you to write text immediately to the terminal screen via a typewriter effect.
PrintLayer allows you to write text to a specified text layer.
RestoreTerminalSettings allows the user to gracefully return the terminal back to its normal settings.
SetAlpha allows you to set the alpha value for a given text layer.
SetTimer allows you to create a new timer to measure time with.
Sleep allows you to pause execution for a given amount of milliseconds.
SleepInMilliseconds allows you to pause execution for a given amount of milliseconds.
SleepInSeconds allows you to pause execution for a given amount of seconds.
StartTimer allows you to start a timer that has already been previously created.
UnloadImage allows you to remove an image from memory.
UnmountVirtualFileSystem allows you to reset the virtual file system to an unmounted state.
UpdateDisplay allows you to synchronize the terminals visible display area with your current changes.