Icons class
#include <Jazz2/UI/Windows/Icons.h>
Icons of the interface, those every interface has and those an application registers.
An icon in the style of the game is drawn in colors of its own with a dark outline, see GetPixelColor() — the color it's drawn with multiplies them, so it's drawn in white to show them as they are, and the outline stays dark in any color. See IconArt for how icons are drawn.
Public types
Public static variables
-
static std::
int32_t PixelArtSize constexpr - Size of the pixel art of an icon in pixels.
- static float DesignSize constexpr
- Side of the square vector art of an icon is drawn on, in its units.
Public static functions
-
static void Register(IconId first,
std::
uint16_t count, ArtFunc getArt) - Adds icons of an application,
countof them fromfirst. -
static auto GetCount() -> std::
int32_t - Returns the number of all icons, the stock ones and those registered.
-
static auto GetIndex(IconId icon) -> std::
int32_t - Returns the place of an icon among all of them, -1 if it's not known.
-
static auto GetArt(std::
int32_t index) -> IconArt - Returns how the icon at a place among all of them is drawn, see GetIndex().
-
static auto GetRevision() -> std::
uint32_t - Changes whenever icons are registered.
-
static auto GetPixelColor(char pixel) -> std::
uint32_t - Returns the color of a pixel of an icon as R, G, B and A bytes from the lowest, 0 for transparent.
Constructors, destructors, conversion operators
- Icons() deleted
Function documentation
static void Jazz2:: UI:: Windows:: Icons:: Register(IconId first,
std:: uint16_t count,
ArtFunc getArt)
Adds icons of an application, count of them from first.
Registering the same icons again does nothing, the interface draws them from the next frame.
static std:: uint32_t Jazz2:: UI:: Windows:: Icons:: GetPixelColor(char pixel)
Returns the color of a pixel of an icon as R, G, B and A bytes from the lowest, 0 for transparent.
Besides # and +, 1 to 7 are the color an eighth to seven eighths opaque, o is the dark outline and the letters are colors of the game, the capital one a shade darker: w white, y yellow, r red, p pink, g grey, t tan, n green and b blue. m is the shine on green, a pale green.