00001 /* 00002 * The Mana World 00003 * Copyright (C) 2004 The Mana World Development Team 00004 * 00005 * This file is part of The Mana World. 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 */ 00021 00022 #include "gui/buddywindow.h" 00023 00024 #include "gui/chat.h" 00025 00026 #include "gui/widgets/avatar.h" 00027 #include "gui/widgets/icon.h" 00028 00029 #include "resources/resourcemanager.h" 00030 #include "utils/gettext.h" 00031 00032 extern ChatWindow *chatWindow; 00033 00034 BuddyWindow::BuddyWindow(): 00035 Window(_("Buddy")) 00036 { 00037 setWindowName("BuddyWindow"); 00038 setCaption(_("Buddy List")); 00039 setResizable(true); 00040 setCloseButton(true); 00041 setSaveVisible(true); 00042 setMinWidth(110); 00043 setMinHeight(200); 00044 setDefaultSize(124, 41, 288, 330); 00045 00046 Image *addImg = ResourceManager::getInstance()->getImage("buddyadd.png"); 00047 Image *delImg = ResourceManager::getInstance()->getImage("buddydel.png"); 00048 00049 if (addImg && delImg) 00050 { 00051 Icon *addBuddy = new Icon(addImg); 00052 Icon *delBuddy = new Icon(delImg); 00053 00054 add(addBuddy); 00055 add(delBuddy); 00056 } 00057 00058 loadWindowState(); 00059 } 00060 00061 void BuddyWindow::action(const gcn::ActionEvent &event) 00062 { 00063 00064 } 00065 00066 void BuddyWindow::draw(gcn::Graphics *graphics) 00067 { 00068 Window::draw(graphics); 00069 }