Planeshift
|
00001 /* 00002 * pawscharbirth.h - Author: Andrew Dai 00003 * 00004 * Copyright (C) 2003 Atomic Blue ([email protected], http://www.atomicblue.org) 00005 * 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License 00009 * as published by the Free Software Foundation (version 2 of the License) 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 * 00018 */ 00019 #ifndef PAWS_CHAR_BIRTH_HEADER 00020 #define PAWS_CHAR_BIRTH_HEADER 00021 00022 #include "paws/pawswidget.h" 00023 #include "psclientchar.h" 00024 00025 class pawsTextBox; 00026 00028 struct Zodiac 00029 { 00030 csString name; 00031 csString img; 00032 csString desc; 00033 unsigned int month; 00034 }; 00035 00036 class pawsCharBirth : public pawsWidget 00037 { 00038 public: 00039 pawsCharBirth(); 00040 ~pawsCharBirth(); 00041 pawsCharBirth(const pawsCharBirth& origin){} 00042 void OnListAction( pawsListBox* widget, int status ); 00043 bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget ); 00044 bool PostSetup(); 00045 void Show(); 00046 void Draw(); 00047 void Randomize(); 00048 00049 Zodiac* GetZodiac(const char* name); 00050 Zodiac* GetZodiac(unsigned int month); 00051 00052 private: 00053 void PopulateFields(); 00054 00055 int lastSiblingsChoice; 00056 int lastZodiacChoice; 00057 int sibCount; 00058 bool dataLoaded; 00059 00060 // Contains the zodiacs 00061 csPDelArray<Zodiac> zodiacs; 00062 00063 psCreationManager* createManager; 00064 pawsTextBox* cpBox; 00065 void UpdateCP(); 00066 00067 pawsComboBox* months; 00068 pawsComboBox* days; 00069 }; 00070 00071 CREATE_PAWS_FACTORY( pawsCharBirth ); 00072 00073 #endif 00074