From a16f1463522f8a73c44d0d0c2aea53e5aada6859 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 18 Jan 2005 14:25:25 +0000 Subject: *** empty log message *** --- src/gui/chat.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/gui/chat.cpp') diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 4f2655a2..661fbb08 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -96,19 +96,13 @@ void ChatBox::draw(gcn::Graphics *graphics) getAbsolutePosition(x, y); - SDL_Rect SourceRect, ScreenRect; - SourceRect.x = SourceRect.y = 0; - SourceRect.w = ScreenRect.w = getWidth(); - SourceRect.h = ScreenRect.h = getHeight(); + SDL_Rect ScreenRect; + ScreenRect.w = getWidth(); + ScreenRect.h = getHeight(); ScreenRect.x = x; ScreenRect.y = y; - SDL_Surface *ChatBoxBackground = SDL_AllocSurface(SDL_HWSURFACE, getWidth(),getHeight(), (screen->format->BytesPerPixel*8), 0, 0, 0, 0); - Uint32 Color = SDL_MapRGB(screen->format, 255, 255, 255); - SDL_FillRect(ChatBoxBackground, &SourceRect, Color); - SDL_SetAlpha(ChatBoxBackground, SDL_SRCALPHA, 120); - SDL_BlitSurface(ChatBoxBackground, &SourceRect, screen, &ScreenRect); - SDL_FreeSurface(ChatBoxBackground); - //delete ChatBoxBackground; + Uint32 Color = SDL_MapRGBA(screen->format, 255, 255, 255, 120); + SDL_FillRect(screen, &ScreenRect, Color); for (iter = chatlog.begin(); iter != chatlog.end(); iter++) { line = *iter; -- cgit v1.2.3-70-g09d2