add icon to menu entries

This commit is contained in:
SweetId
2023-10-15 13:15:31 -04:00
parent 05b4386588
commit 091773be1b
2 changed files with 9 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ namespace Nz
virtual void OnRenderImgui() override;
void AddMenuAction(const std::string& path, const std::string& shortcut, ActionCallback callback);
void AddMenuAction(const std::string& path, const std::string& shortcut, ActionCallback callback, const std::shared_ptr<Nz::Texture>& icon = {});
void AddMenuSeparator(const std::string& path);
EditorBaseApplication* GetApplication() { return m_application; }
@@ -44,6 +44,7 @@ namespace Nz
{
std::string label;
std::string shortcut;
std::shared_ptr<Nz::Texture> icon;
ActionCallback callback;
};