Planeshift
pawscreditswindow.h
Go to the documentation of this file.
1 /*
2  * pawscreditswindow.h - Author: Christian Svensson
3  *
4  * Copyright (C) 2004 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 #ifndef PAWS_CREDITS_WINDOW_HEADER
20 #define PAWS_CREDITS_WINDOW_HEADER
21 
22 #include "globals.h"
23 #include "paws/pawswidget.h"
24 #include <ivideo/fontserv.h>
25 
26 class pawsProgressBar;
27 
32 {
33 public:
35 
36  bool PostSetup();
37  void Draw();
38  void Hide();
39  void Show();
40  bool OnButtonPressed(int button, int keyModifier, pawsWidget *widget);
41 
42 private:
43  //to count the time
44  csTicks initialTime;
45 
47  csString mainstring;
48 
49  // scroll credits up 1 pixel every n ms
50  csTicks scrollRate;
51 
52  // Y position of first line
53  int textYofs;
54 
55  // number of lines displayed
56  size_t numLines;
57 
58  // height of the font
59  int textHeight;
60 
61  //this is what position to start from when displaying the text
62  int startPos;
63 
64  // the font used
65  csRef<iFont> font;
66 
67  int pixelAt;
68 
69  //default colors (Loaded from file)
70  int standardR,standardG,standardB;
71  int atR,atG,atB; // @
72  int andR,andG,andB; // &
73 
74  //Props loaded from file
75  int width;
76  int height;
77  int x;
78  int y;
79 
80  bool loop;
81  csString endMsg;
82  int endColor;
83  bool box;
84 
85  //Speed
86  int speed;
87 
88  //array
89  csArray<csString> credits;
90  csArray<int> styles;
91 };
92 
94 
95 #endif
96 
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
CREATE_PAWS_FACTORY(pawsCreditsWindow)
void Draw()
Draws the widget and all of it&#39;s children.
bool PostSetup()
This is called after the widget and all of it&#39;s children have been created.
void Hide()
Makes widget invisible and removes focus if widget has current focus.
void Show()
Makes widget visible and brings it to the front.
Screen with credits of the game in a large scrolling text box.
bool OnButtonPressed(int button, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.