124
124
/** Hide the chatbox */
125
125
void NetworkUndrawChatMessage()
127
/* Sometimes we also need to hide the cursor
128
* This is because both textmessage and the cursor take a shot of the
129
* screen before drawing.
130
* Now the textmessage takes his shot and paints his data before the cursor
131
* does, so in the shot of the cursor is the screen-data of the textmessage
132
* included when the cursor hangs somewhere over the textmessage. To
133
* avoid wrong repaints, we undraw the cursor in that case, and everything
135
* (and now hope this story above makes sense to you ;))
137
if (_cursor.visible &&
138
_cursor.draw_pos.x + _cursor.draw_size.x >= _chatmsg_box.x &&
139
_cursor.draw_pos.x <= _chatmsg_box.x + _chatmsg_box.width &&
140
_cursor.draw_pos.y + _cursor.draw_size.y >= _screen.height - _chatmsg_box.y - _chatmsg_box.height &&
141
_cursor.draw_pos.y <= _screen.height - _chatmsg_box.y) {
127
145
if (_chatmessage_visible) {
128
146
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
129
/* Sometimes we also need to hide the cursor
130
* This is because both textmessage and the cursor take a shot of the
131
* screen before drawing.
132
* Now the textmessage takes his shot and paints his data before the cursor
133
* does, so in the shot of the cursor is the screen-data of the textmessage
134
* included when the cursor hangs somewhere over the textmessage. To
135
* avoid wrong repaints, we undraw the cursor in that case, and everything
137
* (and now hope this story above makes sense to you ;))
140
if (_cursor.visible) {
141
if (_cursor.draw_pos.x + _cursor.draw_size.x >= _chatmsg_box.x &&
142
_cursor.draw_pos.x <= _chatmsg_box.x + _chatmsg_box.width &&
143
_cursor.draw_pos.y + _cursor.draw_size.y >= _screen.height - _chatmsg_box.y - _chatmsg_box.height &&
144
_cursor.draw_pos.y <= _screen.height - _chatmsg_box.y) {
149
147
int x = _chatmsg_box.x;
150
148
int y = _screen.height - _chatmsg_box.y - _chatmsg_box.height;
151
149
int width = _chatmsg_box.width;