You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
401 B
C++
24 lines
401 B
C++
3 years ago
|
#include "Icons.h"
|
||
4 years ago
|
|
||
|
#define NELEMENTS(array) (sizeof(array) / sizeof((array)[0]))
|
||
|
|
||
4 years ago
|
const unsigned char *getIconById(const char id[], int size)
|
||
4 years ago
|
{
|
||
|
for (int i = 0; i < NELEMENTS(IconIds); i++)
|
||
|
{
|
||
|
if (strcmp(IconIds[i].id, id) == 0)
|
||
|
{
|
||
|
switch (size)
|
||
|
{
|
||
|
case 64:
|
||
|
return IconIds[i].icon64;
|
||
4 years ago
|
case 256:
|
||
|
return IconIds[i].icon256;
|
||
4 years ago
|
default:
|
||
|
return NULL;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return NULL;
|
||
|
}
|