summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_icons.cpp
blob: 83c8f10f2b6c86dd2b54ea5bf4139566e2932a9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "stdafx.h"

static IconItem iconList[] =
{
	{ LPGEN("Protocol icon"),			"main",				IDI_TOX  },
	{ LPGEN("Action icon"),			"main",				IDI_ME   },
	{ LPGEN("Correction icon"),		"edit",				IDI_EDIT },
};

void CToxProto::InitIcons()
{
	g_plugin.registerIcon(LPGEN("Protocols") "/" MODULE, iconList, MODULE);
}

HANDLE CToxProto::GetIconHandle(int iconId)
{
	for (auto &it : iconList)
		if (it.defIconID == iconId)
			return it.hIcolib;
	return nullptr;
}

HICON CToxProto::GetIcon(int iconId)
{
	for (auto &it : iconList)
		if (it.defIconID == iconId)
			return IcoLib_GetIconByHandle(it.hIcolib);
	return nullptr;
}