AccountMenuItem.cpp 483 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
  3. * All rights reserved. Distributed under the terms of the MIT license.
  4. */
  5. #include "AccountMenuItem.h"
  6. #include "AccountsMenu.h"
  7. AccountMenuItem::AccountMenuItem(const char* label, BMessage* msg,
  8. BBitmap* icon)
  9. :
  10. BitmapMenuItem(label, msg, icon, 0, 0, false)
  11. {
  12. }
  13. void
  14. AccountMenuItem::SetMarked(bool mark)
  15. {
  16. BMenuItem::SetMarked(mark);
  17. if (mark == true)
  18. ((AccountsMenu*)Menu())->SetDefaultSelection(this);
  19. }