Planeshift
|
00001 /* 00002 * pawsconfigchatbubbles.h - Author: Steven Patrick 00003 * 00004 * Copyright (C) 2001-2008 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 00020 #ifndef PAWS_CONFIG_CHATBUBBLES_HEADER 00021 #define PAWS_CONFIG_CHATBUBBLES_HEADER 00022 00023 // PAWS INCLUDES 00024 #include "paws/pawswidget.h" 00025 #include "pawsconfigwindow.h" 00026 00027 class psChatBubbles; 00028 class pawsCheckBox; 00029 class pawsEditTextBox; 00030 class pawsScrollBar; 00031 class pawsTextBox; 00032 class pawsComboBox; 00033 00034 struct pawsBubbleChatType 00035 { 00036 int chatType; 00037 csString type; 00038 int startLineNo; 00039 00040 pawsCheckBox *enabled; 00041 pawsTextBox *Text; 00042 pawsTextBox *Shadow; 00043 pawsTextBox *Outline; 00044 pawsTextBox *AlignText; 00045 00046 pawsEditTextBox *TextR; 00047 pawsEditTextBox *TextG; 00048 pawsEditTextBox *TextB; 00049 pawsEditTextBox *ShadowR; 00050 pawsEditTextBox *ShadowG; 00051 pawsEditTextBox *ShadowB; 00052 pawsEditTextBox *OutlineR; 00053 pawsEditTextBox *OutlineG; 00054 pawsEditTextBox *OutlineB; 00055 00056 pawsComboBox *Align; 00057 }; 00058 00059 class pawsConfigChatBubbles : public pawsConfigSectionWindow 00060 { 00061 public: 00062 pawsConfigChatBubbles(); 00063 void drawFrame(); 00064 00065 //from pawsWidget: 00066 virtual bool PostSetup(); 00067 00068 // from pawsConfigSectionWindow: 00069 virtual bool Initialize(); 00070 virtual bool LoadConfig(); 00071 virtual bool SaveConfig(); 00072 virtual void SetDefault(); 00073 virtual void Show(); 00074 00075 // from pawsWidget 00076 bool OnChange(pawsWidget* /*widget*/) { dirty = true; return true; } 00077 virtual bool OnButtonPressed(int /*button*/, int /*keyModifier*/, pawsWidget* /*widget*/) 00078 { 00079 dirty = true; 00080 return true; 00081 } 00082 bool OnMouseDown(int button, int modifiers, int x, int y ); 00083 bool OnScroll( int direction, pawsScrollBar* widget ); 00084 virtual void OnListAction( pawsListBox* selected, int status ); 00085 00086 private: 00087 psChatBubbles *chatBubbles; 00088 00089 pawsCheckBox *allEnabled; 00090 00091 csArray<pawsBubbleChatType> pawsBubbleChatTypes; 00092 00093 pawsTextBox *maxLineLenText; 00094 pawsEditTextBox *maxLineLen; 00095 pawsTextBox *shortPhraseCharCountText; 00096 pawsEditTextBox *shortPhraseCharCount; 00097 pawsTextBox *longPhraseLineCountText; 00098 pawsEditTextBox *longPhraseLineCount; 00099 00100 pawsScrollBar *scrollBar; 00101 pawsCheckBox *mixActionColours; 00102 }; 00103 00104 CREATE_PAWS_FACTORY( pawsConfigChatBubbles ); 00105 #endif