diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-01-18 14:25:25 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-01-18 14:25:25 +0000 |
commit | a16f1463522f8a73c44d0d0c2aea53e5aada6859 (patch) | |
tree | 40dd13eb97c6e9bea33cf3867b9b6540252a97bc /src/gui/chat.cpp | |
parent | cdf69c700c4a3e5a50a8b9b30c497eb05b7155d8 (diff) | |
download | mana-a16f1463522f8a73c44d0d0c2aea53e5aada6859.tar.gz mana-a16f1463522f8a73c44d0d0c2aea53e5aada6859.tar.bz2 mana-a16f1463522f8a73c44d0d0c2aea53e5aada6859.tar.xz mana-a16f1463522f8a73c44d0d0c2aea53e5aada6859.zip |
*** empty log message ***
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
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; |