OpenXcom  1.0
Open-source clone of the original X-Com
Frame.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * OpenXcom is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #include "../Engine/Surface.h"
21 
22 namespace OpenXcom
23 {
24 
28 class Frame : public Surface
29 {
30 private:
31  Uint8 _color, _bg;
32  int _thickness;
33  bool _contrast;
34 public:
36  Frame(int width, int height, int x = 0, int y = 0);
38  ~Frame();
40  void setColor(Uint8 color);
42  Uint8 getColor() const;
43  void setBorderColor(Uint8 color);
45  void setSecondaryColor(Uint8 bg);
47  Uint8 getSecondaryColor() const;
49  void setHighContrast(bool contrast);
51  void setThickness(int thickness);
53  void draw();
54 };
55 
56 }
Uint8 getColor() const
Gets the border color.
Definition: Frame.cpp:69
Frame(int width, int height, int x=0, int y=0)
Creates a new frame with the specified size and position.
Definition: Frame.cpp:32
void setBorderColor(Uint8 color)
Changes the color used to draw the shaded border.
Definition: Frame.cpp:60
void draw()
Draws the frame.
Definition: Frame.cpp:120
void setColor(Uint8 color)
Sets the border color.
Definition: Frame.cpp:47
void setThickness(int thickness)
Sets the border thickness.
Definition: Frame.cpp:108
Uint8 getSecondaryColor() const
Gets the background color.
Definition: Frame.cpp:88
void setSecondaryColor(Uint8 bg)
Sets the background color.
Definition: Frame.cpp:78
Element that is blit (rendered) onto the screen.
Definition: Surface.h:38
void setHighContrast(bool contrast)
Sets the high contrast color setting.
Definition: Frame.cpp:98
Fancy frame border thing used for windows and other elements.
Definition: Frame.h:28
~Frame()
Cleans up the frame.
Definition: Frame.cpp:39
Definition: BaseInfoState.cpp:40