00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
#include <stdincl.h>
00024
00025
#include "client.h"
00026
#include "Globals.h"
00027
#include "TextDialog.h"
00028
00029
00030 #define W 400
00031 #define H 100
00032 #define X XMAX / 2 - W / 2
00033 #define Y YMAX / 2 - H / 2
00034
00035 TextDialog::TextDialog(Surface *s)
00036 :Dialog(s,
X,
Y,
W,
H)
00037 ,m_output(this,5,5,
W - SBSIZE - 10,
H - 10)
00038 ,m_vbar(this)
00039 {
00040 SetText(
"TextDialog");
00041 CreateTemporaryScreen();
00042
00043 SetBgColor(255,255,255);
00044 SetFgColor(0,0,0);
00045
00046 SetMoveable(
true);
00047
00048
m_output.SetFrameWidth(0);
00049
00050 AddChild(&
m_output);
00051 AddChild(&
m_vbar);
00052
00053 SDL_Rect *area = GetClientRectPtr();
00054 Uint32 color = GetBgColor();
00055
00056 SDL_FillRect(m_screen, area, color);
00057
00058 }
00059
00060
00061 TextDialog::~TextDialog()
00062 {
00063 }
00064
00065
00066 void TextDialog::Draw()
00067 {
00068 }
00069
00070
00071 void TextDialog::AddLine(
const string &str)
00072 {
00073
m_output.AddLine(str);
00074
00075
00076
00077 }
00078
00079