-
Notifications
You must be signed in to change notification settings - Fork 0
LibGui's datatypes
This file contains documentation for structs and classes deemed too small (or irrelevant) for their own pages :(
Is simple struct holding two floats x and y. It contains overloads for basic mathematical operators (+-*/).
Is simple struct holding two integer values x and y. It contains overloads for basic mathematical operators (+-*/).
Is struct holding four float values red (r), green (g), blue (b), alpha (a). It contains overloads for basic mathematical operators (+-*/), it also has some preset values such as black, white, gray, Red, green and blue.
Decodes hex color value string into Color struct, supports RGB and RGBA hex codes. Supported formats are:
- normal rgb
#00FF00 - normal rgba
#00FF0090 - weird rgb
$00FF00 - weird rgba
$00FF0090
The weird ones (especially weird rgba) are essential for DynamicText formatting.
Wrapper for tinyfiledialogs library function tinyfd_colorChooser(...); opens OS native color picker window.

Note
This function waits untill the user picks color, so you can't render (and do anything) while whis is called. And don't be afraid, LibGui keeps your program's windows updated so they won't freeze.
Wrapper for std::fstream. Contains function Write (for writing into a file) and Get (for getting contents of an file).
Vertex is single point used for making shapes with LibGui::Object class.
It has three properties:
Vec2 pos which remembers point's position,
Vec2 texCoord (abbreviation for texture coordinate) which, if there's a texture linked to parent object, determines where is the point on the texture; and
Color color which just describes color of this point. To learn more about texture coordinates(or understand it 'coz my explanation sucks) look at first part of this article.
Pixel is basically a char based variant of Color, made for LibGui::Image class.
It also contains methods for translation into Color struct.
Represents single mouse button and can be found in LibGui::MouseCursor as left_button, middle_button or right_button.
It has three bool values:
- clicked -> is true on first frame user started holding given button
- pressed -> is true when given button is pressed
- released -> is true on frame right after user stopped holding given button
It also has an method Update(...), which you are NOT supposed to call manually, becouse it's called automatically on LibGui::MouseCursor::Update(...) which is called on LibGui::Window::Draw().
Similar to the Mouse button it has three bool values
- clicked -> is true on first frame user started holding given key
- pressed -> is true when given key is pressed
- released -> is true on frame right after user stopped holding given key
It's used in LibGui::KeyTracker class.
Is internal class that derives input function to majority of object-like classes. It is NOT meant to be used externally.
Features