1
0
Fork 0

(svn r16594) -Fix [FS#2969]: mouse would under some circumstances not be undrawn when drawing the first chat line causing two mouse pointers to be visible.

release/1.0
rubidium 2009-06-18 17:16:29 +00:00
parent 1359471d3f
commit 904d2bc458
1 changed files with 18 additions and 20 deletions

View File

@ -124,8 +124,6 @@ void NetworkInitChatMessage()
/** Hide the chatbox */ /** Hide the chatbox */
void NetworkUndrawChatMessage() void NetworkUndrawChatMessage()
{ {
if (_chatmessage_visible) {
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
/* Sometimes we also need to hide the cursor /* Sometimes we also need to hide the cursor
* This is because both textmessage and the cursor take a shot of the * This is because both textmessage and the cursor take a shot of the
* screen before drawing. * screen before drawing.
@ -136,16 +134,16 @@ void NetworkUndrawChatMessage()
* looks nicely ;) * looks nicely ;)
* (and now hope this story above makes sense to you ;)) * (and now hope this story above makes sense to you ;))
*/ */
if (_cursor.visible &&
if (_cursor.visible) { _cursor.draw_pos.x + _cursor.draw_size.x >= _chatmsg_box.x &&
if (_cursor.draw_pos.x + _cursor.draw_size.x >= _chatmsg_box.x &&
_cursor.draw_pos.x <= _chatmsg_box.x + _chatmsg_box.width && _cursor.draw_pos.x <= _chatmsg_box.x + _chatmsg_box.width &&
_cursor.draw_pos.y + _cursor.draw_size.y >= _screen.height - _chatmsg_box.y - _chatmsg_box.height && _cursor.draw_pos.y + _cursor.draw_size.y >= _screen.height - _chatmsg_box.y - _chatmsg_box.height &&
_cursor.draw_pos.y <= _screen.height - _chatmsg_box.y) { _cursor.draw_pos.y <= _screen.height - _chatmsg_box.y) {
UndrawMouseCursor(); UndrawMouseCursor();
} }
}
if (_chatmessage_visible) {
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
int x = _chatmsg_box.x; int x = _chatmsg_box.x;
int y = _screen.height - _chatmsg_box.y - _chatmsg_box.height; int y = _screen.height - _chatmsg_box.y - _chatmsg_box.height;
int width = _chatmsg_box.width; int width = _chatmsg_box.width;