impr: Added icons to all tools

This commit is contained in:
WerWolv
2025-08-05 23:32:27 +02:00
parent a27b10f69a
commit 263c5f6830
4 changed files with 27 additions and 25 deletions

View File

@@ -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 */

View File

@@ -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 });
}
}