1 /* 2 * Copyright 2002-2006, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Mattias Sundblad 7 * Andrew Bachmann 8 */ 9 10 #include "ColorMenuItem.h" 11 12 #include <Message.h> 13 14 ColorMenuItem::ColorMenuItem(const char *label, rgb_color color, 15 BMessage *message) 16 : BMenuItem(label, message, 0, 0), 17 fItemColor(color) 18 { 19 } 20 21 22 void 23 ColorMenuItem::DrawContent() 24 { 25 BMenu* menu = Menu(); 26 if (menu) { 27 rgb_color menuColor = menu->HighColor(); 28 29 menu->SetHighColor(fItemColor); 30 BMenuItem::DrawContent(); 31 menu->SetHighColor(menuColor); 32 } 33 } 34