/* * Author: Andrew Mann * * Copyright (C) 2004 PlaneShift Team (info@planeshift.it, * http://www.planeshift.it) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation (version 2 of the License) * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "gui_menubar.h" #include "partview.h" #include "paws/pawsmanager.h" #include "paws/pawsbutton.h" #include "paws/pawstextbox.h" #include "paws/pawslistbox.h" guiMenuBar::guiMenuBar(PawsManager* manager ) :pawsWidget( manager ) { textbox_activecount=NULL; button_material_list=NULL; } guiMenuBar::~guiMenuBar() { } bool guiMenuBar::PostSetup() { textbox_activecount=(pawsTextBox *)FindWidget("menubar_pscount"); button_material_list=(pawsButton *)FindWidget("menubar_material_list_button"); return true; } bool guiMenuBar::OnButtonPressed(int mouseButton, int keyModifier, pawsWidget* widget) { if (!widget) return false; if (widget == button_material_list) { pawsWidget *matlist_widget=(pawsWidget *)PartViewApp::g_pApp->matlistgui; if (!matlist_widget) return false; if (matlist_widget->IsVisible()) matlist_widget->Hide(); else matlist_widget->Show(); } return true; } bool guiMenuBar::OnChange(pawsWidget * widget) { if (!widget) return false; return true; } void guiMenuBar::OnListAction( pawsListBox* selected, int status ) { if (!selected) return; } bool guiMenuBar::OnKeyDown( int keyCode, int key, int modifiers ) { return false; } void guiMenuBar::RefreshPSCount(int count) { char countstring[64]; sprintf(countstring,"Active Systems: %d",count); textbox_activecount->SetText(countstring); } void guiMenuBar::DoTimedChecks() { }