Planeshift
|
00001 /* 00002 * pawsinfowindow.h - Author: Andrew Craig 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 // pawsinfowindow.h: interface for the pawsInfoWindow class. 00020 // 00022 00023 #ifndef PAWS_INFO_WINDOW_HEADER 00024 #define PAWS_INFO_WINDOW_HEADER 00025 00026 #include "paws/pawswidget.h" 00027 #include "net/cmdbase.h" 00028 #include "gui/pawscontrolwindow.h" 00029 #include "net/message.h" 00030 #include "gui/pawsslot.h" 00031 00032 class pawsTextBox; 00033 class pawsProgressBar; 00034 class pawsScrollBar; 00035 class pawsButton; 00036 class GEMClientObject; 00037 class GEMClientActor; 00038 00042 class pawsInfoWindow : public pawsControlledWindow, public psClientNetSubscriber 00043 { 00044 public: 00045 virtual ~pawsInfoWindow(); 00046 00047 virtual void Show(); 00048 virtual void Draw(); 00049 bool PostSetup(); 00050 00051 virtual void HandleMessage(MsgEntry *msg); 00052 00053 virtual bool OnScroll( int direction, pawsScrollBar* widget ); 00054 virtual bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* reporter ); 00055 00056 void SetStanceHighlight(uint stance); 00057 void UpdateAttkQueue(MsgEntry* me); 00058 00059 bool LoadUserSharedPrefs(); 00060 00061 void SetHPWarnLevel( float val ); 00062 float GetHPWarnLevel(); 00063 00064 void SetHPDangerLevel( float val ); 00065 float GetHPDangerLevel(); 00066 00067 void SetHPFlashLevel( float val ); 00068 float GetHPFlashLevel(); 00069 00070 void SetManaWarnLevel( float val ); 00071 float GetManaWarnLevel(); 00072 00073 void SetManaDangerLevel( float val ); 00074 float GetManaDangerLevel(); 00075 00076 void SetManaFlashLevel( float val ); 00077 float GetManaFlashLevel(); 00078 00079 private: 00080 pawsTextBox *targetName; 00081 pawsProgressBar *main_hp; 00082 pawsProgressBar *main_mana; 00083 pawsProgressBar *main_stamina[2]; 00084 pawsProgressBar *target_hp; 00085 pawsScrollBar *kFactor; 00086 pawsTextBox *kFactorPct; 00087 pawsButton *stanceButton0; 00088 pawsButton *stanceButton1; 00089 pawsButton *stanceButton2; 00090 pawsButton *stanceButton3; 00091 pawsButton *stanceButton4; 00092 pawsButton *stanceButton5; 00093 00094 pawsSlot* attackImage[5]; 00095 00096 pawsTextBox* timeOfDay; 00097 csString stanceConvert(const uint ID); 00098 00099 uint selectedstance; 00100 00101 enum baseStances { 00102 BLOODY = 1, 00103 AGGRESSIVE, 00104 NORMAL, 00105 DEFENSIVE, 00106 FULLYDEFENSIVE }; 00107 }; 00108 00109 CREATE_PAWS_FACTORY( pawsInfoWindow ); 00110 00111 00112 #endif 00113