impr: Make sidebars disableable and resizable

This commit is contained in:
WerWolv
2023-11-14 15:55:25 +01:00
parent 53c04a934e
commit 33e20df511
3 changed files with 45 additions and 9 deletions

View File

@@ -748,8 +748,8 @@ namespace hex {
impl::getToolbarItems().push_back(function);
}
void addSidebarItem(const std::string &icon, const impl::DrawCallback &function) {
impl::getSidebarItems().push_back({ icon, function });
void addSidebarItem(const std::string &icon, const impl::DrawCallback &function, const impl::EnabledCallback &enabledCallback) {
impl::getSidebarItems().push_back({ icon, function, enabledCallback });
}
void addTitleBarButton(const std::string &icon, const std::string &unlocalizedTooltip, const impl::ClickCallback &function) {