From a955d18f62f335f84e0926f351eb85d78224cba6 Mon Sep 17 00:00:00 2001 From: aunsane Date: Sun, 20 May 2018 21:10:10 +0300 Subject: MirLua: project reordering --- plugins/MirLua/src/icons.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 plugins/MirLua/src/icons.cpp (limited to 'plugins/MirLua/src/icons.cpp') diff --git a/plugins/MirLua/src/icons.cpp b/plugins/MirLua/src/icons.cpp new file mode 100644 index 0000000000..4a6cc91219 --- /dev/null +++ b/plugins/MirLua/src/icons.cpp @@ -0,0 +1,33 @@ +#include "stdafx.h" + +IconItem Icons[] = +{ + { LPGEN("Script"), "script", IDI_SCRIPT }, + { LPGEN("Loaded"), "loaded", IDI_LOADED }, + { LPGEN("Failed"), "failed", IDI_FAILED }, + { LPGEN("Open"), "open", IDI_OPEN }, + { LPGEN("Reload"), "reload", IDI_RELOAD }, +}; + +void InitIcons() +{ + g_plugin.registerIcon(MODULENAME, Icons, MODULENAME); +} + +HICON GetIcon(int iconId) +{ + for (auto &it : Icons) + if (it.defIconID == iconId) + return IcoLib_GetIconByHandle(it.hIcolib); + + return nullptr; +} + +HANDLE GetIconHandle(int iconId) +{ + for (auto &it : Icons) + if (it.defIconID == iconId) + return it.hIcolib; + + return nullptr; +} \ No newline at end of file -- cgit v1.2.3