Google
Web alhem.net
Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

DotMenu.cpp

Go to the documentation of this file.
00001 00006 /* 00007 Copyright (C) 2004 Anders Hedstrom 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 #include <stdincl.h> 00024 00025 #include "client.h" 00026 #include "MainWindow.h" 00027 #include "DotMenu.h" 00028 00029 00030 using gui::Surface; 00031 using gui::SurfaceHelper; 00032 using gui::Menu; 00033 using gui::surface_event_t; 00034 00035 00036 DotMenu::DotMenu(Surface *s,SurfaceHelper *pclHelper) 00037 :Menu(s,pclHelper) 00038 #ifdef WIN32 00039 ,m_font("font.ttf", 10) 00040 #else 00041 ,m_font("../gui/fonts/font.ttf", 10) 00042 #endif 00043 ,m_title(this,"",&m_font) 00044 ,m_item1(this,"Up 5",&m_font) 00045 ,m_item2(this,"Up 1",&m_font) 00046 ,m_item3(this,"Down 1",&m_font) 00047 ,m_item4(this,"Down 5",&m_font) 00048 { 00049 SetTTFont(&m_font); 00050 00051 m_title.SetClickable(false); 00052 AddMenuItem(&m_title); 00053 AddMenuItem(&m_item1); 00054 AddMenuItem(&m_item2); 00055 AddMenuItem(&m_item3); 00056 AddMenuItem(&m_item4); 00057 CreateMenu(); 00058 CreateTemporaryScreen(); 00059 00060 m_title.SetBgColor(0,0,0); 00061 m_title.SetFgColor(255,255,255); 00062 00063 SetMoveable(false); 00064 } 00065 00066 00067 DotMenu::~DotMenu() 00068 { 00069 } 00070 00071 00072 void DotMenu::OnEvent(surface_event_t *pstEvent) 00073 { 00074 if (pstEvent -> type == GUI_EVENT_BUTTON) 00075 { 00076 if (pstEvent -> local_id == m_item1.GetLocalID()) 00077 { 00078 } 00079 } 00080 } 00081 00082 00083 gui::Menu *DotMenu::GetSubMenu(int id) 00084 { 00085 return NULL; 00086 } 00087 00088

Generated for SDL C++ GUI by doxygen 1.3.6