mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
impr: Added icons to all tools
This commit is contained in:
@@ -632,6 +632,7 @@ EXPORT_MODULE namespace hex {
|
||||
|
||||
struct Entry {
|
||||
UnlocalizedString unlocalizedName;
|
||||
const char *icon;
|
||||
Callback function;
|
||||
};
|
||||
|
||||
@@ -644,7 +645,7 @@ EXPORT_MODULE namespace hex {
|
||||
* @param unlocalizedName The unlocalized name of the tool
|
||||
* @param function The function that will be called to draw the tool
|
||||
*/
|
||||
void add(const UnlocalizedString &unlocalizedName, const impl::Callback &function);
|
||||
void add(const UnlocalizedString &unlocalizedName, const char *icon, const impl::Callback &function);
|
||||
}
|
||||
|
||||
/* Data Inspector Registry. Allows adding of new types to the data inspector */
|
||||
|
||||
@@ -767,10 +767,10 @@ namespace hex {
|
||||
|
||||
}
|
||||
|
||||
void add(const UnlocalizedString &unlocalizedName, const impl::Callback &function) {
|
||||
void add(const UnlocalizedString &unlocalizedName, const char *icon, const impl::Callback &function) {
|
||||
log::debug("Registered new tool: {}", unlocalizedName.get());
|
||||
|
||||
impl::s_tools->emplace_back(impl::Entry { unlocalizedName, function });
|
||||
impl::s_tools->emplace_back(impl::Entry { unlocalizedName, icon, function });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user