window.c
changeset 1867 cfe4b490dd8a
parent 1744 c999671a5740
child 1891 862800791170
equal deleted inserted replaced
1866:87ae212e7eda 1867:cfe4b490dd8a
  1539 }
  1539 }
  1540 
  1540 
  1541 void InvalidateWidget(Window *w, byte widget_index)
  1541 void InvalidateWidget(Window *w, byte widget_index)
  1542 {
  1542 {
  1543 	const Widget *wi = &w->widget[widget_index];
  1543 	const Widget *wi = &w->widget[widget_index];
  1544 //	if (wi->left != -2) {
  1544 
  1545 		SetDirtyBlocks(
  1545 	/* Don't redraw the window if the widget is invisible or of no-type */
  1546 			w->left + wi->left,
  1546 	if (wi->type == WWT_EMPTY || HASBIT(w->hidden_state, widget_index)) return;
  1547 			w->top + wi->top,
  1547 
  1548 			w->left + wi->right + 1,
  1548 	SetDirtyBlocks(w->left + wi->left, w->top + wi->top, w->left + wi->right + 1, w->top + wi->bottom + 1);
  1549 			w->top + wi->bottom + 1);
       
  1550 //	}
       
  1551 }
  1549 }
  1552 
  1550 
  1553 void InvalidateWindowWidget(byte cls, WindowNumber number, byte widget_index)
  1551 void InvalidateWindowWidget(byte cls, WindowNumber number, byte widget_index)
  1554 {
  1552 {
  1555 	Window *w;
  1553 	Window *w;