Make it possible to add a title to context menu

This commit is contained in:
Paul Rouget 2020-03-31 09:40:57 +02:00
parent 687156ac90
commit 0b489a0135
9 changed files with 33 additions and 18 deletions

View file

@ -564,9 +564,10 @@ void ServoControl::OnServoDevtoolsStarted(bool success,
});
}
void ServoControl::OnServoShowContextMenu(std::vector<winrt::hstring> items) {
void ServoControl::OnServoShowContextMenu(std::optional<hstring> title,
std::vector<winrt::hstring> items) {
RunOnUIThread([=] {
MessageDialog msg{L"Menu"};
MessageDialog msg{title.value_or(L"Menu")};
for (auto i = 0; i < items.size(); i++) {
UICommand cmd{items[i], [=](auto) {
RunOnGLThread([=] {