Planeshift
|
00001 /* 00002 * pawsspellbook.h - Anders Reggestad <[email protected]> 00003 * - PAWS conversion Andrew Craig 00004 * 00005 * Copyright (C) 2003 Atomic Blue ([email protected], http://www.atomicblue.org) 00006 * 00007 * 00008 * This program is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU General Public License 00010 * as published by the Free Software Foundation (version 2 of the License) 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 * 00019 */ 00020 00021 #ifndef PAWS_SPELLBOOK_WINDOW_HEADER 00022 #define PAWS_SPELLBOOK_WINDOW_HEADER 00023 00024 #include "paws/pawswidget.h" 00025 class pawsTextBox; 00026 class pawsListBox; 00027 class pawsMessageTextBox; 00028 class pawsSlot; 00029 00030 #include "net/cmdbase.h" 00031 #include "gui/pawscontrolwindow.h" 00032 00033 00036 class pawsSpellBookWindow : public pawsControlledWindow, public psClientNetSubscriber 00037 { 00038 public: 00039 00040 pawsSpellBookWindow(); 00041 virtual ~pawsSpellBookWindow(); 00042 00043 bool PostSetup(); 00044 00045 virtual void HandleMessage(MsgEntry *msg); 00046 00047 bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget ); 00048 void OnListAction( pawsListBox* listbox, int status ); 00049 void Show(); 00050 private: 00051 00052 void CreateNewSpell(); 00053 void Cast(); 00054 void ShowActiveMagic(); 00055 00056 void Close(); 00057 00058 void HandleSpells( MsgEntry* me ); 00059 00060 pawsListBox* spellList; 00061 pawsMessageTextBox* spellDescription; 00062 pawsSlot* spellImage; 00063 00064 csString selectedSpell; 00065 00066 csHash<csString, csString> descriptions_Hash; 00067 csHash<csString, csString> images_Hash; 00068 }; 00069 00070 CREATE_PAWS_FACTORY( pawsSpellBookWindow ); 00071 00072 00073 #endif 00074 00075