Mana
Loading...
Searching...
No Matches
setup_colors.h
Go to the documentation of this file.
1/*
2 * Configurable text colors
3 * Copyright (C) 2008 Douglas Boffey <dougaboffey@netscape.net>
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include "guichanfwd.h"
25
27
28#include <guichan/actionlistener.hpp>
29#include <guichan/selectionlistener.hpp>
30
31#include <string>
32
33class BrowserBox;
34class TextField;
35class TextPreview;
36
37class Setup_Colors : public SetupTab,
38 public gcn::ActionListener,
39 public gcn::SelectionListener
40{
41 public:
43 ~Setup_Colors() override;
44
45 void apply() override;
46 void cancel() override;
47
48 void action(const gcn::ActionEvent &event) override;
49
50 void valueChanged(const gcn::SelectionEvent &event) override;
51
52 private:
53 static const std::string rawmsg;
54
55 gcn::ListBox *mColorBox;
56 gcn::ScrollArea *mScroll;
59 gcn::ScrollArea *mPreviewBox;
61
62 gcn::Label *mGradTypeLabel;
63 gcn::Slider *mGradTypeSlider;
64 gcn::Label *mGradTypeText;
65
66 gcn::Label *mGradDelayLabel;
67 gcn::Slider *mGradDelaySlider;
69
70 gcn::Label *mRedLabel;
71 gcn::Slider *mRedSlider;
74
75 gcn::Label *mGreenLabel;
76 gcn::Slider *mGreenSlider;
79
80 gcn::Label *mBlueLabel;
81 gcn::Slider *mBlueSlider;
84
85 void setEntry(gcn::Slider *s, TextField *t, int value);
86 void updateColor();
87 void updateGradType();
88};
A simple browser box able to handle links and forward events to the parent conteiner.
Definition browserbox.h:74
A container for the contents of a tab in the setup window.
Definition setuptab.h:32
static const std::string rawmsg
void valueChanged(const gcn::SelectionEvent &event) override
gcn::ListBox * mColorBox
BrowserBox * mPreview
gcn::Label * mRedLabel
TextField * mGradDelayText
gcn::Slider * mGradTypeSlider
gcn::ScrollArea * mPreviewBox
gcn::Slider * mRedSlider
gcn::ScrollArea * mScroll
void setEntry(gcn::Slider *s, TextField *t, int value)
TextField * mBlueText
gcn::Slider * mGreenSlider
void apply() override
Called when the Apply button is pressed in the setup window.
gcn::Label * mGradTypeLabel
gcn::Label * mGreenLabel
TextPreview * mTextPreview
void action(const gcn::ActionEvent &event) override
gcn::Slider * mBlueSlider
gcn::Label * mGradTypeText
gcn::Label * mBlueLabel
gcn::Label * mGradDelayLabel
TextField * mRedText
TextField * mGreenText
gcn::Slider * mGradDelaySlider
void updateGradType()
void cancel() override
Called when the Cancel button is pressed in the setup window.
~Setup_Colors() override
A text field.
Definition textfield.h:72
Preview widget for particle colors, etc.
Definition textpreview.h:32