Planeshift
pawsconfigtooltips.h
Go to the documentation of this file.
1 /*
2 * pawsconfigtooltips.h - Author: Neeno Pelero
3 *
4 * Copyright (C) 2011 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5 *
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation (version 2 of the License)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 */
19 
20 #ifndef PAWS_CONFIG_TOOLTIPS
21 #define PAWS_CONFIG_TOOLTIPS
22 
23 //==============================================================================
24 // CS INCLUDES
25 //==============================================================================
26 #include <csutil/array.h>
27 #include <iutil/document.h>
28 
29 //==============================================================================
30 // PAWS INCLUDES
31 //==============================================================================
32 #include "paws/pawswidget.h"
33 #include "pawsconfigwindow.h"
35 
36 
37 class pawsCheckBox;
38 
43 {
44 public:
45  pawsConfigTooltips(void);
46 
47  virtual bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
48 
50  virtual void OnColorEntered(const char *name,int param,int color);
51 
52  virtual bool PostSetup();
53 
55  virtual bool Initialize();
56  virtual bool LoadConfig();
57  virtual bool SaveConfig();
58  virtual void SetDefault();
59 
60  void SaveSetting();
61  bool LoadDefaults();
62 
63 private:
64  pawsCheckBox* EnableTooltips;
65  pawsCheckBox* EnableBgColor;
66 
67  pawsTextBox* TooltipBgColor;
68  pawsTextBox* TooltipFontColor;
69  pawsTextBox* TooltipShadowColor;
70 
71  pawsWidget* widget;
72 
73  void RefreshColorFrames();
74 
75  pawsColorPromptWindow * colorPicker;
76 
77  int defTooltipsColors[3];
78  bool defToolTipEnable;
79  bool defToolTipEnableBgColor;
80 
81 };
82 
84 
85 #endif
void SaveSetting()
Saves the configuration file.
virtual bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Constructor.
pawsColorPromptWindow is window that lets the user enter a color by the use of three sliders and a co...
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
virtual bool Initialize()
from pawsConfigSectionWindow
A combination widget that has a check box and a text label.
Definition: pawscheckbox.h:48
csString name
The name of this widget.
Definition: pawswidget.h:217
bool LoadDefaults()
Loads the default values.
configuration screen for tooltips, colors, enabled yes/no, fonts
virtual bool SaveConfig()
remembers settings in-game and saves them permanently to a file also
virtual bool PostSetup()
virtual void OnColorEntered(const char *name, int param, int color)
from iOnColorEnteredAction (set color to param-identified label)
virtual bool LoadConfig()
sets content of dialog according to current configuration
virtual void SetDefault()
sets content of dialog according to default configuration
A basic text box widget.
Definition: pawstextbox.h:42
CREATE_PAWS_FACTORY(pawsConfigTooltips)