diff options
author | aunsane <aunsane@gmail.com> | 2018-05-20 21:10:10 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-05-20 21:34:31 +0300 |
commit | a955d18f62f335f84e0926f351eb85d78224cba6 (patch) | |
tree | 7bd4d30040ec32bba5949dd2245cb68617fb4192 /plugins/MirLua/src/icons.cpp | |
parent | 46363eef857b69761f1d6d28da5a53a954f76900 (diff) |
MirLua: project reordering
Diffstat (limited to 'plugins/MirLua/src/icons.cpp')
-rw-r--r-- | plugins/MirLua/src/icons.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
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 |