Chat-O-Matic/application/views/AccountMenuItem.cpp
Jaidyn Ann 47ca0f4169 Make all AccountsMenu items BitmapMenuItems
Now all account menus will have the pretty protocol icons to go with
them. :)

The icons are scaled to text-size so that they might be displayed in a
corresponding MenuButton, or maybe BMenuField at some point, and put
into the ImageCache.

The menu items do not have ownership of the bitmaps.
2021-08-03 10:29:19 -05:00

26 lines
483 B
C++

/*
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include "AccountMenuItem.h"
#include "AccountsMenu.h"
AccountMenuItem::AccountMenuItem(const char* label, BMessage* msg,
BBitmap* icon)
:
BitmapMenuItem(label, msg, icon, 0, 0, false)
{
}
void
AccountMenuItem::SetMarked(bool mark)
{
BMenuItem::SetMarked(mark);
if (mark == true)
((AccountsMenu*)Menu())->SetDefaultSelection(this);
}