|
GlistEngine
|
#include <gGUIResources.h>


Public Types | |
| enum | { ICON_FILE , ICON_FOLDER , ICON_FOLDEROPENED , ICON_SAVE , ICON_PLUS , ICON_BRUSH , ICON_DELETE , ICON_DOWNLOAD , ICON_UPLOAD , ICON_FONT , ICON_HOME , ICON_PENLOGO , ICON_PICTURE , ICON_PRINTER , ICON_REPAIR , ICON_RETURN , ICON_FORWARD , ICON_SETTINGS , ICON_SPLIT , ICON_TEXT , ICON_ZOOMIN , ICON_ZOOMOUT , ICON_SEARCH , ICON_PLAY , ICON_PAUSE , ICON_STOP , ICON_FAV , ICON_INFO , ICON_HELP , ICON_COPY , ICON_WARNING , ICON_ERROR , ICON_CALENDAR , ICON_CLOCK , ICON_DOWN , ICON_UP , ICON_MINIMIZEBLACK , ICON_MAXIMIZEBLACK , ICON_RESTOREBLACK , ICON_EXITBLACK , ICON_MINIMIZEWHITE , ICON_MAXIMIZEWHITE , ICON_RESTOREWHITE , ICON_EXITWHITE , ICON_STORE , COLORPICKER } |
| enum | { ICONBIG_ERROR , ICONBIG_INFO , ICONBIG_WARNING , ICONBIG_LOADING } |
Public Member Functions | |
| gGUIResources () | |
| virtual | ~gGUIResources () |
| void | cleanup () |
| void | initialize () |
| bool | isInitialized () |
| int | getIconWidth () |
| int | getIconHeight () |
| int | getIconComponentsNum () |
| int | getIconNum () |
| gTexture * | getIconImage (int iconId, bool isIconBig=false) |
Public Member Functions inherited from gObject | |
| gObject () | |
| void | logi (std::string message) |
| void | logd (std::string message) |
| void | logw (std::string message) |
| void | loge (std::string message) |
| void | logi (std::string tag, std::string message) |
| void | logd (std::string tag, std::string message) |
| void | logw (std::string tag, std::string message) |
| void | loge (std::string tag, std::string message) |
Static Public Attributes | |
| static const int | ICON_NONE |
Static Public Attributes inherited from gObject | |
| static const int | LOGLEVEL_SILENT |
| static const int | LOGLEVEL_DEBUG |
| static const int | LOGLEVEL_INFO |
| static const int | LOGLEVEL_WARNING |
| static const int | LOGLEVEL_ERROR |
Additional Inherited Members | |
Static Public Member Functions inherited from gObject | |
| static std::string | gGetAppDir () |
| static std::string | gGetAssetsDir () |
| static void | gSetAssetsDir (std::string assetsDir) |
| static std::string | gGetFilesDir () |
| static std::string | gGetImagesDir () |
| static std::string | gGetFontsDir () |
| static std::string | gGetModelsDir () |
| static std::string | gGetTexturesDir () |
| static std::string | gGetShadersDir () |
| static std::string | gGetSoundsDir () |
| static std::string | gGetDatabasesDir () |
| static std::string | gGetVideosDir () |
| static void | setCurrentResolution (int scalingNo, int currentResolutionNo) |
Static Protected Attributes inherited from gObject | |
| static int | renderpassnum |
| static int | renderpassno |
| static int | releasescaling |
| static int | releaseresolution |
gGUIResources keeps all images in base64 format that the programmer can use in their software thanks to their getter functions. We keep this data as base64 because asset images may be lost or corrupted in the file.This results in loss of image and bad experience for a developer. All the images have their own getter function and this getter functions return base64 string value of the image.
There are 2 types of getter functions in this class. The first of them is getBase64Icon... function. This function provides us to get base64 string of an image. Also every image has their own getBase64Icon... function. We use these functions inside the initialize function as parameters of the decode function. gDecodeBase64 is a function that converts the base64 string sent into the decode function to image data. Thanks to initialize function, we can add image that we decoded to gImage array that we created.Thus, we will be able to use any image we want in other classes.
HOW TO USE
To draw this use draw function (Ex : res.getIconImage(id)->draw(....). If you want the users to choose the images by using your class. You have to define imageid variable as a parameter of getIconImage in your class. Define a function that get id information from developer user to your class and defines it into the iconid variable in your class. Thus, users can use the icons which you add by using the function you define to get id from users in your class.
| anonymous enum |
| gGUIResources::gGUIResources | ( | ) |
|
virtual |
| void gGUIResources::cleanup | ( | ) |
| int gGUIResources::getIconComponentsNum | ( | ) |
| int gGUIResources::getIconHeight | ( | ) |
| gTexture * gGUIResources::getIconImage | ( | int | iconId, |
| bool | isIconBig = false |
||
| ) |
| int gGUIResources::getIconNum | ( | ) |
| int gGUIResources::getIconWidth | ( | ) |
| void gGUIResources::initialize | ( | ) |
| bool gGUIResources::isInitialized | ( | ) |
|
static |