Planeshift

pawscreditswindow.h

Go to the documentation of this file.
00001 /*
00002  * pawscreditswindow.h - Author: Christian Svensson
00003  *
00004  * Copyright (C) 2004 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 #ifndef PAWS_CREDITS_WINDOW_HEADER
00020 #define PAWS_CREDITS_WINDOW_HEADER
00021 
00022 #include "globals.h"
00023 #include "paws/pawswidget.h"
00024 #include <ivideo/fontserv.h>
00025  
00026 class pawsProgressBar;
00027 
00028 class pawsCreditsWindow : public pawsWidget
00029 {
00030 public:
00031     ~pawsCreditsWindow(){}
00032     
00033     bool PostSetup(); 
00034     void Draw(); 
00035     void Hide();
00036     void Show();
00037     bool OnButtonPressed(int button, int keyModifier, pawsWidget *widget);
00038     
00039 private:
00040     //to count the time
00041     csTicks initialTime;
00042 
00044     csString mainstring;
00045 
00046     // scroll credits up 1 pixel every n ms
00047     csTicks scrollRate;
00048 
00049     // Y position of first line
00050     int textYofs;
00051 
00052     // number of lines displayed
00053     size_t numLines;
00054 
00055     // height of the font
00056     int textHeight;
00057 
00058     //this is what position to start from when displaying the text
00059     int startPos;
00060 
00061     // the font used
00062     csRef<iFont> font;
00063 
00064     int pixelAt;
00065 
00066     //default colors (Loaded from file)
00067     int standardR,standardG,standardB;
00068     int atR,atG,atB; // @
00069     int andR,andG,andB; // &
00070 
00071     //Props loaded from file
00072     int width;
00073     int height;
00074     int x;
00075     int y;
00076 
00077     bool loop;
00078     csString endMsg;
00079     int endColor;
00080     bool box;
00081 
00082     //Speed
00083     int speed;
00084 
00085     //array
00086     csArray<csString> credits;
00087     csArray<int> styles;     
00088 };
00089 
00090 CREATE_PAWS_FACTORY( pawsCreditsWindow );
00091 
00092 #endif
00093