diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-09-16 16:09:23 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-09-16 16:09:23 (GMT) |
| commit | bd02c36426f0ee9196ac971f8f9b7e03eb35dbd3 (patch) | |
| tree | bfe72a315c3204c7ff857dad89b8b6cfc17803d6 /src/interface/ContextMenu.cpp | |
| parent | cd7fe454b213f77d5048357c99595ed167918ff8 (diff) | |
| download | powder-bd02c36426f0ee9196ac971f8f9b7e03eb35dbd3.zip powder-bd02c36426f0ee9196ac971f8f9b7e03eb35dbd3.tar.gz | |
Right click menu to go to history and user info for save buttons
Diffstat (limited to 'src/interface/ContextMenu.cpp')
| -rw-r--r-- | src/interface/ContextMenu.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/interface/ContextMenu.cpp b/src/interface/ContextMenu.cpp index 4ea1580..0d34e19 100644 --- a/src/interface/ContextMenu.cpp +++ b/src/interface/ContextMenu.cpp @@ -52,6 +52,7 @@ void ContextMenu::Show(ui::Point position) void ContextMenu::ActionCallback(ui::Button *sender, int item) { ui::Engine::Ref().CloseWindow(); + Halt(); source->OnContextMenuAction(item); } @@ -61,6 +62,18 @@ void ContextMenu::OnMouseDown(int x, int y, unsigned button) ui::Engine::Ref().CloseWindow(); } +void ContextMenu::SetItem(int id, std::string text) +{ + for(int i = 0; i < items.size(); i++) + { + if(items[i].ID == id) + { + items[i].Text = text; + break; + } + } +} + void ContextMenu::RemoveItem(int id) { for(int i = 0; i < items.size(); i++) |
